Can't use audiowrite on linux server - stops with the Error invalidFileExtension

1 次查看(过去 30 天)
I'm executing this Code:
filename = ['EHG_HRIR_in.wav'];
disp(filename);
audiowrite(filename, combined_signal(:,side), Fs);
And the error message Matlab is throwing:
Error using message
In 'MATLAB:audiovideo:audiowrite:invalidFileExtension', parameter {1} must be a real scalar.
Error in audiowrite>validateExtension (line 379)
error(message('MATLAB:audiovideo:audiowrite:invalidFileExtension',...
Error in audiowrite>validateFilename (line 394)
validateExtension(filepath.Extension,filename)
Error in audiowrite (line 165)
[props.filename, fileExisted] = validateFilename( props.filename );
I'm very happy, if anyone could tell me what is going on.

采纳的回答

Andrej Voss
Andrej Voss 2022-7-18
编辑:Andrej Voss 2022-7-18
The error message is wrong:
'MATLAB:audiovideo:audiowrite:invalidFileExtension', parameter {1} must be a real scalar.
The function get.WriteableFileTypes in PluginManager.m returns an empty array which indicates a missing C++ library.
@MathWorks Support Team An appropriate error message like "no writable file type found, check system's C++ sound libraries" would help a lot.
I'm not an expert but I could solve the problem by installing the necessary libraries e.g. by installing the Synthesis ToolKit in C++ (STK)
sudo apt-get install stk
'clear all' the console
Now it should work.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

产品


版本

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by