humlab-speech / superassp

A wrassp super-package that re-exports all the functionality of wrassp, and adds the ability to get Praat and MATLAB signals into SSFF format.
https://humlab-speech.github.io/superassp/
2 stars 1 forks source link

Converted wrassp functions do not handle multiple files? #38

Closed FredrikKarlssonSpeech closed 10 months ago

FredrikKarlssonSpeech commented 10 months ago

"Estimating duration from bitrate, this may be inaccurate Estimating duration from bitrate, this may be inaccurate Estimating duration from bitrate, this may be inaccurate Error in purrr::map_lgl(readcheck, purrr::is_null) && tools::file_ext(listOfFiles) %in% : 'length = 13' in coercion to 'logical(1)'"

FredrikKarlssonSpeech commented 10 months ago

Files are not converted properly

>  source("~/Documents/src/superassp/R/wrassp_acfana.R")
Before output directoryEstimating duration from bitrate, this may be inaccurate
Estimating duration from bitrate, this may be inaccurate
Estimating duration from bitrate, this may be inaccurate
ℹ Lossy files: a4.aif, a6.aifc, a7.mp3, and a8.ogg
Found 6 recordings that require conversion
✖ If a file format is not nativelly suppored by `acfana()` it will have to be converted before application
  of the function
ℹ Please use "wav", "au", "kay", "nist", or "nsp" which are nativelly supported by `acfana()` to eliminate
  this conversion.
ℹ Converted files: a2.flac, a4.aif, a4.aiff, a6.aifc, a7.mp3, and a8.ogg
Preparation: converting to wav format ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■  6/6
Before assertAfter assertApplying the `acfana()` DSP function to 13 speech recordings
Warning message:
Found 4 recordings stored in lossy compression formats
ℹ If lossy compression was used when storing the signal, the result `acfana()` may not be accurate
✖ Please use a lossless file format (file extensions "wav", "flac", "aiff", "wv", "tta", "caf", "au",
  "kay", "nist", or "nsp") for acoustic analysis of speech recordings if possible. 
> a
 [1] "/Users/frkkan96/Documents/src/superassp/inst/samples/sentences/addf8.wav"
 [2] "/Users/frkkan96/Documents/src/superassp/inst/samples/sustained/a1.wav"   
 [3] "/Users/frkkan96/Documents/src/superassp/inst/samples/sustained/a2.wav"   
 [4] "/Users/frkkan96/Documents/src/superassp/inst/samples/sustained/a3.wav"   
 [5] "/Users/frkkan96/Documents/src/superassp/inst/samples/sustained/a32b.wav" 
 [6] "/Users/frkkan96/Documents/src/superassp/inst/samples/sustained/a4.wav"   
 [7] "/Users/frkkan96/Documents/src/superassp/inst/samples/sustained/a4.wav"   
 [8] "/Users/frkkan96/Documents/src/superassp/inst/samples/sustained/a5.wav"   
 [9] "/Users/frkkan96/Documents/src/superassp/inst/samples/sustained/a6.wav"   
[10] "/Users/frkkan96/Documents/src/superassp/inst/samples/sustained/a64b.wav" 
[11] "/Users/frkkan96/Documents/src/superassp/inst/samples/sustained/a7.wav"   
[12] "/Users/frkkan96/Documents/src/superassp/inst/samples/sustained/a8.wav"   
[13] "/Users/frkkan96/Documents/src/superassp/inst/samples/sustained/a9.wav"
FredrikKarlssonSpeech commented 10 months ago

Fixed in https://github.com/humlab-speech/superassp/commit/6b766c2670322c5440e28220723996f667731bc9