This is one of three encodings (multitask / composite / span) of the same
filler/repair information, trained on the same utterances with the same encoder.
1import numpy as np, soundfile as sf
2from fujielab.asr.espnet_ext.espnet2.bin.asr_ctc_inference_cbs import Speech2TextCTC
3
4s2t = Speech2TextCTC.from_pretrained(
5 "fujie/espnet_asr_csj_pron_span_cbs_ctc_120300_hop132", streaming=True)
6
7audio, fs = sf.read("utterance.wav") # 16 kHz mono
8chunk = int(16000 * 0.1)
9for i in range(0, len(audio), chunk):
10 c = audio[i:i+chunk]; is_final = len(c) < chunk
11 if is_final: c = np.pad(c, (0, chunk - len(c)))
12 r = s2t.streaming_decode(c, is_final=is_final)[0]
13 print(" ".join(r.tokens)) # tokens carry the F/D markers
CSJ (Corpus of Spontaneous Japanese), 30 epochs, ESPnet (espnet-ninjal fork);
F/D labels derived from the CSJ transcripts.