mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-22 11:51:04 +02:00
The OpenAI realtime factory already reads `language` from the realtime
config, but builds `InputAudioTranscription()` without it, so the language
is silently dropped and the model auto-detects on every utterance.
On 8kHz telephony audio this misfires badly: in our production tests a
Brazilian Portuguese speaker was transcribed as English, French and Chinese
within a single call, which then corrupted downstream extraction.
Every other STT branch in `create_stt_service` already honours
`language` (Deepgram, Google, Cartesia, Dograh, Sarvam), and
`GoogleRealtimeLLMConfiguration` already exposes a `language` field for
Gemini Live. This brings the OpenAI realtime provider in line with both.
- expose `language` on `OpenAIRealtimeLLMConfiguration` (optional,
defaults to None -> unchanged auto-detect behaviour)
- pass it through to `InputAudioTranscription`, which already accepts it
Verified against pipecat: the session now carries
`{"transcription": {"model": "gpt-realtime-whisper", "language": "pt"}}`.
Co-authored-by: Liberty Card <tecnologialibertycard@gmail.com>
|
||
|---|---|---|
| .. | ||
| realtime | ||
| __init__.py | ||
| active_calls.py | ||
| audio_config.py | ||
| audio_file_cache.py | ||
| audio_mixer.py | ||
| audio_playback.py | ||
| event_handlers.py | ||
| exceptions.py | ||
| gemini_json_schema_adapter.py | ||
| in_memory_buffers.py | ||
| minimax_tts.py | ||
| pipeline_builder.py | ||
| pipeline_engine_callbacks_processor.py | ||
| pipeline_metrics_aggregator.py | ||
| pre_call_fetch.py | ||
| realtime_feedback_events.py | ||
| realtime_feedback_observer.py | ||
| recording_audio_cache.py | ||
| recording_router_processor.py | ||
| run_pipeline.py | ||
| service_factory.py | ||
| tracing_config.py | ||
| transcript_log_coordinator.py | ||
| transport_params.py | ||
| transport_setup.py | ||
| turn_context.py | ||
| worker_runner.py | ||
| ws_sender_registry.py | ||