import { SyllableSDK } from "syllable-sdk";
const syllableSDK = new SyllableSDK({
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
});
async function run() {
const result = await syllableSDK.voiceGroups.update({
name: "Call Center 1 Languages",
description: "Languages spoken by operators at Call Center 1",
languageConfigs: [
{
languageCode: "en-US",
voiceProvider: "OpenAI",
voiceDisplayName: "Alloy",
dtmfCode: 1,
},
{
languageCode: "es-US",
voiceProvider: "Google",
voiceDisplayName: "es-US-Neural2-B",
dtmfCode: 2,
},
],
skipCurrentLanguageInMessage: true,
id: 1,
editComments: "Added Spanish support.",
});
console.log(result);
}
run();import os
from syllable_sdk import SyllableSDK, models
with SyllableSDK(
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:
res = ss_client.voice_groups.update(request={
"name": "Call Center 1 Languages",
"description": "Languages spoken by operators at Call Center 1",
"language_configs": [
{
"language_code": models.LanguageCode.EN_US,
"voice_provider": models.TtsProvider.OPEN_AI,
"voice_display_name": models.AgentVoiceDisplayName.ALLOY,
"dtmf_code": 1,
},
{
"language_code": models.LanguageCode.ES_US,
"voice_provider": models.TtsProvider.GOOGLE,
"voice_display_name": models.AgentVoiceDisplayName.ES_US_NEURAL2_B,
"dtmf_code": 2,
},
],
"skip_current_language_in_message": True,
"id": 1,
"edit_comments": "Added Spanish support.",
})
# Handle response
print(res)curl --request PUT \
--url https://api.syllable.cloud/api/v1/voice_groups/ \
--header 'Content-Type: application/json' \
--header 'Syllable-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"language_configs": [
{
"dtmf_code": 123,
"voice_speed": 1,
"voice_pitch": 0
}
],
"skip_current_language_in_message": true,
"id": 123,
"description": "Languages spoken by operators at Call Center 1",
"edit_comments": "Added Spanish support."
}
'const options = {
method: 'PUT',
headers: {'Syllable-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
language_configs: [{dtmf_code: 123, voice_speed: 1, voice_pitch: 0}],
skip_current_language_in_message: true,
id: 123,
description: 'Languages spoken by operators at Call Center 1',
edit_comments: 'Added Spanish support.'
})
};
fetch('https://api.syllable.cloud/api/v1/voice_groups/', 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.syllable.cloud/api/v1/voice_groups/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'language_configs' => [
[
'dtmf_code' => 123,
'voice_speed' => 1,
'voice_pitch' => 0
]
],
'skip_current_language_in_message' => true,
'id' => 123,
'description' => 'Languages spoken by operators at Call Center 1',
'edit_comments' => 'Added Spanish support.'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Syllable-API-Key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.syllable.cloud/api/v1/voice_groups/"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"language_configs\": [\n {\n \"dtmf_code\": 123,\n \"voice_speed\": 1,\n \"voice_pitch\": 0\n }\n ],\n \"skip_current_language_in_message\": true,\n \"id\": 123,\n \"description\": \"Languages spoken by operators at Call Center 1\",\n \"edit_comments\": \"Added Spanish support.\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Syllable-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.syllable.cloud/api/v1/voice_groups/")
.header("Syllable-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"language_configs\": [\n {\n \"dtmf_code\": 123,\n \"voice_speed\": 1,\n \"voice_pitch\": 0\n }\n ],\n \"skip_current_language_in_message\": true,\n \"id\": 123,\n \"description\": \"Languages spoken by operators at Call Center 1\",\n \"edit_comments\": \"Added Spanish support.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.syllable.cloud/api/v1/voice_groups/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Syllable-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"language_configs\": [\n {\n \"dtmf_code\": 123,\n \"voice_speed\": 1,\n \"voice_pitch\": 0\n }\n ],\n \"skip_current_language_in_message\": true,\n \"id\": 123,\n \"description\": \"Languages spoken by operators at Call Center 1\",\n \"edit_comments\": \"Added Spanish support.\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"language_configs": [
{
"dtmf_code": 123,
"voice_speed": 1,
"voice_pitch": 0
}
],
"skip_current_language_in_message": true,
"id": 123,
"updated_at": "2023-11-07T05:31:56Z",
"last_updated_by": "<string>",
"description": "Languages spoken by operators at Call Center 1",
"edit_comments": "Added Spanish support.",
"agents_info": [
{
"id": 1,
"name": "Test Agent"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Update Voice Group
Update an existing voice group
import { SyllableSDK } from "syllable-sdk";
const syllableSDK = new SyllableSDK({
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
});
async function run() {
const result = await syllableSDK.voiceGroups.update({
name: "Call Center 1 Languages",
description: "Languages spoken by operators at Call Center 1",
languageConfigs: [
{
languageCode: "en-US",
voiceProvider: "OpenAI",
voiceDisplayName: "Alloy",
dtmfCode: 1,
},
{
languageCode: "es-US",
voiceProvider: "Google",
voiceDisplayName: "es-US-Neural2-B",
dtmfCode: 2,
},
],
skipCurrentLanguageInMessage: true,
id: 1,
editComments: "Added Spanish support.",
});
console.log(result);
}
run();import os
from syllable_sdk import SyllableSDK, models
with SyllableSDK(
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:
res = ss_client.voice_groups.update(request={
"name": "Call Center 1 Languages",
"description": "Languages spoken by operators at Call Center 1",
"language_configs": [
{
"language_code": models.LanguageCode.EN_US,
"voice_provider": models.TtsProvider.OPEN_AI,
"voice_display_name": models.AgentVoiceDisplayName.ALLOY,
"dtmf_code": 1,
},
{
"language_code": models.LanguageCode.ES_US,
"voice_provider": models.TtsProvider.GOOGLE,
"voice_display_name": models.AgentVoiceDisplayName.ES_US_NEURAL2_B,
"dtmf_code": 2,
},
],
"skip_current_language_in_message": True,
"id": 1,
"edit_comments": "Added Spanish support.",
})
# Handle response
print(res)curl --request PUT \
--url https://api.syllable.cloud/api/v1/voice_groups/ \
--header 'Content-Type: application/json' \
--header 'Syllable-API-Key: <api-key>' \
--data '
{
"name": "<string>",
"language_configs": [
{
"dtmf_code": 123,
"voice_speed": 1,
"voice_pitch": 0
}
],
"skip_current_language_in_message": true,
"id": 123,
"description": "Languages spoken by operators at Call Center 1",
"edit_comments": "Added Spanish support."
}
'const options = {
method: 'PUT',
headers: {'Syllable-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
language_configs: [{dtmf_code: 123, voice_speed: 1, voice_pitch: 0}],
skip_current_language_in_message: true,
id: 123,
description: 'Languages spoken by operators at Call Center 1',
edit_comments: 'Added Spanish support.'
})
};
fetch('https://api.syllable.cloud/api/v1/voice_groups/', 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.syllable.cloud/api/v1/voice_groups/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'language_configs' => [
[
'dtmf_code' => 123,
'voice_speed' => 1,
'voice_pitch' => 0
]
],
'skip_current_language_in_message' => true,
'id' => 123,
'description' => 'Languages spoken by operators at Call Center 1',
'edit_comments' => 'Added Spanish support.'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Syllable-API-Key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.syllable.cloud/api/v1/voice_groups/"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"language_configs\": [\n {\n \"dtmf_code\": 123,\n \"voice_speed\": 1,\n \"voice_pitch\": 0\n }\n ],\n \"skip_current_language_in_message\": true,\n \"id\": 123,\n \"description\": \"Languages spoken by operators at Call Center 1\",\n \"edit_comments\": \"Added Spanish support.\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Syllable-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.syllable.cloud/api/v1/voice_groups/")
.header("Syllable-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"language_configs\": [\n {\n \"dtmf_code\": 123,\n \"voice_speed\": 1,\n \"voice_pitch\": 0\n }\n ],\n \"skip_current_language_in_message\": true,\n \"id\": 123,\n \"description\": \"Languages spoken by operators at Call Center 1\",\n \"edit_comments\": \"Added Spanish support.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.syllable.cloud/api/v1/voice_groups/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Syllable-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"language_configs\": [\n {\n \"dtmf_code\": 123,\n \"voice_speed\": 1,\n \"voice_pitch\": 0\n }\n ],\n \"skip_current_language_in_message\": true,\n \"id\": 123,\n \"description\": \"Languages spoken by operators at Call Center 1\",\n \"edit_comments\": \"Added Spanish support.\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"language_configs": [
{
"dtmf_code": 123,
"voice_speed": 1,
"voice_pitch": 0
}
],
"skip_current_language_in_message": true,
"id": 123,
"updated_at": "2023-11-07T05:31:56Z",
"last_updated_by": "<string>",
"description": "Languages spoken by operators at Call Center 1",
"edit_comments": "Added Spanish support.",
"agents_info": [
{
"id": 1,
"name": "Test Agent"
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Body
Request model to update an existing voice group.
The name of the language group.
"Call Center 1 Languages"
Voice and DTMF configurations for each language in the group.
Show child attributes
Show child attributes
[ { "dtmf_code": 1, "language_code": "en-US", "voice_display_name": "Alloy", "voice_provider": "OpenAI" }, { "dtmf_code": 2, "language_code": "es-US", "voice_display_name": "es-US-Neural2-B", "voice_provider": "Google" } ]
Whether a custom message using the language group to generate a language DTMF menu should skip the agent's current language in the menu.
true
The ID of the language group to update.
1
Description of the language group.
"Languages spoken by operators at Call Center 1"
Comments for the most recent edit to the language group.
"Added Spanish support."
Response
Successful Response
Response model for voice group operations. A voice group is a collection of language, voice, and DTMF configuration that can be linked to an agent to define the languages and voices it supports. For more information, see Console docs.
The name of the language group.
"Call Center 1 Languages"
Voice and DTMF configurations for each language in the group.
Show child attributes
Show child attributes
[ { "dtmf_code": 1, "language_code": "en-US", "voice_display_name": "Alloy", "voice_provider": "OpenAI" }, { "dtmf_code": 2, "language_code": "es-US", "voice_display_name": "es-US-Neural2-B", "voice_provider": "Google" } ]
Whether a custom message using the language group to generate a language DTMF menu should skip the agent's current language in the menu.
true
The ID of the language group to update.
1
Timestamp of the last update to the language group.
"2024-01-01T00:00:00Z"
Email of the user who last updated the language group.
"user@mail.com"
Description of the language group.
"Languages spoken by operators at Call Center 1"
Comments for the most recent edit to the language group.
"Added Spanish support."
IDs and names of the agents linked to the language group
Show child attributes
Show child attributes
[{ "id": 1, "name": "Test Agent" }]

