Tao speech_to_text infer -- how can I pass file list?

following speech-to-text-training.ipynb
I want to do inference (i.e. !tao speech_to_text infer …)
with a list of wav files given in a file.
How does $path in
file_paths=[$path]
has to look like??
file_paths=["/data/an4_converted/wavs/an406-fcaw-b.wav","/data/an4_converted/wavs/cen8-fjlp-b.wav"]
works, but only if NO blank is after the Komma (strange).

I tried many things like
filelist=open(“an4_test.inlist”).read().replace("\n",",")
or
filelist=open(“an4_test.inlist”).read().split()

together with
file_paths=[filelist]
or
file_paths=filelist

without success.

Many thanks for your help!
/Andi

What does it look like when you run above? Is it the same as ["/data/an4_converted/wavs/an406-fcaw-b.wav","/data/an4_converted/wavs/cen8-fjlp-b.wav"] ?

many thanks for comong back so quickly!

This is running correctly:
!tao speech_to_text infer
-e $SPECS_DIR/speech_to_text/infer.yaml
-g 1
-k $KEY
-m $RESULTS_DIR/quartznet/train/checkpoints/trained-model.tlt
-r $RESULTS_DIR/quartznet/infer
file_paths=["/data/an4_converted/wavs/an406-fcaw-b.wav","/data/an4_converted/wavs/cen8-fjlp-b.wav"]

This is not:
filelist=["/data/an4_converted/wavs/an406-fcaw-b.wav","/data/an4_converted/wavs/cen8-fjlp-b.wav"]
!tao speech_to_text infer
-e $SPECS_DIR/speech_to_text/infer.yaml
-g 1
-k $KEY
-m $RESULTS_DIR/quartznet/train/checkpoints/trained-model.tlt
-r $RESULTS_DIR/quartznet/infer
file_paths=filelist

(also not with
file_paths=$filelist
)

Doing:
filelist=open(“an4_test.inlist”).read().split()
filelist

results in:
[’/data/an4_converted/wavs/an406-fcaw-b.wav’,
‘/data/an4_converted/wavs/an407-fcaw-b.wav’,
‘/data/an4_converted/wavs/an408-fcaw-b.wav’,
‘/data/an4_converted/wavs/an409-fcaw-b.wav’,
‘/data/an4_converted/wavs/an410-fcaw-b.wav’,
‘/data/an4_converted/wavs/cen1-fcaw-b.wav’,
‘/data/an4_converted/wavs/cen2-fcaw-b.wav’,
‘/data/an4_converted/wavs/cen3-fcaw-b.wav’,
‘/data/an4_converted/wavs/cen4-fcaw-b.wav’,
‘/data/an4_converted/wavs/cen5-fcaw-b.wav’]

Thought, that
["/data/an4_converted/wavs/an406-fcaw-b.wav","/data/an4_converted/wavs/cen8-fjlp-b.wav"]
is a python list …

Would be great if the input type of $path in the original jupyter line
file_paths=[$path]
would be precicely specified.

many thanks for any help!
Andi

Hi, many thanks for your quick reply!
I found a solution/work-around by using bash commands.

Following worked for me:
filelist=!cut -d’"’ -f4,10 an4_converted/test_manifest.json | head -10 | cut -d’"’ -f1 | paste -s -d"," -

!tao speech_to_text infer
-e $SPECS_DIR/speech_to_text/infer.yaml
-g 1
-k $KEY
-m $RESULTS_DIR/quartznet/train/checkpoints/trained-model.tlt
-r $RESULTS_DIR/quartznet/infer
file_paths=$filelist

would be great if data types could be precicely specified in the documentation! e.g. what is $path in
file_paths=[$path]

many thanks so far!
/Andi

I still have another question concerning
a) training / fine-tuning
Could you give hints what is an appropriate value for max_epochs ??
b) evaluation:
What is a reasonable result for this an4 train/test? I got (so far)
{‘test_loss’: 86.24714660644531, ‘test_wer’: 0.8680465817451477}
is this ok?

Is it possible to output detailed results (per utterance, Insertions,Deletions,Substitutions) when doing
!tao speech_to_text evaluate …
many thanks!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.