Skip to main content
POST
/
v3
/
glm-tts
GLM Text-to-Speech
curl --request POST \
  --url https://api.highwayapi.ai/v3/glm-tts \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "input": "<string>",
  "speed": 123,
  "voice": "<string>",
  "volume": 123,
  "response_format": "<string>",
  "watermark_enabled": true
}
'
Use GLM-TTS to convert text into natural speech, with support for multiple voices, emotion control, and intonation adjustment.

Request Headers

Content-Type
string
required
Enum value: application/json
Authorization
string
required
Bearer authentication format: Bearer {{API Key}}.

Request Body

input
string
required
The text to convert to speechLength limit: 0 - 1024
speed
number
default:1
Speech rate, default is 1.0, value range [0.5, 2]Value range: [0.5, 2]
voice
string
default:"tongtong"
required
The voice used when generating audio. Supports two types: system voices and cloned voices. System voices include: tongtong (Tongtong, default voice), chuichui (Chuichui), xiaochen (Xiaochen), jam (Dongdong Animal Circle jam voice), kazi (Dongdong Animal Circle kazi voice), douji (Dongdong Animal Circle douji voice), luodo (Dongdong Animal Circle luodo voice)
volume
number
default:1
Volume, default is 1.0, value range (0, 10]Value range: [0, 10]
response_format
string
default:"pcm"
Audio output format. By default, a file in pcm format is returned.Available values: wav, pcm
watermark_enabled
boolean
Controls whether a watermark is added to AI-generated audio. true: Explicit AI-generated watermarking and implicit digital watermarking are enabled by default, in compliance with policy requirements. false: Disables all watermarks, and only takes effect for users who have completed the watermark removal process.

Response Information

The business processing succeeded. The recommended sample rate is 24000. Format: binary