From b362eccb23ad7841f54276a09fa7c63e689a18f3 Mon Sep 17 00:00:00 2001 From: Quentin Fuxa Date: Thu, 3 Jul 2025 10:24:02 +0200 Subject: [PATCH] new command to get simulstreaming backend --- README.md | 4 ++-- setup.py | 3 ++- whisperlivekit/download_simulstreaming_backend.py | 7 +++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 85e7d4f..95f43f4 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ WhisperLiveKit consists of three main components: - **Confidence Validation** – Immediately validate high-confidence tokens for faster inference (WhisperStreaming only) - **Buffering Preview** – Displays unvalidated transcription segments (not compatible with SimulStreaming yet) - **Punctuation-Based Speaker Splitting [BETA]** - Align speaker changes with natural sentence boundaries for more readable transcripts -- **SimulStreaming Backend** - Ultra-low latency transcription using state-of-the-art AlignAtt policy. The code is not bundled directly in this repository. To retrieve it, please run `python whisperlivekit/download_simulstreaming_backend.py` +- **SimulStreaming Backend** - Ultra-low latency transcription using state-of-the-art AlignAtt policy. The code is not bundled directly in this repository. To retrieve it, please run `whisperlivekit-download-simulstreaming` ## Quick Start @@ -298,4 +298,4 @@ Capture discussions in real-time for meeting transcription, help hearing-impaire We extend our gratitude to the original authors of: | [Whisper Streaming](https://github.com/ufal/whisper_streaming) | [SimulStreaming](https://github.com/ufal/SimulStreaming) | [Diart](https://github.com/juanmc2005/diart) | [OpenAI Whisper](https://github.com/openai/whisper) | -| -------- | ------- | -------- | ------- | \ No newline at end of file +| -------- | ------- | -------- | ------- | diff --git a/setup.py b/setup.py index 85b49e5..60d2b2b 100644 --- a/setup.py +++ b/setup.py @@ -40,6 +40,7 @@ setup( entry_points={ 'console_scripts': [ 'whisperlivekit-server=whisperlivekit.basic_server:main', + 'whisperlivekit-download-simulstreaming=whisperlivekit.download_simulstreaming_backend:main', ], }, classifiers=[ @@ -52,4 +53,4 @@ setup( "Topic :: Multimedia :: Sound/Audio :: Speech", ], python_requires=">=3.9", -) \ No newline at end of file +) diff --git a/whisperlivekit/download_simulstreaming_backend.py b/whisperlivekit/download_simulstreaming_backend.py index 1c8b4e9..ce54f6a 100644 --- a/whisperlivekit/download_simulstreaming_backend.py +++ b/whisperlivekit/download_simulstreaming_backend.py @@ -24,7 +24,10 @@ def download_files_from_github(api_url, local_dir): # Recursive call for subdirectories download_files_from_github(item['url'], os.path.join(local_dir, item['name'])) -if __name__ == "__main__": +def main(): print(f"Downloading files into {TARGET_DIR} ...") download_files_from_github(GITHUB_API_URL, TARGET_DIR) - print("✅ Download completed successfully.") \ No newline at end of file + print("✅ Download completed successfully.") + +if __name__ == "__main__": + main()