whispering/README.md

45 lines
1.6 KiB
Markdown
Raw Normal View History

2022-09-23 10:20:11 +00:00
# whisper_streaming
[![CI](https://github.com/shirayu/whisper_streaming/actions/workflows/ci.yml/badge.svg)](https://github.com/shirayu/whisper_streaming/actions/workflows/ci.yml)
[![CodeQL](https://github.com/shirayu/whisper_streaming/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/shirayu/whisper_streaming/actions/workflows/codeql-analysis.yml)
[![Typos](https://github.com/shirayu/whisper_streaming/actions/workflows/typos.yml/badge.svg)](https://github.com/shirayu/whisper_streaming/actions/workflows/typos.yml)
2022-09-24 00:38:40 +00:00
Streaming transcriber with [whisper](https://github.com/openai/whisper).
Transcribing in real time, enough machine power is needed.
2022-09-23 10:20:11 +00:00
## Example
```bash
2022-09-23 13:19:53 +00:00
# Setup
2022-09-23 10:20:11 +00:00
git clone https://github.com/shirayu/whisper_streaming.git
cd whisper_streaming
poetry install --only main
2022-09-23 13:19:53 +00:00
2022-09-24 03:51:07 +00:00
# If you use GPU, install proper torch and torchaudio with "poetry run pip install -U"
2022-09-24 03:38:37 +00:00
# Example : torch for CUDA 11.6
2022-09-24 03:44:14 +00:00
poetry run pip install -U torch torchaudio --extra-index-url https://download.pytorch.org/whl/cu116
2022-09-24 02:02:40 +00:00
2022-09-24 00:26:37 +00:00
# Run in English
poetry run whisper_streaming --language en --model base -n 20
2022-09-23 10:20:11 +00:00
```
2022-09-24 00:38:40 +00:00
- ``--help`` shows full options
2022-09-24 00:31:13 +00:00
- ``--language`` sets the language to transcribe. The list of languages are shown with ``poetry run whisper_streaming -h``
2022-09-23 13:19:53 +00:00
- ``-n`` sets interval of parsing. Larger values can improve accuracy but consume more memory.
2022-09-23 13:46:27 +00:00
- ``--debug`` outputs logs for debug
2022-09-23 13:19:53 +00:00
2022-09-23 10:20:11 +00:00
## Tips
If you get ``OSError: PortAudio library not found``: Install ``portaudio``
```bash
# Ubuntu
sudo apt-get install portaudio19-dev
```
## License
- [MIT License](LICENSE)
- Some codes are ported from the original whisper. Its license is also [MIT License](LICENSE.whisper)