Share via

Specifying a model in TranscriptionOptions of TranscriptionClient

Roy Aad 0 Reputation points
2026-04-22T04:51:08.1066667+00:00

Hi I am using a code similar to the one found in:

link

However when I specify a model in TranscriptionOptions

options = TranscriptionOptions(
    locales=["en-US"],
    enhanced_mode=enhanced_mode,
    models={
    "en-US": "MAI-Transcribe-1"
    },
)

I always get:

HttpResponseError: (InvalidArgument) The specified model does not have the expected format. Code: InvalidArgument Message: The specified model does not have the expected format.

What are the models that can be specified in TranscriptionOptions?

Azure Speech in Foundry Tools

2 answers

Sort by: Most helpful
  1. SRILAKSHMI C 18,035 Reputation points Microsoft External Staff Moderator
    2026-04-25T07:39:49.2866667+00:00

    Hello Roy Aad,

    The error occurs because the value provided in the models property must match one of the formats supported by the Speech SDK. MAI-Transcribe-1 is not a valid value for this parameter, which is why you receive the following error HttpResponseError: (InvalidArgument) The specified model does not have the expected format.

    Why This Happens

    MAI-Transcribe-1 is a Microsoft-managed internal base model used by Azure Speech services. It is not exposed as a selectable model identifier in the TranscriptionOptions API.

    The models parameter supports only:

    1. Built-in transcription model identifiers, or
    2. The full resource URI of a custom speech model

    Supported Built-In Model Identifiers

    You can specify one of the following built-in models:

    • azure-speech
    • whisper-1
    • gpt-4o-transcribe
    • gpt-4o-mini-transcribe

    For example:

    options = TranscriptionOptions(
    

    If you want Azure Speech's default optimized model, azure-speech is the recommended option.

    Using a Custom Speech Model

    If you have trained a custom speech model, the models dictionary must contain the model's full self URI, not just its name.

    Example:

    options = TranscriptionOptions(
    

    You can obtain this URI from:

    1. Azure portal → Your Speech resource
    2. Open Speech Studio
    3. Navigate to Custom Speech
    4. Select your trained model
    5. Copy the model's Self URI

    Recommended Approach

    If you are using a standard Microsoft model, specify one of the supported built-in identifiers listed above.

    If you are using a custom-trained model, provide its full model URI.

    If you do not specify the models parameter, Azure Speech will automatically select the most appropriate default model for the chosen locale.

    For most Fast Transcription scenarios, this is sufficient:

    options = TranscriptionOptions(
    

    MAI-Transcribe-1 cannot be used directly in TranscriptionOptions.

    Use one of the supported built-in identifiers:

    • azure-speech
    • whisper-1
    • gpt-4o-transcribe
    • gpt-4o-mini-transcribe

    Or provide the full URI of a custom speech model.

     Please refer this

    AudioInputTranscriptionOptions.Model – supported values: whisper-1, gpt-4o-transcribe, gpt-4o-mini-transcribe, azure-speech https://learn.microsoft.com/dotnet/api/azure.ai.voicelive.audioinputtranscriptionoptions.model TranscriptionOptions class – Python wrapper for transcription settings https://learn.microsoft.com/dotnet/api/azure.ai.speech.transcription.transcriptionoptions

    Example usage in the Speech SDK samples repo https://github.com/MicrosoftDocs/azure-ai-docs/blob/main/articles/ai-services/speech-service/includes/common/llm-speech-sdk-python.md

    I Hope this helps. Do let me know if you have any further queries.


    If this answers your query, please do click Accept Answer and Yes for was this answer helpful.

    Thank you!

    0 comments No comments

  2. Q&A Assist
    2026-04-22T04:51:20.1066667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    TranscriptionOptions.models does not take a friendly model name such as "MAI-Transcribe-1". It must be a mapping from locale to model URI.

    For both the Python and JavaScript SDKs, the models property is defined as a dictionary/record of string → string where the value is a model URI:

    • Python (azure-ai-transcription):
        models: dict[str, str] | None
      
      “Maps some or all candidate locales to a model URI to be used for transcription. If no mapping is given, the default model for the locale is used.”
    • JavaScript (@azure/ai-speech-transcription):
        models?: Record<string, string>
      
      “Maps some or all candidate locales to a model URI to be used for transcription. If no mapping is given, the default model for the locale is used.”

    The error

    The specified model does not have the expected format.

    occurs because "MAI-Transcribe-1" is not a valid model URI. To use a specific model, supply the correct model URI for that locale, for example:

    options = TranscriptionOptions(
        locales=["en-US"],
        enhanced_mode=enhanced_mode,
        models={
            "en-US": "<model-uri-for-en-US>"
        },
    )
    

    If models is omitted entirely, the service automatically uses the default model for the specified locale(s), which is the recommended approach unless there is a specific custom or non-default model URI that must be used.


    References:

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.