๐Ÿ“ฆ pmdevita / faster-whisper-live

Use faster-whisper with a streaming audio source. Asyncio supported.

โ˜… 4 stars โ‘‚ 1 forks ๐Ÿ‘ 4 watching โš–๏ธ MIT License
๐Ÿ“ฅ Clone https://github.com/pmdevita/faster-whisper-live.git
HTTPS git clone https://github.com/pmdevita/faster-whisper-live.git
SSH git clone git@github.com:pmdevita/faster-whisper-live.git
CLI gh repo clone pmdevita/faster-whisper-live
Peter DeVita Peter DeVita Create LICENSE 4a83309 2 years ago ๐Ÿ“ History
๐Ÿ“‚ master View all commits โ†’
๐Ÿ“ examples
๐Ÿ“„ LICENSE
๐Ÿ“„ poetry.lock
๐Ÿ“„ pyproject.toml
๐Ÿ“„ Readme.md
๐Ÿ“„ README.md

faster-whisper-live

Use faster-whisper with a streaming audio source. Includes support for asyncio.

Special thanks to JonathanFly for his initial implementation here.

This is still a work in progress, might break sometimes. Contributions welcome and appreciated!

Installation

I'd like to get this in a better state before uploading to PyPI. For now you can do

``pip install git+https://github.com/pmdevita/faster-whisper-live.git%%CODEBLOCK0%%poetry add git+https://github.com/pmdevita/faster-whisper-live.git%%CODEBLOCK1%%python from faster_whisper_live import LiveWhisper model = LiveWhisper("small", compute_type="int8_float16") with open("whispertest.m4a", "rb") as f: for segment in model.transcribe(f, vad_filter=True): print(segment) %%CODEBLOCK2%%python import asyncio import aiofiles from faster_whisper_live import AsyncLiveWhisper async def main(): model = AsyncLiveWhisper("small", compute_type="int8_float16") async with aiofiles.open("whispertest.m4a", "rb") as f: async for segment in model.transcribe(f, vad_filter=True): print(segment) asyncio.run(main()) %%CODEBLOCK3%%shell ffmpeg -i input_file.m4a -f s16le -ac 1 -ar 16000 output.pcm ``