Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

4.5 KB
Raw Blame
---
title: Using Doubao Speech in LobeHub
description: >-
  Configure Doubao Speech (Volcengine speech synthesis) in LobeHub with an API key or App ID + Access Token, and generate speech with Seed-TTS 2.0.
tags:
  - Doubao Speech
  - Volcengine
  - Text to Speech
  - TTS
  - API Key
---

# Using Doubao Speech in LobeHub

[Doubao Speech](https://www.volcengine.com/product/tts) is ByteDance Volcengine's speech synthesis service. Its Seed-TTS 2.0 model speaks natural Mandarin and English with official voices. In LobeHub, Doubao Speech is a text-to-speech provider only: it has no chat models.

Doubao Speech is a separate service from Volcengine Ark (the **Volcengine** provider for Doubao chat, image and video models), with its own console and credentials.

<Steps>
  ### Step 1: Obtain your Doubao Speech credentials

  - Sign in to the [Volcengine speech console](https://console.volcengine.com/speech/new) and enable Doubao Speech Synthesis 2.0.
  - Recommended: in the new console's **API Key management**, create an API key and copy it.
  - Legacy console accounts: copy the **App ID** and **Access Token** of your application instead.

  ### Step 2: Configure Doubao Speech in LobeHub

  - Open **App Settings → AI Providers** and select **Doubao Speech** (type `Doubao` in the provider search box to find it).
  - Paste the API key into **API Key**, or fill in **App ID (legacy console)** and **Access Token (legacy console)**. When both are filled in, the API key is used. Changes are saved automatically, and the credentials are encrypted with AES-GCM before they are stored.
  - Turn on the switch next to the provider name.
  - Optional: to send requests through a proxy, enter it in **API Proxy URL**. Leave it empty to use `https://openspeech.bytedance.com`.

  ### Step 3: Choose models

  The **Model List** shows **Doubao Speech 2.0** (`seed-tts-2.0`) under the **TTS** tab, enabled by default.

  Doubao Speech has no chat model, so the provider page shows no **Check** button. Verify the credentials by generating speech as described below.

  <Callout type={'warning'}>
    Doubao Speech Synthesis 2.0 is billed at 3 CNY per 10,000 characters; every character, punctuation mark and space counts as one. Review the [Volcengine speech pricing](https://www.volcengine.com/docs/6561/1359370) before generating large amounts of audio.
  </Callout>
</Steps>

## Generate speech

Speech synthesis runs through the LobeHub text-to-speech API, which the LobeHub CLI (`lh`) and the OpenAI-compatible `POST /api/v1/audio/speech` endpoint both use:

```bash
lh generate tts "你好,LobeHub" -m doubaospeech/seed-tts-2.0 -o hello.mp3
```

- **Voice** — when no voice is given, Vivi 2.0 (`zh_female_vv_uranus_bigtts`) is used. Pass `--voice <voice_type>` to use another official 2.0 voice, for example `zh_male_m191_uranus_bigtts` (云舟) or `en_male_tim_uranus_bigtts` (Tim), or a voice clone of your own (`S_…`), which is sent to the voice-cloning resource `seed-icl-2.0` automatically and needs Doubao Voice Cloning 2.0 enabled. 1.0 voices (`*_moon_bigtts`, `*_mars_bigtts`) do not work with the 2.0 model.
- **Length** — each request is limited to 4,096 characters, because the audio is returned in a single response. Split longer text into several requests.
- **Format** — `mp3` (default) or `opus` (always 48 kHz).
- **Speed and volume** — `0.5` to `2`.
- **Pitch** — `-12` to `12` semitones.
- **Sample rate** — 8000, 16000, 22050, 24000 (default), 32000, 44100 or 48000 Hz.

## Troubleshooting

**"Doubao Speech API Key is incorrect or empty, please check your Doubao Speech API Key and try again."** — No credentials were found, only one of App ID and Access Token was filled in, or Volcengine rejected them. Enter a valid API key (or App ID + Access Token) in **App Settings → AI Providers → Doubao Speech**, or ask the administrator to set `DOUBAOSPEECH_API_KEY` on the server.

**"Enable the voice for this account…"** — The voice is not enabled for your account. Enable it in the Volcengine speech console, or pick another voice.

**"The voice does not belong to this model version…"** — A 1.0 voice was used with the 2.0 model, or Doubao Speech Synthesis 2.0 is not enabled for the account.

**Rate-limit or quota errors** — The account reached its concurrency limit (10 by default) or ran out of balance or trial quota. Check the Volcengine console.

For self-hosted deployments, see `DOUBAOSPEECH_API_KEY` in the [model provider environment variables](/docs/self-hosting/environment-variables/model-provider#doubao-speech).