I've got issue with the transcriptions in the fron...
# ask-ai
d
I've got issue with the transcriptions in the frontend with this session where some art of the prompt where displayed in the actual transcription, any idea why I got this bug ? :
Copy code
session = AgentSession(
                llm=openai.realtime.RealtimeModel(
                    model="gpt-4o-realtime-preview",
                    voice=voice,
                    input_audio_transcription=InputAudioTranscription(
                        model="gpt-4o-transcribe",  # or
                        language="en",  # ISO-639-1 code
                        prompt="Transcribe medical conversation with various accents and clinical terminology",
                    ),
                )
            )
t
Thanks for reaching out, W. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
The issue you're experiencing, where the transcription prompt appears in the actual transcription output, is likely due to how the prompt is handled in the Speech-to-Text (STT) configuration. Specifically: • The
prompt
parameter in your STT configuration is included in the transcription data sent to the frontend. This behavior is common with certain STT models, such as Whisper-1. • The frontend components, like the Typewriter component, render all received transcription data, including the prompt, without filtering it out. • LiveKit's transcription protocol sends all transcription data, including prompts, to the frontend via the
lk.transcription
text stream topic. To resolve this, you can modify the frontend logic to filter out the prompt text from the transcription data before rendering it. This involves identifying and excluding the prompt content from the transcription stream. Let me know if you'd like detailed guidance on implementing this filter in your frontend code. Sources: livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/stt.py | components/typewriter.tsx | Text and transcriptions | LiveKit Docs