# Hume AI (/en/ai/platform/models/tts/humeai)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

> Documentation: Conversational AI.
> Documentation version: Preview.
> This document describes only this version. [Version index](/llms/doc-versions-convoai-guides-v2.txt).


Hume AI provides emotion-aware text-to-speech technology that generates natural, expressive voices with emotional intelligence. The platform offers both curated voices from the Voice Library and support for custom voice creation, enabling personalized audio experiences.

## Sample configuration

The following example shows how to configure Hume AI as the agent's TTS when you create or update an agent. For a complete example, see [Create an agent and start a session](/en/ai/platform/get-started/start-stop-agent#create-an-agent).

Hume AI supports BYOK only. It isn't available in managed mode. Store your Hume AI API key in a secret set, and refer to it from the agent. For details, see [Use your own provider keys](/en/ai/platform/build/use-your-own-keys).

**Python SDK**

```python
from agora_agent import Agent, HumeAITTS, secret_ref

# client is your configured Agora client
agent = (
    Agent(client=client)
    .with_stt(...)  # configure your ASR vendor
    .with_llm(...)  # configure your LLM vendor
    .with_tts(
        HumeAITTS(
            key=secret_ref("support_prod", "humeai"),
            base_url="https://api.hume.ai",
            voice_id="<your_voice_id>",
            provider="HUME_AI",
            speed=1.0,
            trailing_silence=0.35,
        )
    )
)
```

**TypeScript SDK**

```ts
import { Agent, HumeAITTS, secretRef } from 'agora-agents';

// client is your configured Agora client
const agent = new Agent({ client })
  .withStt(/* configure your ASR vendor */)
  .withLlm(/* configure your LLM vendor */)
  .withTts(
    new HumeAITTS({
      key: secretRef('support_prod', 'humeai'),
      baseUrl: 'https://api.hume.ai',
      voiceId: '<your_voice_id>',
      provider: 'HUME_AI',
      speed: 1.0,
      trailingSilence: 0.35,
    }),
  );
```

**Go SDK**

```go
// client is your configured Agora client
speed, trailingSilence := 1.0, 0.35
agent := agentkit.NewAgent(client).
	WithStt( /* configure your ASR vendor */ ).
	WithLlm( /* configure your LLM vendor */ ).
	WithTts(vendors.NewHumeAITTS(vendors.HumeAITTSOptions{
		Key:             agentkit.SecretRef("support_prod", "humeai"),
		BaseURL:         "https://api.hume.ai",
		VoiceID:         "<your_voice_id>",
		Provider:        "HUME_AI",
		Speed:           &speed,
		TrailingSilence: &trailingSilence,
	}))
```

**REST API**

Set `credential.mode` to `byok` and `credential.fields.key` to a reference to your Hume AI API key. In the following example, the key is stored as `humeai` in the `support_prod` set:

```json
"tts": {
  "credential": {
    "mode": "byok",
    "fields": {
      "key": "$secrets.support_prod.humeai"
    }
  },
  "vendor": "humeai",
  "url": "https://api.hume.ai",
  "params": {
    "voice_id": "<your_voice_id>",
    "provider": "HUME_AI",
    "speed": 1,
    "trailing_silence": 0.35
  }
}
```

## Key parameters

The `tts` block takes the following fields. In the SDKs, `HumeAITTS` sets them from its options.

**tts**

**`vendor` (string) required**

Set to `humeai`.

**`credential` (object) required**

Set `mode` to `byok` and `fields.key` to a `$secrets.<set>.<key>` reference to your Hume AI API key. Get your API key from the Hume AI console.

**`url` (string) optional**

The base URL for the Hume AI API. For example, `https://api.hume.ai`.

**`params` (object) required**

**`voice_id` (string) required**

The identifier of the voice to use for speech synthesis. Choose from available voices in your Hume AI dashboard.

**`provider` (string) required**

Default value: `CUSTOM_VOICE`

Possible values: `HUME_AI, CUSTOM_VOICE`

The voice provider type.

- `"HUME_AI"`: Use a pre-built voice from Hume's curated Voice Library.
- `"CUSTOM_VOICE"`: Use your own custom-trained voice.

**`speed` (number) optional**

Default value: `1`

Possible values: `0.25 to 3.0`

Controls the playback speed of the generated speech. Higher values increase speech rate.

**`trailing_silence` (number) optional**

Default value: `0.35`

Possible values: `0 to 5`

Duration of silence (in seconds) to add at the end of each utterance. Useful for natural conversation pacing.

> **Caution**
>
> The parameters listed on this page are validated for use with the Conversational AI Platform. Required parameters must be provided as documented. Any additional parameters in `params` are passed through directly to Hume AI without validation. For a full list of supported options, refer to the [Hume AI TTS documentation](https://dev.hume.ai/docs/text-to-speech-tts/overview).

This integration is fully supported for use with the Conversational AI Platform. While it has completed functional validation, it is newer to the platform, and additional provider-specific edge cases may be identified as usage scales across a broader range of applications and workloads.
