List TTS voices
curl --request GET \
--url https://api.tryhamsa.com/v2/tts/voices \
--header 'Authorization: <api-key>'import requests
url = "https://api.tryhamsa.com/v2/tts/voices"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.tryhamsa.com/v2/tts/voices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryhamsa.com/v2/tts/voices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tryhamsa.com/v2/tts/voices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tryhamsa.com/v2/tts/voices")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryhamsa.com/v2/tts/voices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Operation completed successfully",
"messageKey": "OPERATION_SUCCESSFUL",
"data": {
"voices": [
{
"id": "633f19a6-089b-4950-bfab-55f5c750732e",
"language": "ar",
"name": "Aisha",
"tags": [
"female",
"conversational"
],
"voiceRecord": "https://cdn.tryhamsa.com/tts-voices/Aisha.wav",
"createdAt": "2025-12-18T11:21:36.182Z",
"isFavourite": false,
"usedInJobs": true,
"usedInVoiceAgents": true,
"dialectId": "6ac0324d-bcb9-40f3-a57a-de6da7b721c8",
"dialect": {
"name": "Oman",
"languageCode": "oma"
},
"image": "https://cdn.tryhamsa.com/tts-voices-images/aisha.jpg"
}
],
"totalPages": 5,
"page": 1,
"totalCount": 50
}
}{
"code": 9400,
"message": "Field must be a string!",
"messageKey": "FieldMustBeString"
}{
"success": false,
"code": 500,
"message": "Internal server error"
}Voice Cloning
List TTS voices
Retrieve available TTS voices with optional filtering, pagination, and source flags.
GET
/
v2
/
tts
/
voices
List TTS voices
curl --request GET \
--url https://api.tryhamsa.com/v2/tts/voices \
--header 'Authorization: <api-key>'import requests
url = "https://api.tryhamsa.com/v2/tts/voices"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.tryhamsa.com/v2/tts/voices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryhamsa.com/v2/tts/voices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tryhamsa.com/v2/tts/voices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tryhamsa.com/v2/tts/voices")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryhamsa.com/v2/tts/voices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Operation completed successfully",
"messageKey": "OPERATION_SUCCESSFUL",
"data": {
"voices": [
{
"id": "633f19a6-089b-4950-bfab-55f5c750732e",
"language": "ar",
"name": "Aisha",
"tags": [
"female",
"conversational"
],
"voiceRecord": "https://cdn.tryhamsa.com/tts-voices/Aisha.wav",
"createdAt": "2025-12-18T11:21:36.182Z",
"isFavourite": false,
"usedInJobs": true,
"usedInVoiceAgents": true,
"dialectId": "6ac0324d-bcb9-40f3-a57a-de6da7b721c8",
"dialect": {
"name": "Oman",
"languageCode": "oma"
},
"image": "https://cdn.tryhamsa.com/tts-voices-images/aisha.jpg"
}
],
"totalPages": 5,
"page": 1,
"totalCount": 50
}
}{
"code": 9400,
"message": "Field must be a string!",
"messageKey": "FieldMustBeString"
}{
"success": false,
"code": 500,
"message": "Internal server error"
}Authorizations
Pass the API key in the Authorization header, You need to put Token keyword before the API key. e.g. 'Authorization: Token '
Query Parameters
Search query string.
Example:
"test"
Current page number.
Example:
1
Number of voices per page.
Example:
10
Filter voices by source. jobs for media voices, voice_agents for agents voices.
Available options:
jobs, voice_agents Example:
"voice_agents"
Filter by recently used flag.
Example:
true
Return all voices when true.
Example:
false
Filter by voices owned by the user.
Example:
true
Filter favourite voices.
Example:
true
Filter by one or more genders.
Available options:
male, female Example:
["male", "female"]
Filter by one or more languages.
Available options:
ar, en Example:
["ar", "en"]
Filter by one or more styles.
Available options:
narrator, conversational Example:
["narrator", "conversational"]
Filter by one or more dialect IDs (UUID).
Example:
[ "ae6d58c6-c6bd-4ae0-ad74-b8b39c29928b", "2b9d0f7e-6c1b-4a41-9e41-3a7e6f5d9a11" ]
Project identifier.
Example:
"ae6d58c6-c6bd-4ae0-ad74-b8b39c29928b"
Was this page helpful?