Skip to content

[Bug]: TTS: SpeakV1Text() type is broken in v6.1.0 #679

@dangusev

Description

@dangusev

Summary

Broken backwards compatibility when calling SpeakV1Text(text="hello") (used in client.speak.v1.connect websocket API)

What happened?

Actual:
SpeakV1Text(text="hello") fails with pydantic ValidationError:

Error: 1 validation error for SpeakV1Text
type
  Field required [type=missing, input_value={'text': 'Hello, this is ...ext to speech example.'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.12/v/missing

Expected:
No crash, as it was in v6.0.1

Steps to reproduce

  1. Install deepgram-sdk==6.1.0

  2. Run examples/21-text-to-speech-streaming.py

  3. Observe the error

Error: 1 validation error for SpeakV1Text
type
  Field required [type=missing, input_value={'text': 'Hello, this is ...ext to speech example.'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.12/v/missing

Minimal code sample

See examples/21-text-to-speech-streaming.py

Logs / traceback

Error: 1 validation error for SpeakV1Text
type
  Field required [type=missing, input_value={'text': 'Hello, this is ...ext to speech example.'}, input_type=dict]
    For further information visit https://errors.pydantic.dev/2.12/v/missing

Transport

WebSocket

API endpoint / path

/v1/speak/...

Model(s) used

No response

How often?

Always

Is this a regression?

  • Yes, it worked in an earlier version

Last working SDK version (if known)

6.0.1

SDK version

6.1.0

Python version

3.13

Install method

None

OS

macOS (Apple Silicon)

Environment details


Link to minimal repro (optional)

No response

Session ID (optional)

No response

Project ID (optional)

No response

Request ID (optional)

No response

Code of Conduct

  • I agree to follow this project’s Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions