Clear Filters
Clear Filters

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

1 view (last 30 days)
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.

Accepted Answer

Andrej Voss
Andrej Voss on 18 Jul 2022
Edited: Andrej Voss on 18 Jul 2022
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.

More Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!