- PNPM
- Nodejs
- ffmpeg
- Vosk model - Chinese
- Install PNPM: https://pnpm.io/installation
- Install ffmpeg: https://ffmpeg.org/download.html
- Clone git repository to local directory
git clone https://github.com/JenJenUwU/speech-timeline-recognizer.git
- Install Node.js 18:
pnpm env use -g 18
- Run
pnpm i
to install all dependencies. It will take a while since it downloads a big model (1~2 GB) The model (vosk-model-cn-0.22) is released under the Apache 2.0 license.
- Help:
pnpm start --help
- Build it 'pnpm build'
- Run it:
pnpm start -output "output json name" -expect "The expected result" "The path to the wav file"
-p: Toggle pretty
-f: Overwrite original file
-s: Silence Terminal
- Example run code:
pnpm start -o results.json -p -f -e "我的濾水器有點問題水位指示過高而且一直漏水能請你禮拜二上午派工程師來看看嗎這個禮拜我只有那天有空請記得跟我確認時間非常感謝" data/sub-*/*_text-*.wav
- Type Error occurs when the audio file does not fit the expected result in a large scale (Failed recording)