Recently when i am running my Ai agent i am gettin...
# ask-ai
t
Recently when i am running my Ai agent i am getting this error. 2025-09-09 221011,866 - ERROR livekit.plugins.openai - OpenAI Realtime API failed to transcribe input audio {"error": "Error(code=None, message=\"Input transcription failed for item 'item_CDrSl3SSHoqj8gZS5kuwR'.\", param=None, type='server_error')", "pid": 21414, "job_id": "AJ_UgtGHdshy3pP"} This has started happening very recently. how can i fix this ? This is the piece of code where i am expecting the error is originating from. # Create agent session with OpenAI Realtime session = AgentSession( llm=openai.realtime.RealtimeModel( model="gpt-4o-mini-realtime-preview-2024-12-17", voice="alloy", # Warm, professional voice temperature=0.8, # More conversational for introductions ), vad=silero.VAD.load(), # Voice activity detection )
t
Thanks for reaching out, Abhishek. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm sorry to hear you're running into the "OpenAI Realtime API failed to transcribe input audio" error. Let's work through this together! Here are some steps that might help resolve the issue: 1. Verify Audio Format: Please make sure your input audio is in PCM16 format, with a 24000 Hz sampling rate, and mono channel. If you need to resample, LiveKit’s built-in
AudioResampler
can be really handy. 2. Check Transcription Model: For OpenAI, the transcription model should be set to
gpt-4o-mini-transcribe
. Double-check that this is correctly configured in your
RealtimeModel
. 3. Validate Credentials: It’s important that your
OPENAI_API_KEY
is correctly set in your environment or passed to the
RealtimeModel
. This often solves many issues. 4. Enable Turn Detection: Make sure server-based voice activity detection (VAD) is enabled with valid parameters, like these:
Copy code
{
  "type": "server_vad",
  "threshold": 0.5,
  "prefix_padding_ms": 300,
  "silence_duration_ms": 200
}
5. Inspect Error Details: If you can, please check the
event.error
object from the failed transcription event. Logging these details can give us more clues about what’s going wrong. To help me assist you better, could you please confirm a few things? • Are you using OpenAI or Azure OpenAI? • Which transcription model do you have configured? • Could you share the
event.error
details from the failed transcription event? Sources: plugins/openai/src/stt.ts | livekit-plugins/livekit-plugins-google/livekit/plugins/google/beta/realtime...
t
Are there other examples of recent issues where people have found this issue ? Show me those issues and resolutions. ERROR livekit.plugins.openai - OpenAI Realtime API failed to transcribe input audio {"error": "Error(code=None, message=\"Input transcription failed for item 'item_CDrSl3SSHoqj8gZS5kuwR'. ERRORlivekit.plugins.openaiOpenAI Realtime API failed to transcribe input audio ERRORlivekit.plugins.openaiOpenAI Realtime API failed to transcribe input audio 2025-09-09 221011,866 - ERROR livekit.plugins.openai - OpenAI Realtime API failed to transcribe input audio {"error": "Error(code=None, message=\"Input transcription failed for item 'item_CDrSl3SSHoqj8gZS5kuwR'.\", param=None, type='server_error')", "pid": 21414, "job_id": "AJ_UgtGHdshy3pP"}
t
Thank you for reaching out! While there aren't any recent documented examples specifically addressing the "OpenAI Realtime API failed to transcribe input audio" error in LiveKit, I’d love to share what we do know about handling this issue: • The system carefully logs the error details from the OpenAI API, including the error type, code, and message, to help track what’s going on. • In some setups, users receive a message like "⚠️ Transcription failed" on their side to keep them informed about the hiccup. • Usually, this error pops up due to things like incorrect audio format, transcription models that aren’t set up quite right, or API credentials that might need a quick check. If you’d be willing to share a bit more about your setup or the exact error context, I’m here to help you dig deeper and find the best solution tailored just for you. Sources: livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/stt.py | plugins/openai/CHANGELOG.md | agent/main.py