Effacer les filtres
Effacer les filtres

Input folders or files contain non-standard file extensions.

3 vues (au cours des 30 derniers jours)
Mohammad Sultan
Mohammad Sultan le 8 Mai 2024
  2 commentaires
Voss
Voss le 8 Mai 2024
Please upload create_new_audio.m using the paperclip button.

Connectez-vous pour commenter.

Réponses (2)

Walter Roberson
Walter Roberson le 8 Mai 2024
TrainingSet/English contains no files with standard audio file extensions.
You need to change
ads = audioDatastore(output_dir, ...
'IncludeSubfolders',true, ...
'LabelSource','foldernames');
to explicitly have 'FileExtensions' name/value pair so that it can locate the files with the non-standard extensions.
Possibly TrainingSet/English is empty.

Voss
Voss le 8 Mai 2024
The error is happening on this line:
ads = audioDatastore(output_dir, ...
'IncludeSubfolders',true, ...
'LabelSource','foldernames');
and it happens because output_dir (which, based on your selections, is fullfile(pwd(),'TrainingSet','English')) and/or one or more of its sub-folders contains files whose extensions are not in the set listed under FileExtensions on this page.
You can avoid this error by specifying extensions of the files you want to include in your audioDatastore, e.g.:
ads = audioDatastore(output_dir, ...
'IncludeSubfolders',true, ...
'LabelSource','foldernames', ...
'FileExtensions',{'.wav','.mp4','.wot'});
  3 commentaires
Voss
Voss le 8 Mai 2024
Try something and see.
Walter Roberson
Walter Roberson le 8 Mai 2024
Audio file extensions, specified as a character vector, cell array of character vectors, string scalar, or string array. If you do not specify FileExtensions, then audioDatastore automatically includes all supported file types:
  • .wav
  • .avi
  • .aif
  • .aifc
  • .aiff
  • .mp3
  • .au
  • .snd
  • .mp4
  • .m4a
  • .flac
  • .ogg
  • .mov
  • .opus

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by