Skip to main content
POST
Preview TTS voice

Authorizations

Authorization
string
header
required

Pass the API key in the Authorization header, You need to put Token keyword before the API key. e.g. 'Authorization: Token '

Query Parameters

projectId
string
required

Project identifier.

Example:

"ae6d58c6-c6bd-4ae0-ad74-b8b39c29928b"

Body

application/json
audioUrl
string<uri>
required

URL of the uploaded voice sample

Example:

"https://cdn.tryhamsa.com/uploads/voice.wav"

audioTranscription
string
required

Transcription of the uploaded audio sample

Required string length: 1 - 5000
Example:

"مرحباً، هذا مثال على التسجيل الصوتي."

language
enum<string>
required

Language of the preview voice

Available options:
en,
ar
Example:

"ar"

dialectId
string<uuid>
required

Dialect identifier (required for preview)

Example:

"145a7af6-3614-4bb2-be5d-702000d459ab"

text
string
required

Text to be synthesized using the preview voice

Required string length: 1 - 5000
Example:

"أهلاً بك، هذا مثال لنطق الصوت."

Response

Preview generated successfully.

success
boolean
Example:

true

message
string
Example:

"Operation completed successfully"

messageKey
string
Example:

"OPERATION_SUCCESSFUL"

data
object