v1

latestOpenAPI 3.0.1MIT2026-07-26104203277.0 KB

Create TTS voice

Create a new TTS voice under the current project.

post/v2/tts/voices

Request body

namestring required

Voice name (Arabic & English letters and numbers only)

descriptionstring nullable
audioUrlstring uri required

URL of the uploaded voice sample

audioTranscriptionstring required

Exact transcription of the uploaded audio sample

imageUrlstring uri nullable

Optional avatar image for the voice

projectIdstring uuid required
language'en' | 'ar' required

Voice language

dialectIdstring uuid nullable

Required when language is 'ar'. Must be omitted when language is 'en'.

tagsstring[] required

Exactly 2 tags: one gender + one voice style

Example request

{
  "name": "Support Assistant Female",
  "description": "Friendly female assistant voice",
  "audioUrl": "https://cdn.tryhamsa.com/uploads/voice.wav",
  "audioTranscription": "مرحباً، أنا مساعدك الصوتي.",
  "imageUrl": "https://cdn.tryhamsa.com/voices/avatar.png",
  "projectId": "ae6d58c6-c6bd-4ae0-ad74-b8b39c29928b",
  "language": "ar",
  "dialectId": "ae6d58c6-c6bd-4ae0-ad74-b8b39c29928b",
  "tags": [
    "female",
    "conversational"
  ]
}

Response

Voice created successfully.

successboolean
messagestring
messageKeystring

Example response

{
  "success": true,
  "message": "Operation completed successfully",
  "messageKey": "OPERATION_SUCCESSFUL",
  "data": {
    "id": "48f7656f-098b-4c43-b165-7cfd2cc8ac30",
    "voiceRecord": "test.wav"
  }
}