Skip to content

JenJenUwU/speech-timeline-recognizer

 
 

Repository files navigation

speech-timeline-recognizer

Requirements

  1. PNPM
  2. Nodejs
  3. ffmpeg
  4. Vosk model - Chinese

How to Setup

  1. Install PNPM: https://pnpm.io/installation
  2. Install ffmpeg: https://ffmpeg.org/download.html
  3. Clone git repository to local directory
git clone https://github.com/JenJenUwU/speech-timeline-recognizer.git
  1. Install Node.js 18: pnpm env use -g 18
  2. 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.

How to Use

  1. Help: pnpm start --help
  2. Build it 'pnpm build'
  3. Run it:
pnpm start -output "output json name" -expect "The expected result" "The path to the wav file"

Optional Argument

-p: Toggle pretty
-f: Overwrite original file
-s: Silence Terminal    
  1. Example run code:
pnpm start -o results.json -p -f -e "我的濾水器有點問題水位指示過高而且一直漏水能請你禮拜二上午派工程師來看看嗎這個禮拜我只有那天有空請記得跟我確認時間非常感謝" data/sub-*/*_text-*.wav

Known Error

  1. Type Error occurs when the audio file does not fit the expected result in a large scale (Failed recording)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 58.7%
  • JavaScript 36.2%
  • Dockerfile 5.1%