Skip to content

Latest commit

 

History

History
448 lines (309 loc) · 5.81 KB

File metadata and controls

448 lines (309 loc) · 5.81 KB

Reference

Tts Audio

client.tts.audio.speech(...)

📝 Description

Gets the speech data for the given input

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.audio.speech(
    input="input",
    voice_id="voice_id",
)

⚙️ Parameters

input: str

Plain text or SSML to be synthesized to speech. Refer to https://docs.speechify.ai/docs/api-limits for the input size limits. Emotion, Pitch and Speed Rate are configured in the ssml input, please refer to the ssml documentation for more information: https://docs.speechify.ai/docs/ssml#prosody

voice_id: str — Id of the voice to be used for synthesizing speech. Refer to /v1/voices endpoint for available voices

audio_format: typing.Optional[GetSpeechRequestAudioFormat] — The format for the output audio. Note, that the current default is "wav", but there's no guarantee it will not change in the future. We recommend always passing the specific param you expect.

language: typing.Optional[str]

Language of the input. Follow the format of an ISO 639-1 language code and an ISO 3166-1 region code, separated by a hyphen, e.g. en-US. Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support.

model: typing.Optional[GetSpeechRequestModel] — Model used for audio synthesis. simba-base and simba-turbo are deprecated. Use simba-english or simba-multilingual instead.

options: typing.Optional[GetSpeechOptionsRequest]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Tts Auth

client.tts.auth.create_access_token(...)

📝 Description

WARNING: This endpoint is deprecated. Create a new API token for the logged in user.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.auth.create_access_token()

⚙️ Parameters

scope: typing.Optional[CreateAccessTokenRequestScope]

The scope, or a space-delimited list of scopes the token is requested for in: body

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Tts Voices

client.tts.voices.list()

📝 Description

Gets the list of voices available for the user

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.voices.list()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.voices.create(...)

📝 Description

Create a personal (cloned) voice for the user

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.voices.create(
    name="name",
    gender="male",
    consent="consent",
)

⚙️ Parameters

name: str — Name of the personal voice

gender: VoicesCreateRequestGender

Gender marker for the personal voice male GenderMale female GenderFemale notSpecified GenderNotSpecified

sample: `from future import annotations

core.File` — See core.File for more documentation

consent: str

A string representing the user consent information in JSON format This should include the fullName and email of the consenting individual. For example, {"fullName": "John Doe", "email": "john@example.com"}

locale: typing.Optional[str] — Native language (locale) of the personal voice (e.g. en-US, es-ES, etc.)

avatar: `from future import annotations

typing.Optional[core.File]` — See core.File for more documentation

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.voices.delete(...)

📝 Description

Delete a personal (cloned) voice

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.voices.delete(
    id="id",
)

⚙️ Parameters

id: str — The ID of the voice to delete

request_options: typing.Optional[RequestOptions] — Request-specific configuration.