Obter vozes disponíveis
curl --request GET \
--url https://app.mayahub.ai/api/user/assistants/voices \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.mayahub.ai/api/user/assistants/voices"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.mayahub.ai/api/user/assistants/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://app.mayahub.ai/api/user/assistants/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: Bearer <token>"
],
]);
$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://app.mayahub.ai/api/user/assistants/voices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.mayahub.ai/api/user/assistants/voices")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.mayahub.ai/api/user/assistants/voices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": 1,
"name": "Sarah",
"mode": "pipeline"
},
{
"id": 2,
"name": "Michael",
"mode": "pipeline"
},
{
"id": 3,
"name": "Emma",
"mode": "multimodal"
},
{
"id": 4,
"name": "David",
"mode": "multimodal"
},
{
"id": 5,
"name": "Sophia",
"mode": "pipeline"
}
]
Assistentes
Obter vozes disponíveis
Recuperar todas as vozes disponíveis para configuração de assistentes
GET
/
user
/
assistants
/
voices
Obter vozes disponíveis
curl --request GET \
--url https://app.mayahub.ai/api/user/assistants/voices \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.mayahub.ai/api/user/assistants/voices"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.mayahub.ai/api/user/assistants/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://app.mayahub.ai/api/user/assistants/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: Bearer <token>"
],
]);
$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://app.mayahub.ai/api/user/assistants/voices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.mayahub.ai/api/user/assistants/voices")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.mayahub.ai/api/user/assistants/voices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": 1,
"name": "Sarah",
"mode": "pipeline"
},
{
"id": 2,
"name": "Michael",
"mode": "pipeline"
},
{
"id": 3,
"name": "Emma",
"mode": "multimodal"
},
{
"id": 4,
"name": "David",
"mode": "multimodal"
},
{
"id": 5,
"name": "Sophia",
"mode": "pipeline"
}
]
Este endpoint retorna uma lista de todas as vozes disponíveis que podem ser usadas ao criar ou atualizar assistentes, com filtragem opcional por modo do assistente.
Parâmetros de consulta
string
Filtrar vozes pelo modo do assistente. Opções: pipeline, multimodal
Campos de resposta
array
[
{
"id": 1,
"name": "Sarah",
"mode": "pipeline"
},
{
"id": 2,
"name": "Michael",
"mode": "pipeline"
},
{
"id": 3,
"name": "Emma",
"mode": "multimodal"
},
{
"id": 4,
"name": "David",
"mode": "multimodal"
},
{
"id": 5,
"name": "Sophia",
"mode": "pipeline"
}
]
Observações
- Utilize o campo id ao criar ou atualizar assistentes.
- O campo mode indica com qual motor de assistente a voz é compatível.
- Filtre por mode para obter apenas vozes compatíveis com o tipo de assistente desejado.
- Se nenhum filtro de mode for fornecido, todas as vozes disponíveis são retornadas.
- Apenas vozes públicas ou pertencentes ao usuário autenticado são retornadas.

