Create speech

Generate speech from provided text.

post/audio/speech

Request

  • Base URL: https://api.shortgenius.com/v1
  • URL: https://api.shortgenius.com/v1/audio/speech
  • Auth: HTTP bearer

Request body

textstring required

The text to generate speech from.

locale'af-ZA' | 'id-ID' | 'ms-MY' | 'ca-ES' | 'cs-CZ' | 'da-DK' | 'de-DE' | 'en-US' | 'es-ES' | 'es-419' | 'fr-CA' | 'fr-FR' | 'hr-HR' | 'it-IT' | 'hu-HU' | 'nl-NL' | 'no-NO' | 'pl-PL' | 'pt-BR' | 'pt-PT' | 'ro-RO' | 'sk-SK' | 'fi-FI' | 'sv-SE' | 'vi-VN' | 'tr-TR' | 'el-GR' | 'ru-RU' | 'sr-SP' | 'uk-UA' | 'hy-AM' | 'he-IL' | 'ur-PK' | 'ar-SA' | 'hi-IN' | 'th-TH' | 'ko-KR' | 'ja-JP' | 'zh-CN' | 'zh-TW' | 'auto'

The locale of the text.

voice_idstring required

The voice to use for speech generation. See the List voices endpoint.

wait_for_generationboolean

If false, this endpoint immediately returns the incomplete speech record, and you can poll the Get speech endpoint until the task completes. If true, this endpoint waits until the speech generation completes, then returns the complete speech record. Defaults to false.

Response

Successful response

idstring uuid required

Unique ID of the audio.

created_atstring required

Date and time (ISO 8601) when the audio media was created.

updated_atstring nullable

Date and time (ISO 8601) when the audio media was last updated.

urlstring nullable required

URL of the audio. Only available after the audio is generated.

user_idstring uuid required

ID of the user who generated the audio.

category'AIGeneratedAudio' | 'AIGeneratedAudioForVideo' | 'AIGeneratedMusic' required

Category of the audio.

state'pending' | 'generating' | 'completed' | 'error' required

State of the audio generation.

textstring nullable

Source text of the audio.

locale'af-ZA' | 'id-ID' | 'ms-MY' | 'ca-ES' | 'cs-CZ' | 'da-DK' | 'de-DE' | 'en-US' | 'es-ES' | 'es-419' | 'fr-CA' | 'fr-FR' | 'hr-HR' | 'it-IT' | 'hu-HU' | 'nl-NL' | 'no-NO' | 'pl-PL' | 'pt-BR' | 'pt-PT' | 'ro-RO' | 'sk-SK' | 'fi-FI' | 'sv-SE' | 'vi-VN' | 'tr-TR' | 'el-GR' | 'ru-RU' | 'sr-SP' | 'uk-UA' | 'hy-AM' | 'he-IL' | 'ur-PK' | 'ar-SA' | 'hi-IN' | 'th-TH' | 'ko-KR' | 'ja-JP' | 'zh-CN' | 'zh-TW' | 'null' nullable

Locale of the audio to guide the AI. Auto-detected if not provided.

durationnumber nullable

Duration of the generated audio. Only available after the audio is generated.

lufsnumber nullable

Loudness normalization value in LUFS. Only available after the audio is generated.

Changes

No recorded changes to this operation across all 1 revision of this API.