Skip to main content

Neuphonic TTS

The Neuphonic TTS provider enables your agent to use Neuphonic's high-quality text-to-speech models for generating natural-sounding voice output.

Installation​

Install the Neuphonic-enabled VideoSDK Agents package:

pip install "videosdk-plugins-neuphonic"

Importing​

from videosdk.plugins.neuphonic import NeuphonicTTS

Authentication​

The Neuphonic plugin requires an Neuphonic API key.

Set NEUPHONIC_API_KEY in your .env file.

Example Usage​

from videosdk.plugins.neuphonic import NeuphonicTTS
from videosdk.agents import CascadingPipeline

# Initialize the Neuphonic AI TTS model
tts = NeuphonicTTS(
lang_code="en",
voice_id="8e9c4bc8-3979-48ab-8626-df53befc2090",
speed=1.0,
)

# Add tts to cascading pipeline
pipeline = CascadingPipeline(tts=tts)
note

When using .env file for credentials, don't pass them as arguments to model instances or context objects. The SDK automatically reads environment variables, so omit api_key and other credential parameters from your code.

Configuration Options​

  • api_key: Your Neuphonic API key (can also be set via NEUPHONIC_API_KEY environment variable)
  • lang_code: Language code for the desired language (e.g., 'en', 'es', 'de', 'nl', 'hi')
  • voice_id: The voice ID for the desired voice
  • speed: Playback speed of the audio (range: 0.7-2.0, default: 1.0)

Additional Resources​

The following resources provide more information about using Neuphonic with VideoSDK Agents SDK.

Got a Question? Ask us on discord