streaming_file - cyberofficial/Synthalingua GitHub Wiki
Streaming & File Input
These arguments control streaming (HLS, YouTube, Twitch) and file input.
Arguments
| Flag | Description |
|---|---|
--stream |
Stream audio from an HLS source (e.g., Twitch, YouTube). |
--stream_language |
Language of the stream (default: English). |
--stream_translate |
Enable automatic translation of stream transcriptions to English. |
--stream_transcribe [language] |
Enable transcription for the stream with optional target language (e.g., --stream_transcribe English). |
--stream_original_text |
Show detected original text from the stream. |
--stream_chunks |
Number of chunks to split the stream into (default: 5). |
--paddedaudio |
Number of chunks to overlap from previous batch for better transcription context. Works with both streaming and microphone input. |
--auto_hls |
Auto-adjust HLS chunk batching for optimal performance. |
--selectsource |
Show available audio streams and select one (use without value for interactive mode, or specify format directly). |
--cookies |
Path to cookies file. Supports absolute paths, current directory files, or names for cookies/ folder. |
--cookies-from-browser |
Automatically extract cookies from installed browser for stream/video access. |
--makecaptions |
Enable captions mode (requires file input/output/name). |
--file_input |
Path to input file for captioning. |
--file_output |
Folder to save generated captions (SRT) to. Used with --makecaptions. |
--file_output_name |
Output file name for captions (without extension, e.g. MyCaptionsFile). The program will add .srt automatically. |
Details & Examples
Streaming Example
python synthalingua.py --ram 11gb-v3 --stream_translate --stream_language Japanese --stream https://www.twitch.tv/somestreamerhere
Captions Example
python synthalingua.py --ram 11gb-v3 --makecaptions --file_input="C:/path/video.mp4" --file_output="C:/output" --file_output_name="MyCaptionsFile"
--auto_hls
Automatically tunes chunk size for best latency and performance.
--selectsource
Shows available audio streams for a given URL and lets you select one. Examples:
python synthalingua.py --stream https://www.youtube.com/watch?v=abc123 --selectsource
python synthalingua.py --stream https://www.youtube.com/watch?v=abc123 --selectsource bestaudio
--cookies-from-browser
Automatically extract cookies from installed browser for stream/video access. Eliminates need for manual cookie file export. Supported browsers: brave, chrome, chromium, edge, firefox, opera, safari, vivaldi, whale. Example: --cookies-from-browser chrome. Requires browser to be closed during extraction.