Référence API de Seed Speech 2.0
41 voix dont tu règles le ton en langage courant
Une seule clé API PopNow suffit pour appeler Seed Speech 2.0 depuis votre code. Vous trouverez ici les identifiants de modèle à envoyer, chaque champ d’entrée accepté, le coût d’une requête en crédits et une requête à coller telle quelle dans un terminal.
Les descriptions des paramètres proviennent du schéma d’entrée du modèle et ne sont disponibles qu’en anglais.
En bref
- Éditeur
- ByteDance
- Résultat
- Audio
- À partir de
- 10.8 crédits pour 1 000 caractères ($0.108)
- Durée habituelle
- environ 9 s
- Identifiants de modèle
1 crédit = 0,01 $. À l’acceptation, une tâche réserve le montant maximal possible, puis facture la consommation réelle à la fin, arrondie au crédit supérieur ; le reste est libéré. Une tâche en échec n’est pas facturée. Pour connaître le montant exact avant de lancer, appelez POST /api/v1/jobs/quote.
Synthèse vocale
bytedance/seed-speech-2.0/text-to-speech
Prix
| Option | Crédits (pour 1 000 caractères) | Dollars US |
|---|---|---|
Par défaut | 10.8 | $0.108 |
Paramètres
| Champ | Type | Valeur par défaut | Valeurs admises | Rôle |
|---|---|---|---|---|
textObligatoire | string | — | jusqu’à 5 000 caractères | The words to be spoken, exactly as written. Billed per 1,000 characters. |
voice_idFacultatif | string | stokie_en | vivi_mixed_en_zh_ja_es_id, mindy_en_es_id_pt_zh, stokie_en, dacey_en, tim_en, kian_en_zh, cedric_en_zh, sophie_en_zh, jean_en_zh, magnus_en_zh, mabel_en_zh, nadia_en_zh, opal_en_zh, pearl_en_zh, … (+27) | Preset voice. The suffix shows the languages it is built for. |
instructionsFacultatif | string | — | jusqu’à 1 000 caractères | How to read the text: tone, emotion, pace or volume. Not spoken and not billed. |
speedFacultatif | number | 1 | de 0.5 à 2 | Speaking rate; 1 is the voice's normal pace. |
pitchFacultatif | integer | 0 | de -12 à 12 | Pitch shift in semitones; 0 keeps the voice's own pitch. |
volumeFacultatif | number | 1 | de 0.5 à 2 | Loudness multiplier; 1 is the normal level. |
languageFacultatif | string | — | zh, en, ja, es-mx, id, pt-br, ko, it, de, fr | Forces the reading language. Leave empty to detect it from the text. |
output_formatFacultatif | string | mp3 | mp3, opus | File format of the result; opus is an Ogg Opus file. |
sample_rateFacultatif | integer | — | 8000, 16000, 22050, 24000, 32000, 44100, 48000 | Sample rate in Hz. The model uses 24000 when omitted. |
Exemple de requête
Cette requête fonctionne telle quelle ; les champs omis gardent leur valeur par défaut. Placez d’abord votre clé dans POPNOW_API_KEY.
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask?wait=60" \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "bytedance/seed-speech-2.0/text-to-speech",
"input": {
"text": "Hi there! This voice was created with the PopNow API in just a few seconds."
}
}'La réponse contient tout de suite un taskId. Récupérez le résultat avec GET /api/v1/jobs/recordInfo, ou ajoutez callBackUrl pour être prévenu.
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
-H "Authorization: Bearer $POPNOW_API_KEY"
