ข้ามไปยังเนื้อหา
Helix Voice เอกสาร
เว็บไซต์เปิดคอนโซล

ข้อมูลอ้างอิง API

API เสียงสำหรับนักพัฒนา

Generate speech, manage owned voices, and transcribe Mandarin audio.

Use https://api.helixvoice.net with the versioned paths below and a production API key. Each endpoint requires its listed scope. Calls run on your application server.

Scope: capabilities:read.

GET /v1/capabilities

The data object describes the connected environment. Relevant fields include maxTextCharacters, maxUploadBytes, maxTranscriptionSeconds, transcriptionLanguages, userDailyLimit, requestsPerMinute, historyDays.

Read these limits before uploads or generation. They can differ from the defaults in this documentation.

Scope: voices:read.

GET /v1/voices

Returns available public and account-owned private voices. Use a returned voice id for generation. Metadata includes the name, language, and other catalog descriptors.

Scope: speech:write.

เทอร์มินัล
curl --fail-with-body \
'https://api.helixvoice.net/v1/audio/speech' \
-H "Authorization: Bearer ${HELIXVOICE_API_KEY}" \
-H 'Content-Type: application/json' \
-d '{"input":"Hello, welcome to Helix Voice.","voice":"demo"}'
Field Type Description
input string Required text within the environment’s character limit
voice string Required public or owned voice ID

HTTP 200 returns a JSON data object with id, text, voice, durationMs, createdAt, and audioPath. This generation request returns metadata; download the non-streaming WAV separately using audioPath and a key with generations:read from the same account. audioPath starts with /v1/generations/; resolve it against https://api.helixvoice.net.

GET requires generations:read; DELETE requires generations:write.

Method Path Result
GET /v1/generations Up to 100 recent unexpired account records
GET /v1/generations/{id}/audio Authenticated WAV bytes
DELETE /v1/generations/{id} Delete an owned record and its audio
เทอร์มินัล
curl --fail-with-body \
'https://api.helixvoice.net/v1/generations/<generation-id>/audio' \
-H "Authorization: Bearer ${HELIXVOICE_API_KEY}" \
--output speech.wav

Replace <generation-id> with the successful generation ID. Check the status and content type before playing the output. The audio resource is private and subject to retention.

Scope: voices:write.

เทอร์มินัล
curl --fail-with-body \
'https://api.helixvoice.net/v1/voices' \
-H "Authorization: Bearer ${HELIXVOICE_API_KEY}" \
-F 'file=@reference.wav' \
-F 'name=My voice' \
-F 'language=en-US' \
-F 'transcript=These are the exact words in my reference recording.' \
-F 'consent=true'

All five fields are required. language accepts zh-CN or en-US. Use an accurate transcript, a 1–30 second reference, and a file within the upload limit. Do not manually set Content-Type for multipart uploads; curl supplies the boundary.

Delete an owned private voice with DELETE /v1/voices/{id}.

Scope: transcriptions:write.

เทอร์มินัล
curl --fail-with-body \
'https://api.helixvoice.net/v1/audio/transcriptions' \
-H "Authorization: Bearer ${HELIXVOICE_API_KEY}" \
-F 'file=@mandarin.wav' \
-F 'language=zh-CN'

file is required. language defaults to zh-CN and also accepts auto; the deployed capability remains Mandarin. Successful data.text contains the transcript. The default duration limit is 180 seconds and the upload limit is 20 MiB.

Successful JSON operations return data. Deletion returns HTTP 204 with no body. Failures use HTTP error statuses and error. Every authorized request counts toward key request limits, including lists and downloads. Speech operations also share the account and global budgets. See errors and rate limits.