How ufal/simulstreaming works
SimulStreaming processes audio incrementally through Whisper and can either emit direct speech translation or feed recognized text to an LLM translation stage. File simulation and socket servers expose the streaming workflows; the README also documents multilingual transcription, prompting/context, optional voice-activity control, and cascade translation. Edges reflect README statements and source-index references; unsampled subsystem internals and runtime links are omitted where their callers are not shown.
Main entry points: simul_whisper.py SimulWhisper ASR · simulstreaming_translate.py Translation workflow · simulstreaming_whisper.py Whisper simulation · whisper_online_main.py Online processing
Components 22
Streaming ASR
- Online processing
simulstreaming/whisper/whisper_streaming/whisper_online_main.py - Voice activity control
simulstreaming/whisper/whisper_streaming/vac_online_processor.py - SimulWhisper ASR
simulstreaming/whisper/simul_whisper/simul_whisper.py - Alignment configuration
simulstreaming/whisper/simul_whisper/config.py
Whisper Engine
- Audio features
simulstreaming/whisper/simul_whisper/whisper/audio.py - Whisper model
simulstreaming/whisper/simul_whisper/whisper/model.py - Token decoding
simulstreaming/whisper/simul_whisper/whisper/decoding.py - Language tokenizer
simulstreaming/whisper/simul_whisper/whisper/tokenizer.py - Word timing
simulstreaming/whisper/simul_whisper/whisper/timing.py - Whisper transcription
simulstreaming/whisper/simul_whisper/whisper/transcribe.py
LLM Translation
- Translation workflow
simulstreaming_translate.py - LLM translation
simulstreaming_translate.py - Context buffer
simulstreaming_translate.py - Sentence segmentation
simulstreaming/translate/sentence_segmenter.py - Streaming policy
simulstreaming/translate/hovercraft.py
Runtime Interfaces
- Whisper simulation
simulstreaming_whisper.py - Whisper server
simulstreaming/whisper/whisper_streaming/whisper_server.py - Translation server
simulstreaming_translate_server.py - Socket connection
simulstreaming/utils/server_utils.py - Line transport
simulstreaming/utils/line_packet.py
Other components
- Audio input
- Text input
Connections 26
- Audio input → Whisper simulation: provides audio
README.md - Whisper simulation → Online processing: runs simulation
simulstreaming_whisper.py - Whisper simulation → SimulWhisper ASR: configures ASR
simulstreaming_whisper.py - Whisper simulation → Alignment configuration: sets options
simulstreaming_whisper.py - Online processing → Voice activity control: uses controller
simulstreaming/whisper/whisper_streaming/vac_online_processor.py - Online processing → SimulWhisper ASR: processes audio
- SimulWhisper ASR → Audio features: extracts features
simulstreaming/whisper/simul_whisper/simul_whisper.py - SimulWhisper ASR → Whisper model: runs inference
- SimulWhisper ASR → Token decoding: decodes tokens
simulstreaming/whisper/simul_whisper/simul_whisper.py - SimulWhisper ASR → Language tokenizer: tokenizes output
simulstreaming/whisper/simul_whisper/simul_whisper.py - SimulWhisper ASR → Word timing: aligns words
simulstreaming/whisper/simul_whisper/simul_whisper.py - Whisper transcription → Audio features: creates spectrogram
simulstreaming/whisper/simul_whisper/whisper/transcribe.py - Token decoding → Whisper model: runs forward pass
simulstreaming/whisper/simul_whisper/whisper/decoding.py - Token decoding → Language tokenizer: uses tokens
simulstreaming/whisper/simul_whisper/whisper/decoding.py - Whisper server → Online processing: dispatches processing
simulstreaming/whisper/whisper_streaming/whisper_server.py - Whisper server → Socket connection: uses connection
simulstreaming/whisper/whisper_streaming/whisper_server.py - Text input → Translation workflow: provides source text
- Translation workflow → LLM translation: translates text
simulstreaming_translate.py - Translation workflow → Context buffer: manages context
simulstreaming_translate.py - Translation workflow → Sentence segmentation: uses segmentation
simulstreaming_translate.py - Translation workflow → Streaming policy: uses policy
simulstreaming_translate.py - SimulWhisper ASR → Translation workflow: supplies recognized text
README.md - Translation server → Translation workflow: runs workflow
simulstreaming_translate_server.py - Translation server → Socket connection: uses connection
simulstreaming_translate_server.py - Whisper server → Socket connection: uses connection
simulstreaming/whisper/whisper_streaming/whisper_server.py - Socket connection → Line transport: sends lines
simulstreaming/utils/server_utils.py