diff --git a/whisperlivekit/__init__.py b/whisperlivekit/__init__.py index bef32ce..4547c3d 100644 --- a/whisperlivekit/__init__.py +++ b/whisperlivekit/__init__.py @@ -1,4 +1,3 @@ -from .download_simulstreaming_backend import download_simulstreaming_backend from .audio_processor import AudioProcessor from .core import TranscriptionEngine from .parse_args import parse_args diff --git a/whisperlivekit/download_simulstreaming_backend.py b/whisperlivekit/download_simulstreaming_backend.py deleted file mode 100644 index bf7c48e..0000000 --- a/whisperlivekit/download_simulstreaming_backend.py +++ /dev/null @@ -1,32 +0,0 @@ -import os -import requests -import inspect - -def get_module_path(): - return os.path.dirname(inspect.getfile(inspect.currentframe())) - -GITHUB_API_URL = "https://api.github.com/repos/ufal/SimulStreaming/contents/simul_whisper/whisper" -RAW_BASE_URL = "https://raw.githubusercontent.com/ufal/SimulStreaming/main/simul_whisper/whisper" -TARGET_DIR = os.path.join(get_module_path(), "simul_whisper", "whisper") - -def download_files_from_github(api_url, local_dir): - os.makedirs(local_dir, exist_ok=True) - response = requests.get(api_url) - response.raise_for_status() - items = response.json() - for item in items: - if item['type'] == 'file': - download_url = item['download_url'] - file_name = item['name'] - file_response = requests.get(download_url) - file_response.raise_for_status() - with open(os.path.join(local_dir, file_name), 'wb') as f: - f.write(file_response.content) - elif item['type'] == 'dir': - # Recursive call for subdirectories - download_files_from_github(item['url'], os.path.join(local_dir, item['name'])) - -def download_simulstreaming_backend(): - print(f"Downloading files into {TARGET_DIR} ...") - download_files_from_github(GITHUB_API_URL, TARGET_DIR) - print("✅ Download of SimulStreaming backend files completed successfully.") \ No newline at end of file