8000 GitHub - h-takeyeah/whisper-docker: Run speech recognition to produce transcription by whisper. Researchers can import the outcomes to ELAN.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Run speech recognition to produce transcription by whisper. Researchers can import the outcomes to ELAN.

License

Notifications You must be signed in to change notification settings

h-takeyeah/whisper-docker

 
 

Repository files navigation

whisper-docker

whisper with docker

📝 オリジナルのリポジトリ karaage0703/whisper-docker と異なり、イメージサイズの節約を目的として CPU-only の PyTorch を利用しています。

セットアップ

Docker Desktop または Docker Engine はインストール済みとします。

次のコマンドでイメージをビルドします:

docker build -t whisper .

イメージのサイズは約 2GB になると見込まれます(推論モデルを含まない容量です)。

使い方

マイクを使った音声認識

whisper-docker ディレクトリで次のコマンドを実行します:

docker run -it -d -v $(pwd):/workspace/ --net host --name whisper whisper
docker exec -it whisper python whisper-server.py

新しい端末を開き、次のコマンドを実行します:

python mic.py

mic.py を実行するには PySimpleGUI がインストールされている必要があります。

文字起こし

whisper-docker ディレクトリ以下に音声ファイルを用意し (例: input.wav) 、次のコマンドを whisper-docker ディレクトリの中で実行します:

docker run -it -d -v $(pwd):/workspace/ --net host --name whisper whisper
docker exec -it whisper python transcribe.py --model='base' --input_file='input.wav' --output_format='tsv' --language='ja'

docker run -it ... はコンテナを作成するコマンドです。コンテナを削除する前に再びこのコマンドを実行してコンテナを作成しないようにしてください。 コンテナを再作成する場合は、まず docker stop whisper && docker rm whisper を実行してコンテナを停止・削除してからにしてください。 そうでないとコンテナ名の衝突でエラーが発生します。なお、今の docker stopdocker rm は不要なコンテナを削除するために使用します。

ELAN との組み合わせ

ELANCSVTSV 形式の文字起こしテキストファイルを EAF (ELAN Annotation Format) にインポートする機能を持ちます。以下のガイダンスページで操作方法を確認することができます。

File > Import > CSV / Tab-delimited Text File....

ELAN documents / Import and Export options / Import from

Reference


日本語 / English

About

Run speech recognition to produce transcription by whisper. Researchers can import the outcomes to ELAN.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages

  • Python 91.0%
  • Dockerfile 9.0%
0