Transcribe audio files in aDocumentation Index
Fetch the complete documentation index at: https://docs.timbal.ai/llms.txt
Use this file to discover all available pages before exploring further.
pre_hook before processing.
This example uses OpenAI’s transcription API, but you can use any transcription service (ElevenLabs, Google Cloud, or custom implementations).
[Audio] prefix is added to the transcribed text to clearly indicate that the content originated from an audio file. This helps the agent understand the context and source of the information, which can be useful for:
- Context Awareness: The agent knows the text came from audio transcription
- Mixed Content: When combining text and audio in the same prompt, the prefix distinguishes transcribed content
- Traceability: Makes it easier to track which parts of the conversation came from audio vs. text input
Key Features
- Pre-hook Transcription: Audio is transcribed before the agent processes it
- Any Model: Works with any text model, not just audio-capable ones
- Flexible Providers: Use any transcription service (OpenAI, ElevenLabs, or custom)
- Audio Prefix: The “[Audio]” prefix clearly indicates transcribed content
- File Support: Works with local files, URLs, and base64 data