Create an ASR Model
Create anOpenAIASRModel with an OpenAICredential. The default model is
gpt-4o-mini-transcribe:
Transcribe Audio
transcribe() accepts the complete audio as bytes. Pass the original
filename so the provider can identify the in-memory audio format:
audio value or filename raises ValueError.
Keyword arguments passed directly to transcribe() override values from the
model’s Parameters object for that call.
Read the Response
transcribe() returns an ASRResponse:
Batch models return a final response with
is_last=True. Realtime models may
return intermediate responses with is_last=False from push().
Discover Available Models
ASR model cards describe supported audio types, output types, realtime capability, and the provider parameter schema. Discover them from either the credential or the model class:Implement a Custom ASR Model
SubclassASRModelBase and implement transcribe() for a batch provider:
realtime=True, implement connect(), push(), and
close(), and use the model as an asynchronous context manager. Send audio
chunks through push() and call transcribe() without audio to finalize the
current transcript.
AgentScope 2.0.11dev currently ships only the batch OpenAI ASR
implementation. The realtime lifecycle is available for custom and future
providers.