Skip to content

AssemblyAI schema: speech_model and speech_models conflict #21

Description

@Lazare-42

Bug

The AssemblyAITranscriptionSchema in v0.8.4 exports both speech_model (singular, deprecated) and speech_models (plural, new required array). AssemblyAI's API rejects requests that contain both fields:

speech_model and speech_models cannot be used in the same request.
Use "speech_models": ["model_name"]. — HTTP 400

How to reproduce

const sdk = require('voice-router-dev/field-configs');
const shape = sdk.AssemblyAITranscriptionSchema._zod.def.shape;
console.log('speech_model' in shape);  // true
console.log('speech_models' in shape); // true

When users configure transcription via the DynamicFieldForm (which renders fields from the schema), speech_model gets set as a custom param. The pipeline also sets speech_models as a default/fallback → both are sent → HTTP 400.

Expected behavior

Only speech_models (plural, array) should be in the schema. speech_model (singular) should be removed since AssemblyAI no longer accepts it alongside speech_models.

Workaround

We're filtering out speech_model from custom params and mapping it to speech_models in our submission layer.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions