transcribe • AI Agent SDK
transcribe: Transcribe audio to text.
transcribe
Method
</div>
This is a method of the AudioAgent class in the audio_agent module.
Transcribe audio to text.
Signature
def transcribe(file: Union[str, BinaryIO], language: Optional[str], temperature: Optional[float], model: Optional[str]) -> strParameters
ParamField
Union[str, BinaryIO]Path to audio file or file-like object
ParamField
Optional[str]Language code (e.g., “en”, “es”, “fr”)
ParamField
Optional[float]Sampling temperature (0.0 to 1.0)
ParamField
Optional[str]Override model for this call **kwargs: Additional provider-specific parameters
Returns
ResponseField
strTranscribed text
Usage
agent = AudioAgent(llm="openai/whisper-1")
text = agent.transcribe("audio.mp3")
print(text)Uses
transcriptionclose
Used By
Source
View on GitHubpraisonaiagents/agent/audio_agent.py at line 312