mirror of
https://github.com/jambonz/jambonz-api-server.git
synced 2026-01-25 02:08:24 +00:00
Compare commits
1 Commits
v0.8.5-14
...
fix/sql_is
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae62244904 |
19
app.js
19
app.js
@@ -8,7 +8,6 @@ const rateLimit = require('express-rate-limit');
|
||||
const cors = require('cors');
|
||||
const passport = require('passport');
|
||||
const routes = require('./lib/routes');
|
||||
const Registrar = require('@jambonz/mw-registrar');
|
||||
|
||||
assert.ok(process.env.JAMBONES_MYSQL_HOST &&
|
||||
process.env.JAMBONES_MYSQL_USER &&
|
||||
@@ -36,7 +35,6 @@ const {
|
||||
logger, process.env.JAMBONES_TIME_SERIES_HOST
|
||||
);
|
||||
const {
|
||||
client,
|
||||
retrieveCall,
|
||||
deleteCall,
|
||||
listCalls,
|
||||
@@ -46,14 +44,17 @@ const {
|
||||
addKey,
|
||||
retrieveKey,
|
||||
deleteKey,
|
||||
incrKey
|
||||
incrKey,
|
||||
JAMBONES_REDIS_SENTINELS
|
||||
} = require('./lib/helpers/realtimedb-helpers');
|
||||
const {
|
||||
getTtsVoices,
|
||||
getTtsSize,
|
||||
purgeTtsCache,
|
||||
synthAudio
|
||||
} = require('@jambonz/speech-utils')({}, logger);
|
||||
purgeTtsCache
|
||||
} = require('@jambonz/speech-utils')(JAMBONES_REDIS_SENTINELS || {
|
||||
host: process.env.JAMBONES_REDIS_HOST,
|
||||
port: process.env.JAMBONES_REDIS_PORT || 6379
|
||||
}, logger);
|
||||
const {
|
||||
lookupAppBySid,
|
||||
lookupAccountBySid,
|
||||
@@ -61,8 +62,7 @@ const {
|
||||
lookupAppByPhoneNumber,
|
||||
lookupCarrierBySid,
|
||||
lookupSipGatewayBySid,
|
||||
lookupSmppGatewayBySid,
|
||||
lookupClientByAccountAndUsername
|
||||
lookupSmppGatewayBySid
|
||||
} = require('@jambonz/db-helpers')({
|
||||
host: process.env.JAMBONES_MYSQL_HOST,
|
||||
user: process.env.JAMBONES_MYSQL_USER,
|
||||
@@ -81,7 +81,6 @@ passport.use(authStrategy);
|
||||
app.locals = app.locals || {};
|
||||
app.locals = {
|
||||
...app.locals,
|
||||
registrar: new Registrar(logger, client),
|
||||
logger,
|
||||
retrieveCall,
|
||||
deleteCall,
|
||||
@@ -96,7 +95,6 @@ app.locals = {
|
||||
getTtsVoices,
|
||||
getTtsSize,
|
||||
purgeTtsCache,
|
||||
synthAudio,
|
||||
lookupAppBySid,
|
||||
lookupAccountBySid,
|
||||
lookupAccountByPhoneNumber,
|
||||
@@ -104,7 +102,6 @@ app.locals = {
|
||||
lookupCarrierBySid,
|
||||
lookupSipGatewayBySid,
|
||||
lookupSmppGatewayBySid,
|
||||
lookupClientByAccountAndUsername,
|
||||
queryCdrs,
|
||||
queryCdrsSP,
|
||||
queryAlerts,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
/* SQLEditor (MySQL (2))*/
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=0;
|
||||
|
||||
DROP TABLE IF EXISTS account_static_ips;
|
||||
@@ -54,8 +53,6 @@ DROP TABLE IF EXISTS signup_history;
|
||||
|
||||
DROP TABLE IF EXISTS smpp_addresses;
|
||||
|
||||
DROP TABLE IF EXISTS google_custom_voices;
|
||||
|
||||
DROP TABLE IF EXISTS speech_credentials;
|
||||
|
||||
DROP TABLE IF EXISTS system_information;
|
||||
@@ -139,9 +136,6 @@ account_sid CHAR(36) NOT NULL,
|
||||
is_active BOOLEAN NOT NULL DEFAULT 1,
|
||||
username VARCHAR(64),
|
||||
password VARCHAR(1024),
|
||||
allow_direct_app_calling BOOLEAN NOT NULL DEFAULT 1,
|
||||
allow_direct_queue_calling BOOLEAN NOT NULL DEFAULT 1,
|
||||
allow_direct_user_calling BOOLEAN NOT NULL DEFAULT 1,
|
||||
PRIMARY KEY (client_sid)
|
||||
);
|
||||
|
||||
@@ -162,7 +156,7 @@ regex VARCHAR(32) NOT NULL COMMENT 'regex-based pattern match against dialed num
|
||||
description VARCHAR(1024),
|
||||
priority INTEGER NOT NULL COMMENT 'lower priority routes are attempted first',
|
||||
PRIMARY KEY (lcr_route_sid)
|
||||
) COMMENT='An ordered list of digit patterns in an LCR table. The pat';
|
||||
) COMMENT='An ordered list of digit patterns in an LCR table. The patterns are tested in sequence until one matches';
|
||||
|
||||
CREATE TABLE lcr
|
||||
(
|
||||
@@ -173,7 +167,7 @@ default_carrier_set_entry_sid CHAR(36) COMMENT 'default carrier/route to use whe
|
||||
service_provider_sid CHAR(36),
|
||||
account_sid CHAR(36),
|
||||
PRIMARY KEY (lcr_sid)
|
||||
) COMMENT='An LCR (least cost routing) table that is used by a service ';
|
||||
) COMMENT='An LCR (least cost routing) table that is used by a service provider or account to make decisions about routing outbound calls when multiple carriers are available.';
|
||||
|
||||
CREATE TABLE password_settings
|
||||
(
|
||||
@@ -344,16 +338,6 @@ label VARCHAR(64),
|
||||
PRIMARY KEY (speech_credential_sid)
|
||||
);
|
||||
|
||||
CREATE TABLE google_custom_voices
|
||||
(
|
||||
google_custom_voice_sid CHAR(36) NOT NULL UNIQUE ,
|
||||
speech_credential_sid CHAR(36) NOT NULL,
|
||||
model VARCHAR(512) NOT NULL,
|
||||
reported_usage ENUM('REPORTED_USAGE_UNSPECIFIED','REALTIME','OFFLINE') DEFAULT 'REALTIME',
|
||||
name VARCHAR(64) NOT NULL,
|
||||
PRIMARY KEY (google_custom_voice_sid)
|
||||
);
|
||||
|
||||
CREATE TABLE system_information
|
||||
(
|
||||
domain_name VARCHAR(255),
|
||||
@@ -644,10 +628,6 @@ ALTER TABLE speech_credentials ADD FOREIGN KEY service_provider_sid_idxfk_5 (ser
|
||||
CREATE INDEX account_sid_idx ON speech_credentials (account_sid);
|
||||
ALTER TABLE speech_credentials ADD FOREIGN KEY account_sid_idxfk_8 (account_sid) REFERENCES accounts (account_sid);
|
||||
|
||||
CREATE INDEX google_custom_voice_sid_idx ON google_custom_voices (google_custom_voice_sid);
|
||||
CREATE INDEX speech_credential_sid_idx ON google_custom_voices (speech_credential_sid);
|
||||
ALTER TABLE google_custom_voices ADD FOREIGN KEY speech_credential_sid_idxfk (speech_credential_sid) REFERENCES speech_credentials (speech_credential_sid) ON DELETE CASCADE;
|
||||
|
||||
CREATE INDEX user_sid_idx ON users (user_sid);
|
||||
CREATE INDEX email_idx ON users (email);
|
||||
CREATE INDEX phone_idx ON users (phone);
|
||||
@@ -733,5 +713,4 @@ ALTER TABLE accounts ADD FOREIGN KEY queue_event_hook_sid_idxfk (queue_event_hoo
|
||||
ALTER TABLE accounts ADD FOREIGN KEY device_calling_application_sid_idxfk (device_calling_application_sid) REFERENCES applications (application_sid);
|
||||
|
||||
ALTER TABLE accounts ADD FOREIGN KEY siprec_hook_sid_idxfk (siprec_hook_sid) REFERENCES applications (application_sid);
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=1;
|
||||
SET FOREIGN_KEY_CHECKS=1;
|
||||
172
db/jambones.sqs
172
db/jambones.sqs
@@ -87,7 +87,7 @@
|
||||
<notNull><![CDATA[1]]></notNull>
|
||||
<uid><![CDATA[49E56AF4-4E40-49B6-BA88-4E378F1E6C18]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[13]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[12]]></labelWindowIndex>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[0507BD46-ACAC-48A3-841E-4DEC2FEDCB72]]></uid>
|
||||
</SQLTable>
|
||||
@@ -148,7 +148,7 @@
|
||||
<notNull><![CDATA[1]]></notNull>
|
||||
<uid><![CDATA[6E651E52-F91E-4086-9A1E-FB3425476B2F]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[23]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[22]]></labelWindowIndex>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[0A95311F-47FA-429F-BAF9-1442C6EE0C0E]]></uid>
|
||||
</SQLTable>
|
||||
@@ -225,7 +225,7 @@
|
||||
<notNull><![CDATA[1]]></notNull>
|
||||
<uid><![CDATA[D1019218-F1FC-4BC5-A890-F8DBB7153375]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[16]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[15]]></labelWindowIndex>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[0AC2FD20-B22F-48DB-8611-801CEF6BFA12]]></uid>
|
||||
</SQLTable>
|
||||
@@ -279,7 +279,7 @@
|
||||
<uid><![CDATA[755D10B0-F60D-4250-8971-C8E4FDB0E0CD]]></uid>
|
||||
<unique><![CDATA[1]]></unique>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[20]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[19]]></labelWindowIndex>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[16B9E383-E044-4D71-AB46-FEB86A46A298]]></uid>
|
||||
</SQLTable>
|
||||
@@ -316,7 +316,7 @@
|
||||
<notNull><![CDATA[1]]></notNull>
|
||||
<uid><![CDATA[C4EEBFF0-C3CB-4897-8720-12D14DBA93A5]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[7]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[6]]></labelWindowIndex>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[1A80FB9B-419E-483A-86FF-B44A00A44D7F]]></uid>
|
||||
</SQLTable>
|
||||
@@ -471,7 +471,7 @@
|
||||
<notNull><![CDATA[1]]></notNull>
|
||||
<uid><![CDATA[601FA05B-78A5-4E7E-9983-39BB0E6D18EB]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[27]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[26]]></labelWindowIndex>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[2A735FAB-592C-42E5-9C8B-06B109314799]]></uid>
|
||||
</SQLTable>
|
||||
@@ -537,7 +537,7 @@
|
||||
<indexed><![CDATA[1]]></indexed>
|
||||
<uid><![CDATA[365FB018-429D-4DA4-AC33-D9D106EA97E5]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[12]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[11]]></labelWindowIndex>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[311D99B2-DC8B-4C4A-A1FC-4AFAA1F450F3]]></uid>
|
||||
</SQLTable>
|
||||
@@ -737,7 +737,7 @@
|
||||
<type><![CDATA[VARCHAR(4096)]]></type>
|
||||
<uid><![CDATA[7C7DFE92-D7AC-4447-A1C2-E0F10C1EA26A]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[28]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[27]]></labelWindowIndex>
|
||||
<objectComment><![CDATA[A Carrier or customer PBX that can send or receive calls]]></objectComment>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[3D3136A7-AFC0-4A70-AEC3-68577955CA2E]]></uid>
|
||||
@@ -819,7 +819,7 @@
|
||||
<defaultValue><![CDATA[CURRENT_TIMESTAMP]]></defaultValue>
|
||||
<uid><![CDATA[C84C9B6A-80B5-4B0B-8C14-EB02F7421BBE]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[37]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[36]]></labelWindowIndex>
|
||||
<objectComment><![CDATA[An authorization token that is used to access the REST api]]></objectComment>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[3EDF89A0-FD38-4DF9-BB65-E0FCD0A678BE]]></uid>
|
||||
@@ -872,7 +872,7 @@
|
||||
<notNull><![CDATA[1]]></notNull>
|
||||
<uid><![CDATA[EA4C1A7E-68ED-41D5-9EE9-345DD61F00C7]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[9]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[8]]></labelWindowIndex>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[4893A0F0-BE1B-4322-9034-644528E802DE]]></uid>
|
||||
</SQLTable>
|
||||
@@ -892,7 +892,6 @@
|
||||
<name><![CDATA[speech_credential_sid]]></name>
|
||||
<type><![CDATA[CHAR(36)]]></type>
|
||||
<primaryKey>1</primaryKey>
|
||||
<forcedUnique><![CDATA[1]]></forcedUnique>
|
||||
<indexed><![CDATA[1]]></indexed>
|
||||
<notNull><![CDATA[1]]></notNull>
|
||||
<uid><![CDATA[A5B51E8C-D4F3-4D7A-953D-B3082D87A226]]></uid>
|
||||
@@ -987,7 +986,7 @@
|
||||
<type><![CDATA[VARCHAR(64)]]></type>
|
||||
<uid><![CDATA[0D42A22C-DF14-42A1-BDE2-A53AC8B0D8D6]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[22]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[21]]></labelWindowIndex>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[49A68E1C-DEE2-446C-A4EB-9850E16155CC]]></uid>
|
||||
</SQLTable>
|
||||
@@ -1008,7 +1007,7 @@
|
||||
<type><![CDATA[VARCHAR(16)]]></type>
|
||||
<uid><![CDATA[1EA572BD-FF6B-43CC-9EBB-33A735781429]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[10]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[9]]></labelWindowIndex>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[518AC592-D3E6-4032-8A33-15A3DB72B060]]></uid>
|
||||
</SQLTable>
|
||||
@@ -1069,7 +1068,7 @@
|
||||
<notNull><![CDATA[1]]></notNull>
|
||||
<uid><![CDATA[6B2F726C-48A6-49D9-B7B1-8850DD6FB3EC]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[15]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[14]]></labelWindowIndex>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[51A02EFE-AA51-46EF-8671-E8B2F1FC5F8D]]></uid>
|
||||
</SQLTable>
|
||||
@@ -1121,7 +1120,7 @@
|
||||
<notNull><![CDATA[1]]></notNull>
|
||||
<uid><![CDATA[2EA3A57F-7EF7-4958-B06B-62B0279BB87E]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[8]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[7]]></labelWindowIndex>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[5784AC2F-BEBC-466F-9818-F9A7D227A5B5]]></uid>
|
||||
</SQLTable>
|
||||
@@ -1171,7 +1170,7 @@
|
||||
<type><![CDATA[VARCHAR(255)]]></type>
|
||||
<uid><![CDATA[04BB457A-D532-4780-8A58-5900094171EC]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[29]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[28]]></labelWindowIndex>
|
||||
<objectComment><![CDATA[An HTTP callback]]></objectComment>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[64D64CB9-0990-4C68-BE71-F9FD43C2BE19]]></uid>
|
||||
@@ -1271,7 +1270,7 @@
|
||||
<notNull><![CDATA[1]]></notNull>
|
||||
<uid><![CDATA[9A75A20B-1EFD-4E16-994A-5376C650EAB5]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[11]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[10]]></labelWindowIndex>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[6511AF7D-91FD-40C7-9F73-B8E9E66DC249]]></uid>
|
||||
</SQLTable>
|
||||
@@ -1340,7 +1339,7 @@
|
||||
<uid><![CDATA[9B4208B5-9E3B-4B76-B7F7-4E5D36B99BF2]]></uid>
|
||||
<unsigned><![CDATA[0]]></unsigned>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[36]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[35]]></labelWindowIndex>
|
||||
<objectComment><![CDATA[a regex-based pattern match for call routing]]></objectComment>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[78584D93-2CD7-4495-9C5E-893C7B869133]]></uid>
|
||||
@@ -1377,7 +1376,7 @@
|
||||
<noQuoteDefault><![CDATA[1]]></noQuoteDefault>
|
||||
<uid><![CDATA[4D2F7B02-F183-4239-8CE8-3E98206708AE]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[14]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[13]]></labelWindowIndex>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[86FAB0AB-DC68-4ADF-8A08-BBAF61BA1840]]></uid>
|
||||
</SQLTable>
|
||||
@@ -1415,7 +1414,7 @@
|
||||
<type><![CDATA[VARCHAR(255)]]></type>
|
||||
<uid><![CDATA[673137EA-B74C-4BA7-AD25-1B71360A2E26]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[6]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[5]]></labelWindowIndex>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[87F254ED-D381-48E3-8E8F-C0F3D99CC01C]]></uid>
|
||||
</SQLTable>
|
||||
@@ -1447,7 +1446,7 @@
|
||||
<notNull><![CDATA[1]]></notNull>
|
||||
<uid><![CDATA[8998AAD6-A21C-4697-9660-8DC5005AED07]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[5]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[4]]></labelWindowIndex>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[8E75DB2D-9078-40E6-88BF-7DDED5033362]]></uid>
|
||||
</SQLTable>
|
||||
@@ -1524,7 +1523,7 @@
|
||||
<uid><![CDATA[1DDAD1A1-942D-4487-89C8-D496B7F82274]]></uid>
|
||||
<unique><![CDATA[1]]></unique>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[26]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[25]]></labelWindowIndex>
|
||||
<objectComment><![CDATA[A Microsoft Teams customer tenant]]></objectComment>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[92FD042A-5AEC-4D8F-AB94-C73C0F566F75]]></uid>
|
||||
@@ -1595,7 +1594,7 @@
|
||||
<objectComment><![CDATA[lower priority carriers are attempted first]]></objectComment>
|
||||
<uid><![CDATA[01F61C68-799B-49B0-9E6A-0E2162EE5A54]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[32]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[31]]></labelWindowIndex>
|
||||
<objectComment><![CDATA[An entry in the LCR routing list]]></objectComment>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[956025F5-0798-47F7-B76C-457814C7B52E]]></uid>
|
||||
@@ -1809,7 +1808,7 @@
|
||||
<objectComment><![CDATA[credential used to authenticate with storage service]]></objectComment>
|
||||
<uid><![CDATA[E81859C0-DCBD-4FF3-BEEF-FA575394326B]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[34]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[33]]></labelWindowIndex>
|
||||
<objectComment><![CDATA[An enterprise that uses the platform for comm services]]></objectComment>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[985D6997-B1A7-4AB3-80F4-4D59B45480C8]]></uid>
|
||||
@@ -1848,7 +1847,7 @@
|
||||
<notNull><![CDATA[1]]></notNull>
|
||||
<uid><![CDATA[D0BF7D36-E40C-4385-9BA5-2099B49A1042]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[21]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[20]]></labelWindowIndex>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[A8ED2178-3CC4-4174-A8FC-C2B58FD28214]]></uid>
|
||||
</SQLTable>
|
||||
@@ -1940,7 +1939,7 @@
|
||||
<type><![CDATA[VARCHAR(32)]]></type>
|
||||
<uid><![CDATA[CE2015BC-8538-4FB0-B4D9-454436FAB1D9]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[17]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[16]]></labelWindowIndex>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[AF34726D-EDFD-414E-9B44-5243DA9D9497]]></uid>
|
||||
</SQLTable>
|
||||
@@ -2010,7 +2009,7 @@
|
||||
<indexed><![CDATA[1]]></indexed>
|
||||
<uid><![CDATA[EA936343-89D3-4E3F-BD92-9F8967DC27C4]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[4]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[3]]></labelWindowIndex>
|
||||
<objectComment><![CDATA[An LCR (least cost routing) table that is used by a service provider or account to make decisions about routing outbound calls when multiple carriers are available.]]></objectComment>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[AFD51FD4-44C8-4442-94C2-0DFA93CD48AE]]></uid>
|
||||
@@ -2062,72 +2061,10 @@
|
||||
<notNull><![CDATA[1]]></notNull>
|
||||
<uid><![CDATA[73092A7A-9F3F-4C49-8478-39CE5DAF5ADD]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[19]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[18]]></labelWindowIndex>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[B10C0DE3-03CD-4C5A-B1FB-F9F81ED14A40]]></uid>
|
||||
</SQLTable>
|
||||
<SQLTable>
|
||||
<name><![CDATA[google_custom_voices]]></name>
|
||||
<schema><![CDATA[]]></schema>
|
||||
<location>
|
||||
<x>1803.00</x>
|
||||
<y>1036.00</y>
|
||||
</location>
|
||||
<size>
|
||||
<width>521.00</width>
|
||||
<height>120.00</height>
|
||||
</size>
|
||||
<zorder>37</zorder>
|
||||
<SQLField>
|
||||
<name><![CDATA[google_custom_voice_sid]]></name>
|
||||
<type><![CDATA[CHAR(36)]]></type>
|
||||
<primaryKey>1</primaryKey>
|
||||
<indexed><![CDATA[1]]></indexed>
|
||||
<notNull><![CDATA[1]]></notNull>
|
||||
<uid><![CDATA[D246DAFE-98AB-4DC6-A384-1DFE8E40573D]]></uid>
|
||||
<unique><![CDATA[1]]></unique>
|
||||
</SQLField>
|
||||
<SQLField>
|
||||
<name><![CDATA[speech_credential_sid]]></name>
|
||||
<type><![CDATA[CHAR(36)]]></type>
|
||||
<referencesField>speech_credential_sid</referencesField>
|
||||
<referencesTable>speech_credentials</referencesTable>
|
||||
<deleteAction>1</deleteAction>
|
||||
<referencesField><![CDATA[speech_credential_sid]]></referencesField>
|
||||
<referencesTable><![CDATA[speech_credentials]]></referencesTable>
|
||||
<sourceCardinality>4</sourceCardinality>
|
||||
<destinationCardinality>1</destinationCardinality>
|
||||
<referencesFieldUID><![CDATA[A5B51E8C-D4F3-4D7A-953D-B3082D87A226]]></referencesFieldUID>
|
||||
<referencesTableUID><![CDATA[49A68E1C-DEE2-446C-A4EB-9850E16155CC]]></referencesTableUID>
|
||||
<forcedUnique><![CDATA[0]]></forcedUnique>
|
||||
<indexed><![CDATA[1]]></indexed>
|
||||
<notNull><![CDATA[1]]></notNull>
|
||||
<uid><![CDATA[AB763F3E-8E49-46EE-BE99-5ED02A688E93]]></uid>
|
||||
<unique><![CDATA[0]]></unique>
|
||||
</SQLField>
|
||||
<SQLField>
|
||||
<name><![CDATA[model]]></name>
|
||||
<type><![CDATA[VARCHAR(512)]]></type>
|
||||
<notNull><![CDATA[1]]></notNull>
|
||||
<uid><![CDATA[CB4E2A6B-7C59-4C8F-B5F5-5F27200B971F]]></uid>
|
||||
</SQLField>
|
||||
<SQLField>
|
||||
<name><![CDATA[reported_usage]]></name>
|
||||
<type><![CDATA[ENUM('REPORTED_USAGE_UNSPECIFIED','REALTIME','OFFLINE')]]></type>
|
||||
<defaultValue><![CDATA[REALTIME]]></defaultValue>
|
||||
<notNull><![CDATA[0]]></notNull>
|
||||
<uid><![CDATA[A17005D7-81E3-4E12-91EB-6DB23DEAA618]]></uid>
|
||||
</SQLField>
|
||||
<SQLField>
|
||||
<name><![CDATA[name]]></name>
|
||||
<type><![CDATA[VARCHAR(64)]]></type>
|
||||
<notNull><![CDATA[1]]></notNull>
|
||||
<uid><![CDATA[D22EED9A-3502-489E-BE0A-5609B76697A8]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[1]]></labelWindowIndex>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[B83321B9-0B89-4E5F-95D4-864ADE2EC405]]></uid>
|
||||
</SQLTable>
|
||||
<SQLTable>
|
||||
<name><![CDATA[phone_numbers]]></name>
|
||||
<schema><![CDATA[]]></schema>
|
||||
@@ -2238,7 +2175,7 @@
|
||||
<indexType><![CDATA[UNIQUE]]></indexType>
|
||||
<uid><![CDATA[4E84523A-7F30-4A5D-A0A8-578652102BD0]]></uid>
|
||||
</SQLIndex>
|
||||
<labelWindowIndex><![CDATA[35]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[34]]></labelWindowIndex>
|
||||
<objectComment><![CDATA[A phone number that has been assigned to an account]]></objectComment>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[BA650DDC-AC7B-4DFE-A5E5-828C75607807]]></uid>
|
||||
@@ -2251,8 +2188,8 @@
|
||||
<y>1496.00</y>
|
||||
</location>
|
||||
<size>
|
||||
<width>282.00</width>
|
||||
<height>180.00</height>
|
||||
<width>228.00</width>
|
||||
<height>120.00</height>
|
||||
</size>
|
||||
<zorder>36</zorder>
|
||||
<SQLField>
|
||||
@@ -2297,28 +2234,7 @@
|
||||
<notNull><![CDATA[0]]></notNull>
|
||||
<uid><![CDATA[2963DB28-7248-4D58-92E6-F21F2EB9E680]]></uid>
|
||||
</SQLField>
|
||||
<SQLField>
|
||||
<name><![CDATA[allow_direct_app_calling]]></name>
|
||||
<type><![CDATA[BOOLEAN]]></type>
|
||||
<defaultValue><![CDATA[1]]></defaultValue>
|
||||
<notNull><![CDATA[1]]></notNull>
|
||||
<uid><![CDATA[EA252940-708B-4BD3-B211-5EC59AA540D3]]></uid>
|
||||
</SQLField>
|
||||
<SQLField>
|
||||
<name><![CDATA[allow_direct_queue_calling]]></name>
|
||||
<type><![CDATA[BOOLEAN]]></type>
|
||||
<defaultValue><![CDATA[1]]></defaultValue>
|
||||
<notNull><![CDATA[1]]></notNull>
|
||||
<uid><![CDATA[76CE0DFC-7CC6-46EE-82C6-2CF16C7EAD4D]]></uid>
|
||||
</SQLField>
|
||||
<SQLField>
|
||||
<name><![CDATA[allow_direct_user_calling]]></name>
|
||||
<type><![CDATA[BOOLEAN]]></type>
|
||||
<defaultValue><![CDATA[1]]></defaultValue>
|
||||
<notNull><![CDATA[1]]></notNull>
|
||||
<uid><![CDATA[206E169C-E5F6-4774-8D4A-5BECF25E49A3]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[2]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[1]]></labelWindowIndex>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[C2CDB45C-3F50-40B3-B8CE-2F093EB0D517]]></uid>
|
||||
</SQLTable>
|
||||
@@ -2430,7 +2346,7 @@
|
||||
<objectComment><![CDATA[Outbound call protocol]]></objectComment>
|
||||
<uid><![CDATA[30661D66-96EC-4B02-995C-5E7EB8A3BD70]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[31]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[30]]></labelWindowIndex>
|
||||
<objectComment><![CDATA[A whitelisted sip gateway used for origination/termination]]></objectComment>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[D8A564E2-DA41-4217-8ACE-06CF77E9BEC1]]></uid>
|
||||
@@ -2672,7 +2588,7 @@
|
||||
<indexType><![CDATA[UNIQUE]]></indexType>
|
||||
<uid><![CDATA[3FDDDF3B-375D-4DE4-B759-514438845F7D]]></uid>
|
||||
</SQLIndex>
|
||||
<labelWindowIndex><![CDATA[33]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[32]]></labelWindowIndex>
|
||||
<objectComment><![CDATA[A defined set of behaviors to be applied to phone calls ]]></objectComment>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[E97EE4F0-7ED7-4E8C-862E-D98192D6EAE0]]></uid>
|
||||
@@ -2780,7 +2696,7 @@
|
||||
<type><![CDATA[VARBINARY(52)]]></type>
|
||||
<uid><![CDATA[B4793720-635C-4E25-A306-62E7416541C4]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[18]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[17]]></labelWindowIndex>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[EB4BC5F9-CC10-4C8C-AB31-6D942256AEFB]]></uid>
|
||||
</SQLTable>
|
||||
@@ -2811,7 +2727,7 @@
|
||||
<type><![CDATA[VARCHAR(255)]]></type>
|
||||
<uid><![CDATA[0A8DB34E-76C9-4D40-9E31-786E0228DCEE]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[3]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[2]]></labelWindowIndex>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[F0C2DC80-CBA7-4BE7-8856-D10B062A7B17]]></uid>
|
||||
</SQLTable>
|
||||
@@ -2896,7 +2812,7 @@
|
||||
<type><![CDATA[DATETIME]]></type>
|
||||
<uid><![CDATA[CD43B91B-F34E-4422-9C0F-A4B92E2E7B95]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[25]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[24]]></labelWindowIndex>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[F0EE651E-DBF6-4CAC-A517-AC85BCC2D3AF]]></uid>
|
||||
</SQLTable>
|
||||
@@ -2956,7 +2872,7 @@
|
||||
<uid><![CDATA[B73773BA-AB1B-47AA-B995-2D2FE006198F]]></uid>
|
||||
<unique><![CDATA[0]]></unique>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[30]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[29]]></labelWindowIndex>
|
||||
<objectComment><![CDATA[An ordered list of digit patterns in an LCR table. The patterns are tested in sequence until one matches]]></objectComment>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[F283D572-F670-4571-91FD-A665A9D3E15D]]></uid>
|
||||
@@ -3023,7 +2939,7 @@
|
||||
<type><![CDATA[VARCHAR(255)]]></type>
|
||||
<uid><![CDATA[FA39B463-61C7-4654-BE9C-D1AC39AB1B97]]></uid>
|
||||
</SQLField>
|
||||
<labelWindowIndex><![CDATA[24]]></labelWindowIndex>
|
||||
<labelWindowIndex><![CDATA[23]]></labelWindowIndex>
|
||||
<objectComment><![CDATA[A partition of the platform used by one service provider]]></objectComment>
|
||||
<ui.treeExpanded><![CDATA[1]]></ui.treeExpanded>
|
||||
<uid><![CDATA[F294B51E-F867-47CA-BC1F-F70BDF8170FF]]></uid>
|
||||
@@ -3097,17 +3013,17 @@
|
||||
<overviewPanelHidden><![CDATA[0]]></overviewPanelHidden>
|
||||
<pageBoundariesVisible><![CDATA[0]]></pageBoundariesVisible>
|
||||
<PageGridVisible><![CDATA[0]]></PageGridVisible>
|
||||
<RightSidebarWidth><![CDATA[1924.000000]]></RightSidebarWidth>
|
||||
<RightSidebarWidth><![CDATA[1235.000000]]></RightSidebarWidth>
|
||||
<sidebarIndex><![CDATA[2]]></sidebarIndex>
|
||||
<snapToGrid><![CDATA[0]]></snapToGrid>
|
||||
<SourceSidebarWidth><![CDATA[0.000000]]></SourceSidebarWidth>
|
||||
<SQLEditorFileFormatVersion><![CDATA[4]]></SQLEditorFileFormatVersion>
|
||||
<uid><![CDATA[58C99A00-06C9-478C-A667-C63842E088F3]]></uid>
|
||||
<windowHeight><![CDATA[985.000000]]></windowHeight>
|
||||
<windowLocationX><![CDATA[-1307.000000]]></windowLocationX>
|
||||
<windowLocationY><![CDATA[1008.000000]]></windowLocationY>
|
||||
<windowScrollOrigin><![CDATA[{1.5, 786}]]></windowScrollOrigin>
|
||||
<windowWidth><![CDATA[2201.000000]]></windowWidth>
|
||||
<windowHeight><![CDATA[1055.000000]]></windowHeight>
|
||||
<windowLocationX><![CDATA[0.000000]]></windowLocationX>
|
||||
<windowLocationY><![CDATA[24.000000]]></windowLocationY>
|
||||
<windowScrollOrigin><![CDATA[{90, 0}]]></windowScrollOrigin>
|
||||
<windowWidth><![CDATA[1682.000000]]></windowWidth>
|
||||
</SQLDocumentInfo>
|
||||
<AllowsIndexRenamingOnInsert><![CDATA[1]]></AllowsIndexRenamingOnInsert>
|
||||
<defaultLabelExpanded><![CDATA[1]]></defaultLabelExpanded>
|
||||
|
||||
@@ -88,7 +88,7 @@ const sql = {
|
||||
'ALTER TABLE user_permissions ADD FOREIGN KEY permission_sid_idxfk (permission_sid) REFERENCES permissions (permission_sid)',
|
||||
'ALTER TABLE `users` ADD COLUMN `is_active` BOOLEAN NOT NULL default true',
|
||||
],
|
||||
'8003': [
|
||||
8003: [
|
||||
'SET FOREIGN_KEY_CHECKS=0',
|
||||
'ALTER TABLE `voip_carriers` ADD COLUMN `register_status` VARCHAR(4096)',
|
||||
'ALTER TABLE `sbc_addresses` ADD COLUMN `last_updated` DATETIME',
|
||||
@@ -140,7 +140,7 @@ const sql = {
|
||||
'ALTER TABLE lcr_carrier_set_entry ADD FOREIGN KEY voip_carrier_sid_idxfk_3 (voip_carrier_sid) REFERENCES voip_carriers (voip_carrier_sid)',
|
||||
'SET FOREIGN_KEY_CHECKS=1',
|
||||
],
|
||||
'8004': [
|
||||
8004: [
|
||||
'alter table accounts add column record_all_calls BOOLEAN NOT NULL DEFAULT false',
|
||||
'alter table accounts add column bucket_credential VARCHAR(8192)',
|
||||
'alter table accounts add column record_format VARCHAR(16) NOT NULL DEFAULT \'mp3\'',
|
||||
@@ -160,7 +160,7 @@ const sql = {
|
||||
'ALTER TABLE clients ADD CONSTRAINT account_sid_idxfk_13 FOREIGN KEY account_sid_idxfk_13 (account_sid) REFERENCES accounts (account_sid)',
|
||||
'ALTER TABLE sip_gateways ADD COLUMN protocol ENUM(\'udp\',\'tcp\',\'tls\', \'tls/srtp\') DEFAULT \'udp\''
|
||||
],
|
||||
'8005': [
|
||||
8005: [
|
||||
'DROP INDEX speech_credentials_idx_1 ON speech_credentials',
|
||||
'ALTER TABLE speech_credentials ADD COLUMN label VARCHAR(64)',
|
||||
'ALTER TABLE applications ADD COLUMN speech_synthesis_label VARCHAR(64)',
|
||||
@@ -174,23 +174,7 @@ const sql = {
|
||||
'ALTER TABLE applications ADD COLUMN fallback_speech_recognizer_language VARCHAR(64)',
|
||||
'ALTER TABLE applications ADD COLUMN fallback_speech_recognizer_label VARCHAR(64)',
|
||||
'ALTER TABLE sip_gateways ADD COLUMN pad_crypto BOOLEAN NOT NULL DEFAULT 0',
|
||||
'ALTER TABLE sip_gateways MODIFY port INTEGER',
|
||||
`CREATE TABLE google_custom_voices
|
||||
(
|
||||
google_custom_voice_sid CHAR(36) NOT NULL UNIQUE ,
|
||||
speech_credential_sid CHAR(36) NOT NULL,
|
||||
model VARCHAR(512) NOT NULL,
|
||||
reported_usage ENUM('REPORTED_USAGE_UNSPECIFIED','REALTIME','OFFLINE') DEFAULT 'REALTIME',
|
||||
name VARCHAR(64) NOT NULL,
|
||||
PRIMARY KEY (google_custom_voice_sid)
|
||||
)
|
||||
`,
|
||||
'CREATE INDEX google_custom_voice_sid_idx ON google_custom_voices (google_custom_voice_sid)',
|
||||
'CREATE INDEX speech_credential_sid_idx ON google_custom_voices (speech_credential_sid)',
|
||||
'ALTER TABLE google_custom_voices ADD FOREIGN KEY speech_credential_sid_idxfk (speech_credential_sid) REFERENCES speech_credentials (speech_credential_sid) ON DELETE CASCADE',
|
||||
'ALTER TABLE clients ADD COLUMN allow_direct_queue_calling BOOLEAN NOT NULL DEFAULT 1',
|
||||
'ALTER TABLE clients ADD COLUMN allow_direct_user_calling BOOLEAN NOT NULL DEFAULT 1',
|
||||
'ALTER TABLE clients ADD COLUMN allow_direct_app_calling BOOLEAN NOT NULL DEFAULT 1'
|
||||
'ALTER TABLE sip_gateways MODIFY port INTEGER'
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
@@ -1,7 +1,27 @@
|
||||
const logger = require('../logger');
|
||||
|
||||
const JAMBONES_REDIS_SENTINELS = process.env.JAMBONES_REDIS_SENTINELS ? {
|
||||
sentinels: process.env.JAMBONES_REDIS_SENTINELS.split(',').map((sentinel) => {
|
||||
let host, port = 26379;
|
||||
if (sentinel.includes(':')) {
|
||||
const arr = sentinel.split(':');
|
||||
host = arr[0];
|
||||
port = parseInt(arr[1], 10);
|
||||
} else {
|
||||
host = sentinel;
|
||||
}
|
||||
return {host, port};
|
||||
}),
|
||||
name: process.env.JAMBONES_REDIS_SENTINEL_MASTER_NAME,
|
||||
...(process.env.JAMBONES_REDIS_SENTINEL_PASSWORD && {
|
||||
password: process.env.JAMBONES_REDIS_SENTINEL_PASSWORD
|
||||
}),
|
||||
...(process.env.JAMBONES_REDIS_SENTINEL_USERNAME && {
|
||||
username: process.env.JAMBONES_REDIS_SENTINEL_USERNAME
|
||||
})
|
||||
} : null;
|
||||
|
||||
const {
|
||||
client,
|
||||
retrieveCall,
|
||||
deleteCall,
|
||||
listCalls,
|
||||
@@ -13,10 +33,12 @@ const {
|
||||
deleteKey,
|
||||
incrKey,
|
||||
client: redisClient,
|
||||
} = require('@jambonz/realtimedb-helpers')({}, logger);
|
||||
} = require('@jambonz/realtimedb-helpers')(JAMBONES_REDIS_SENTINELS || {
|
||||
host: process.env.JAMBONES_REDIS_HOST || 'localhost',
|
||||
port: process.env.JAMBONES_REDIS_PORT || 6379
|
||||
}, logger);
|
||||
|
||||
module.exports = {
|
||||
client,
|
||||
retrieveCall,
|
||||
deleteCall,
|
||||
listCalls,
|
||||
@@ -27,5 +49,6 @@ module.exports = {
|
||||
retrieveKey,
|
||||
deleteKey,
|
||||
redisClient,
|
||||
incrKey
|
||||
incrKey,
|
||||
JAMBONES_REDIS_SENTINELS
|
||||
};
|
||||
|
||||
@@ -52,18 +52,6 @@ Client.fields = [
|
||||
{
|
||||
name: 'password',
|
||||
type: 'string'
|
||||
},
|
||||
{
|
||||
name: 'allow_direct_app_calling',
|
||||
type: 'number'
|
||||
},
|
||||
{
|
||||
name: 'allow_direct_queue_calling',
|
||||
type: 'number'
|
||||
},
|
||||
{
|
||||
name: 'allow_direct_user_calling',
|
||||
type: 'number'
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
const Model = require('./model');
|
||||
const {promisePool} = require('../db');
|
||||
|
||||
class GoogleCustomVoice extends Model {
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
static async retrieveAllBySpeechCredentialSid(speech_credential_sid) {
|
||||
const sql = `SELECT * FROM ${this.table} WHERE speech_credential_sid = ?`;
|
||||
const [rows] = await promisePool.query(sql, speech_credential_sid);
|
||||
return rows;
|
||||
}
|
||||
|
||||
static async deleteAllBySpeechCredentialSid(speech_credential_sid) {
|
||||
const sql = `DELETE FROM ${this.table} WHERE speech_credential_sid = ?`;
|
||||
const [rows] = await promisePool.query(sql, speech_credential_sid);
|
||||
return rows;
|
||||
}
|
||||
|
||||
static async retrieveAllByLabel(service_provider_sid, account_sid, label) {
|
||||
let sql;
|
||||
if (account_sid) {
|
||||
sql = `SELECT gcv.* FROM ${this.table} gcv
|
||||
LEFT JOIN speech_credentials sc ON gcv.speech_credential_sid = sc.speech_credential_sid
|
||||
WHERE sc.account_sid = ? OR (sc.account_sid is NULL && sc.service_provider_sid = ?)
|
||||
${label ? 'AND label = ?' : 'AND label is NULL'}`;
|
||||
} else {
|
||||
sql = `SELECT gcv.* FROM ${this.table} gcv
|
||||
LEFT JOIN speech_credentials sc ON gcv.speech_credential_sid = sc.speech_credential_sid
|
||||
WHERE sc.service_provider_sid = ? ${label ? 'AND label = ?' : 'AND label is NULL'}`;
|
||||
}
|
||||
const [rows] = await promisePool.query(sql, [...(account_sid ?
|
||||
[account_sid, service_provider_sid] : [service_provider_sid]), label]);
|
||||
return rows;
|
||||
}
|
||||
}
|
||||
GoogleCustomVoice.table = 'google_custom_voices';
|
||||
GoogleCustomVoice.fields = [
|
||||
{
|
||||
name: 'google_custom_voice_sid',
|
||||
type: 'string',
|
||||
primaryKey: true
|
||||
},
|
||||
{
|
||||
name: 'model',
|
||||
type: 'string',
|
||||
required: true
|
||||
},
|
||||
{
|
||||
name: 'reported_usage',
|
||||
type: 'number'
|
||||
},
|
||||
{
|
||||
name: 'name',
|
||||
type: 'string',
|
||||
required: true
|
||||
}
|
||||
];
|
||||
|
||||
module.exports = GoogleCustomVoice;
|
||||
@@ -1,7 +1,6 @@
|
||||
const Model = require('./model');
|
||||
const {promisePool} = require('../db');
|
||||
const sqlRetrieveAll = 'SELECT * from phone_numbers WHERE account_sid = ? ORDER BY number';
|
||||
const sqlRetrieveOne = 'SELECT * from phone_numbers WHERE phone_number_sid = ? AND account_sid = ? ORDER BY number';
|
||||
const sql = 'SELECT * from phone_numbers WHERE account_sid = ? ORDER BY number';
|
||||
const sqlSP = `SELECT *
|
||||
FROM phone_numbers
|
||||
WHERE account_sid IN
|
||||
@@ -18,7 +17,7 @@ class PhoneNumber extends Model {
|
||||
|
||||
static async retrieveAll(account_sid) {
|
||||
if (!account_sid) return await super.retrieveAll();
|
||||
const [rows] = await promisePool.query(sqlRetrieveAll, account_sid);
|
||||
const [rows] = await promisePool.query(sql, account_sid);
|
||||
return rows;
|
||||
}
|
||||
static async retrieveAllForSP(service_provider_sid) {
|
||||
@@ -31,7 +30,7 @@ class PhoneNumber extends Model {
|
||||
*/
|
||||
static async retrieve(sid, account_sid) {
|
||||
if (!account_sid) return super.retrieve(sid);
|
||||
const [rows] = await promisePool.query(sqlRetrieveOne, [sid, account_sid]);
|
||||
const [rows] = await promisePool.query(`${sql} AND phone_number_sid = ?`, [account_sid, sid]);
|
||||
return rows;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,13 +20,12 @@ class SpeechCredential extends Model {
|
||||
return rows;
|
||||
}
|
||||
|
||||
static async getSpeechCredentialsByVendorAndLabel(service_provider_sid, account_sid, vendor, label) {
|
||||
static async isAvailableVendorAndLabel(service_provider_sid, account_sid, vendor, label) {
|
||||
let sql;
|
||||
if (account_sid) {
|
||||
sql = `SELECT * FROM speech_credentials WHERE account_sid = ? AND vendor = ? ${label ? 'AND label = ?' : ''}`;
|
||||
sql = 'SELECT * FROM speech_credentials WHERE account_sid = ? AND vendor = ? AND label = ?';
|
||||
} else {
|
||||
sql = `SELECT * FROM speech_credentials WHERE service_provider_sid = ? AND vendor = ?
|
||||
${label ? 'AND label = ?' : ''}`;
|
||||
sql = 'SELECT * FROM speech_credentials WHERE service_provider_sid = ? AND vendor = ? AND label = ?';
|
||||
}
|
||||
const [rows] = await promisePool.query(sql, [account_sid ? account_sid : service_provider_sid, vendor, label]);
|
||||
return rows;
|
||||
|
||||
@@ -11,7 +11,7 @@ class S3MultipartUploadStream extends Writable {
|
||||
super(opts);
|
||||
this.logger = logger;
|
||||
this.bucketName = opts.bucketName;
|
||||
this.objectKey = opts.Key;
|
||||
this.objectKey = opts.objectKey;
|
||||
this.uploadId = null;
|
||||
this.partNumber = 1;
|
||||
this.multipartETags = [];
|
||||
|
||||
@@ -5,7 +5,7 @@ const S3MultipartUploadStream = require('./s3-multipart-upload-stream');
|
||||
const getUploader = (key, metadata, bucket_credential, logger) => {
|
||||
const uploaderOpts = {
|
||||
bucketName: bucket_credential.name,
|
||||
Key: key,
|
||||
objectKey: key,
|
||||
metadata
|
||||
};
|
||||
try {
|
||||
|
||||
@@ -146,88 +146,6 @@ router.post('/:sid/VoipCarriers', async(req, res) => {
|
||||
}
|
||||
});
|
||||
|
||||
router.get('/:sid/RegisteredSipUsers', async(req, res) => {
|
||||
const {logger, registrar} = req.app.locals;
|
||||
try {
|
||||
const account_sid = parseAccountSid(req);
|
||||
await validateRequest(req, account_sid);
|
||||
const result = await Account.retrieve(account_sid);
|
||||
if (!result || result.length === 0) {
|
||||
throw new DbErrorBadRequest(`account not found for sid ${account_sid}`);
|
||||
}
|
||||
if (!result[0].sip_realm) {
|
||||
throw new DbErrorBadRequest('account does not have sip_realm configuration');
|
||||
}
|
||||
const users = await registrar.getRegisteredUsersForRealm(result[0].sip_realm);
|
||||
res.status(200).json(users.map((u) => `${u}@${result[0].sip_realm}`));
|
||||
} catch (err) {
|
||||
sysError(logger, res, err);
|
||||
}
|
||||
});
|
||||
|
||||
router.post('/:sid/RegisteredSipUsers', async(req, res) => {
|
||||
const {logger, registrar} = req.app.locals;
|
||||
const users = req.body;
|
||||
try {
|
||||
const account_sid = parseAccountSid(req);
|
||||
await validateRequest(req, account_sid);
|
||||
const result = await Account.retrieve(account_sid);
|
||||
if (!result || result.length === 0) {
|
||||
throw new DbErrorBadRequest(`account not found for sid ${account_sid}`);
|
||||
}
|
||||
if (!result[0].sip_realm) {
|
||||
throw new DbErrorBadRequest('account does not have sip_realm configuration');
|
||||
}
|
||||
if (!users || !Array.isArray(users) || users.length === 0) {
|
||||
return res.status(200).json(await registrar.getRegisteredUsersDetailsForRealm(result[0].sip_realm));
|
||||
}
|
||||
const ret = [];
|
||||
for (const u of users) {
|
||||
const user = await registrar.query(`${u}@${result[0].sip_realm}`) || {
|
||||
name: u,
|
||||
contact: null,
|
||||
expiryTime: 0,
|
||||
protocol: null
|
||||
};
|
||||
ret.push({
|
||||
name: u,
|
||||
...user,
|
||||
registered_status: user.expiryTime > 0 ? 'active' : 'inactive',
|
||||
});
|
||||
}
|
||||
res.status(200).json(ret);
|
||||
} catch (err) {
|
||||
sysError(logger, res, err);
|
||||
}
|
||||
});
|
||||
|
||||
router.get('/:sid/RegisteredSipUsers/:client', async(req, res) => {
|
||||
const {logger, registrar, lookupClientByAccountAndUsername} = req.app.locals;
|
||||
const client = req.params.client;
|
||||
try {
|
||||
const account_sid = parseAccountSid(req);
|
||||
await validateRequest(req, account_sid);
|
||||
const result = await Account.retrieve(account_sid);
|
||||
if (!result || result.length === 0) {
|
||||
throw new DbErrorBadRequest(`account not found for sid ${account_sid}`);
|
||||
}
|
||||
const user = await registrar.query(`${client}@${result[0].sip_realm}`);
|
||||
const [clientDb] = await lookupClientByAccountAndUsername(account_sid, client);
|
||||
res.status(200).json({
|
||||
name: client,
|
||||
contact: user ? user.contact : null,
|
||||
expiryTime: user ? user.expiryTime : 0,
|
||||
protocol: user ? user.protocol : null,
|
||||
allow_direct_app_calling: clientDb ? clientDb.allow_direct_app_calling : 0,
|
||||
allow_direct_queue_calling: clientDb ? clientDb.allow_direct_queue_calling : 0,
|
||||
allow_direct_user_calling: clientDb ? clientDb.allow_direct_user_calling : 0,
|
||||
registered_status: user ? 'active' : 'inactive'
|
||||
});
|
||||
} catch (err) {
|
||||
sysError(logger, res, err);
|
||||
}
|
||||
});
|
||||
|
||||
function coerceNumbers(callInfo) {
|
||||
if (Array.isArray(callInfo)) {
|
||||
return callInfo.map((ci) => {
|
||||
@@ -263,9 +181,7 @@ function validateUpdateCall(opts) {
|
||||
'conf_mute_status',
|
||||
'mute_status',
|
||||
'sip_request',
|
||||
'record',
|
||||
'tag',
|
||||
'dtmf'
|
||||
'record'
|
||||
]
|
||||
.reduce((acc, prop) => (opts[prop] ? ++acc : acc), 0);
|
||||
|
||||
@@ -307,15 +223,9 @@ function validateUpdateCall(opts) {
|
||||
if (opts.record && !opts.record.action) {
|
||||
throw new DbErrorBadRequest('record requires action property');
|
||||
}
|
||||
if (opts.dtmf && !opts.dtmf.digit) {
|
||||
throw new DbErrorBadRequest('invalid dtmf');
|
||||
}
|
||||
if ('startCallRecording' === opts.record?.action && !opts.record.siprecServerURL) {
|
||||
throw new DbErrorBadRequest('record requires siprecServerURL property when starting recording');
|
||||
}
|
||||
if (opts.tag && (typeof opts.tag !== 'object' || Array.isArray(opts.tag) || opts.tag === null)) {
|
||||
throw new DbErrorBadRequest('invalid tag data');
|
||||
}
|
||||
}
|
||||
|
||||
function validateTo(to) {
|
||||
@@ -1089,5 +999,4 @@ router.get('/:sid/Queues', async(req, res) => {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
module.exports = router;
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
const router = require('express').Router();
|
||||
const GoogleCustomVoice = require('../../models/google-custom-voice');
|
||||
const SpeechCredential = require('../../models/speech-credential');
|
||||
const decorate = require('./decorate');
|
||||
const {DbErrorBadRequest, DbErrorForbidden} = require('../../utils/errors');
|
||||
const sysError = require('../error');
|
||||
|
||||
const validateCredentialPermission = async(req) => {
|
||||
const credential = await SpeechCredential.retrieve(req.body.speech_credential_sid);
|
||||
if (!credential || credential.length === 0) {
|
||||
throw new DbErrorBadRequest('Invalid speech_credential_sid');
|
||||
}
|
||||
const cred = credential[0];
|
||||
|
||||
if (req.user.hasServiceProviderAuth && cred.service_provider_sid !== req.user.service_provider_sid) {
|
||||
throw new DbErrorForbidden('Insufficient privileges');
|
||||
}
|
||||
if (req.user.hasAccountAuth && cred.account_sid !== req.user.account_sid) {
|
||||
throw new DbErrorForbidden('Insufficient privileges');
|
||||
}
|
||||
};
|
||||
|
||||
const validateAdd = async(req) => {
|
||||
if (!req.body.speech_credential_sid) {
|
||||
throw new DbErrorBadRequest('missing speech_credential_sid');
|
||||
}
|
||||
|
||||
await validateCredentialPermission(req);
|
||||
};
|
||||
|
||||
const validateUpdate = async(req) => {
|
||||
if (req.body.speech_credential_sid) {
|
||||
await validateCredentialPermission(req);
|
||||
}
|
||||
};
|
||||
|
||||
const preconditions = {
|
||||
add: validateAdd,
|
||||
update: validateUpdate,
|
||||
};
|
||||
|
||||
decorate(router, GoogleCustomVoice, ['add', 'retrieve', 'update', 'delete'], preconditions);
|
||||
|
||||
router.get('/', async(req, res) => {
|
||||
const logger = req.app.locals.logger;
|
||||
const account_sid = req.user.account_sid || req.query.account_sid;
|
||||
const service_provider_sid = req.user.service_provider_sid || req.query.service_provider_sid;
|
||||
const speech_credential_sid = req.query.speech_credential_sid;
|
||||
const label = req.query.label;
|
||||
try {
|
||||
let results = [];
|
||||
if (speech_credential_sid) {
|
||||
const [cred] = await SpeechCredential.retrieve(speech_credential_sid);
|
||||
if (!cred) {
|
||||
return res.sendStatus(404);
|
||||
}
|
||||
if (account_sid && cred.account_sid && cred.account_sid !== account_sid) {
|
||||
throw new DbErrorForbidden('Insufficient privileges');
|
||||
}
|
||||
if (service_provider_sid && cred.service_provider_sid && cred.service_provider_sid !== service_provider_sid) {
|
||||
throw new DbErrorForbidden('Insufficient privileges');
|
||||
}
|
||||
results = await GoogleCustomVoice.retrieveAllBySpeechCredentialSid(speech_credential_sid);
|
||||
} else {
|
||||
if (!account_sid && !service_provider_sid) {
|
||||
throw new DbErrorBadRequest('missing account_sid or service_provider_sid in query parameters');
|
||||
}
|
||||
results = await GoogleCustomVoice.retrieveAllByLabel(service_provider_sid, account_sid, label);
|
||||
}
|
||||
res.status(200).json(results);
|
||||
} catch (err) {
|
||||
sysError(logger, res, err);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
module.exports = router;
|
||||
@@ -52,8 +52,6 @@ api.use('/Lcrs', require('./lcrs'));
|
||||
api.use('/LcrRoutes', require('./lcr-routes'));
|
||||
api.use('/LcrCarrierSetEntries', require('./lcr-carrier-set-entries'));
|
||||
api.use('/Clients', require('./clients'));
|
||||
// Google Custom Voices
|
||||
api.use('/GoogleCustomVoices', require('./google-custom-voices'));
|
||||
|
||||
// messaging
|
||||
api.use('/Smpps', require('./smpps')); // our smpp server info
|
||||
|
||||
@@ -100,93 +100,6 @@ const preconditions = {
|
||||
|
||||
decorate(router, Lcr, ['add', 'update', 'delete'], preconditions);
|
||||
|
||||
const validateLcrBatchAdd = async(lcr_sid, body, lookupCarrierBySid) => {
|
||||
for (const lcr_route of body) {
|
||||
lcr_route.lcr_sid = lcr_sid;
|
||||
if (!lcr_route.lcr_carrier_set_entries || lcr_route.lcr_carrier_set_entries.length === 0) {
|
||||
throw new DbErrorBadRequest('Lcr Route batch process require lcr_carrier_set_entries');
|
||||
}
|
||||
for (const entry of lcr_route.lcr_carrier_set_entries) {
|
||||
// check voip_carrier_sid is exist
|
||||
if (!entry.voip_carrier_sid) {
|
||||
throw new DbErrorBadRequest('One of lcr_carrier_set_entries is missing voip_carrier_sid');
|
||||
}
|
||||
const carrier = await lookupCarrierBySid(entry.voip_carrier_sid);
|
||||
if (!carrier) {
|
||||
throw new DbErrorBadRequest('unknown voip_carrier_sid');
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
const addNewLcrRoute = async(lcr_route) => {
|
||||
const lcr_sid = lcr_route.lcr_sid;
|
||||
const lcr_carrier_set_entries = lcr_route.lcr_carrier_set_entries;
|
||||
delete lcr_route.lcr_carrier_set_entries;
|
||||
const lcr_route_sid = await LcrRoutes.make(lcr_route);
|
||||
for (const entry of lcr_carrier_set_entries) {
|
||||
entry.lcr_route_sid = lcr_route_sid;
|
||||
const lcr_carrier_set_entry_sid = await LcrCarrierSetEntry.make(entry);
|
||||
if (lcr_route.priority === 9999) {
|
||||
// this is default lcr set entry
|
||||
const [lcr] = await Lcr.retrieve(lcr_sid);
|
||||
if (lcr) {
|
||||
lcr.default_carrier_set_entry_sid = lcr_carrier_set_entry_sid;
|
||||
delete lcr.lcr_sid;
|
||||
await Lcr.update(lcr_sid, lcr);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
router.post('/:sid/Routes', async(req, res) => {
|
||||
const results = await Lcr.retrieve(req.params.sid);
|
||||
if (results.length === 0) return res.sendStatus(404);
|
||||
const {logger, lookupCarrierBySid} = req.app.locals;
|
||||
try {
|
||||
const body = req.body;
|
||||
await validateLcrBatchAdd(req.params.sid, body, lookupCarrierBySid);
|
||||
for (const lcr_route of body) {
|
||||
await addNewLcrRoute(lcr_route, lookupCarrierBySid);
|
||||
}
|
||||
res.sendStatus(204);
|
||||
|
||||
} catch (err) {
|
||||
sysError(logger, res, err);
|
||||
}
|
||||
});
|
||||
|
||||
router.put('/:sid/Routes', async(req, res) => {
|
||||
const results = await Lcr.retrieve(req.params.sid);
|
||||
if (results.length === 0) return res.sendStatus(404);
|
||||
const {logger, lookupCarrierBySid} = req.app.locals;
|
||||
try {
|
||||
const body = req.body;
|
||||
await validateLcrBatchAdd(req.params.sid, body, lookupCarrierBySid);
|
||||
for (const lcr_route of body) {
|
||||
if (lcr_route.lcr_route_sid) {
|
||||
const lcr_route_sid = lcr_route.lcr_route_sid;
|
||||
delete lcr_route.lcr_route_sid;
|
||||
const lcr_carrier_set_entries = lcr_route.lcr_carrier_set_entries;
|
||||
delete lcr_route.lcr_carrier_set_entries;
|
||||
await LcrRoutes.update(lcr_route_sid, lcr_route);
|
||||
for (const entry of lcr_carrier_set_entries) {
|
||||
const lcr_carrier_set_entry_sid = entry.lcr_carrier_set_entry_sid;
|
||||
delete entry.lcr_carrier_set_entry_sid;
|
||||
await LcrCarrierSetEntry.update(lcr_carrier_set_entry_sid, entry);
|
||||
}
|
||||
} else {
|
||||
// Route is not available yet, let create it now
|
||||
await addNewLcrRoute(lcr_route, lookupCarrierBySid);
|
||||
}
|
||||
}
|
||||
res.sendStatus(204);
|
||||
} catch (err) {
|
||||
sysError(logger, res, err);
|
||||
}
|
||||
});
|
||||
|
||||
router.get('/', async(req, res) => {
|
||||
const logger = req.app.locals.logger;
|
||||
try {
|
||||
|
||||
@@ -13,6 +13,8 @@ WHERE up.permission_sid = p.permission_sid
|
||||
AND up.user_sid = ?
|
||||
`;
|
||||
const retrieveSql = 'SELECT * from users where name = ?';
|
||||
const tokenSql = 'SELECT token from api_keys where account_sid IS NULL AND service_provider_sid IS NULL';
|
||||
|
||||
|
||||
router.post('/', async(req, res) => {
|
||||
const {logger, incrKey, retrieveKey} = req.app.locals;
|
||||
@@ -52,6 +54,11 @@ router.post('/', async(req, res) => {
|
||||
return res.sendStatus(403);
|
||||
}
|
||||
const force_change = !!r[0].force_change;
|
||||
const [t] = await promisePool.query(tokenSql);
|
||||
if (t.length === 0) {
|
||||
logger.error('Database has no admin token provisioned...run reset_admin_password');
|
||||
return res.sendStatus(500);
|
||||
}
|
||||
|
||||
const [p] = await promisePool.query(retrievePemissionsSql, r[0].user_sid);
|
||||
const permissions = p.map((x) => x.name);
|
||||
|
||||
@@ -3,11 +3,9 @@ const assert = require('assert');
|
||||
const Account = require('../../models/account');
|
||||
const SpeechCredential = require('../../models/speech-credential');
|
||||
const sysError = require('../error');
|
||||
const {decrypt, encrypt} = require('../../utils/encrypt-decrypt');
|
||||
const {decrypt, encrypt, obscureKey} = require('../../utils/encrypt-decrypt');
|
||||
const {parseAccountSid, parseServiceProviderSid, parseSpeechCredentialSid} = require('./utils');
|
||||
const {decryptCredential, testWhisper, testDeepgramTTS,
|
||||
getLanguagesAndVoicesForVendor} = require('../../utils/speech-utils');
|
||||
const {DbErrorUnprocessableRequest, DbErrorForbidden, DbErrorBadRequest} = require('../../utils/errors');
|
||||
const {DbErrorUnprocessableRequest, DbErrorForbidden} = require('../../utils/errors');
|
||||
const {
|
||||
testGoogleTts,
|
||||
testGoogleStt,
|
||||
@@ -21,9 +19,7 @@ const {
|
||||
testDeepgramStt,
|
||||
testSonioxStt,
|
||||
testIbmTts,
|
||||
testIbmStt,
|
||||
testElevenlabs,
|
||||
testAssemblyStt
|
||||
testIbmStt
|
||||
} = require('../../utils/speech-utils');
|
||||
const {promisePool} = require('../../db');
|
||||
|
||||
@@ -130,10 +126,7 @@ const encryptCredential = (obj) => {
|
||||
instance_id,
|
||||
custom_stt_url,
|
||||
custom_tts_url,
|
||||
auth_token = '',
|
||||
cobalt_server_uri,
|
||||
model_id,
|
||||
options
|
||||
auth_token = ''
|
||||
} = obj;
|
||||
|
||||
switch (vendor) {
|
||||
@@ -203,28 +196,6 @@ const encryptCredential = (obj) => {
|
||||
const sonioxData = JSON.stringify({api_key});
|
||||
return encrypt(sonioxData);
|
||||
|
||||
case 'cobalt':
|
||||
assert(cobalt_server_uri, 'invalid cobalt speech credential: cobalt_server_uri is required');
|
||||
const cobaltData = JSON.stringify({cobalt_server_uri});
|
||||
return encrypt(cobaltData);
|
||||
|
||||
case 'elevenlabs':
|
||||
assert(api_key, 'invalid elevenLabs speech credential: api_key is required');
|
||||
assert(model_id, 'invalid elevenLabs speech credential: model_id is required');
|
||||
const elevenlabsData = JSON.stringify({api_key, model_id, options});
|
||||
return encrypt(elevenlabsData);
|
||||
|
||||
case 'assemblyai':
|
||||
assert(api_key, 'invalid assemblyai speech credential: api_key is required');
|
||||
const assemblyaiData = JSON.stringify({api_key});
|
||||
return encrypt(assemblyaiData);
|
||||
|
||||
case 'whisper':
|
||||
assert(api_key, 'invalid whisper speech credential: api_key is required');
|
||||
assert(model_id, 'invalid whisper speech credential: model_id is required');
|
||||
const whisperData = JSON.stringify({api_key, model_id});
|
||||
return encrypt(whisperData);
|
||||
|
||||
default:
|
||||
if (vendor.startsWith('custom:')) {
|
||||
const customData = JSON.stringify({auth_token, custom_stt_url, custom_tts_url});
|
||||
@@ -259,7 +230,7 @@ router.post('/', async(req, res) => {
|
||||
|
||||
// Check if vendor and label is already used for account or SP
|
||||
if (label) {
|
||||
const existingSpeech = await SpeechCredential.getSpeechCredentialsByVendorAndLabel(
|
||||
const existingSpeech = await SpeechCredential.isAvailableVendorAndLabel(
|
||||
service_provider_sid, account_sid, vendor, label);
|
||||
if (existingSpeech.length > 0) {
|
||||
throw new DbErrorUnprocessableRequest(`Label ${label} is already in use for another speech credential`);
|
||||
@@ -308,7 +279,68 @@ router.get('/', async(req, res) => {
|
||||
res.status(200).json(creds.map((c) => {
|
||||
const {credential, ...obj} = c;
|
||||
|
||||
decryptCredential(obj, credential, logger);
|
||||
if ('google' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
const key_header = '-----BEGIN PRIVATE KEY-----\n';
|
||||
const obscured = {
|
||||
...o,
|
||||
private_key: `${key_header}${obscureKey(o.private_key.slice(key_header.length, o.private_key.length))}`
|
||||
};
|
||||
obj.service_key = obscured;
|
||||
}
|
||||
else if ('aws' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.access_key_id = o.access_key_id;
|
||||
obj.secret_access_key = obscureKey(o.secret_access_key);
|
||||
obj.aws_region = o.aws_region;
|
||||
logger.info({obj, o}, 'retrieving aws speech credential');
|
||||
}
|
||||
else if ('microsoft' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.api_key = obscureKey(o.api_key);
|
||||
obj.region = o.region;
|
||||
obj.use_custom_tts = o.use_custom_tts;
|
||||
obj.custom_tts_endpoint = o.custom_tts_endpoint;
|
||||
obj.custom_tts_endpoint_url = o.custom_tts_endpoint_url;
|
||||
obj.use_custom_stt = o.use_custom_stt;
|
||||
obj.custom_stt_endpoint = o.custom_stt_endpoint;
|
||||
obj.custom_stt_endpoint_url = o.custom_stt_endpoint_url;
|
||||
logger.info({obj, o}, 'retrieving azure speech credential');
|
||||
}
|
||||
else if ('wellsaid' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.api_key = obscureKey(o.api_key);
|
||||
}
|
||||
else if ('nuance' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.client_id = o.client_id;
|
||||
obj.secret = o.secret ? obscureKey(o.secret) : null;
|
||||
}
|
||||
else if ('deepgram' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.api_key = obscureKey(o.api_key);
|
||||
}
|
||||
else if ('ibm' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.tts_api_key = obscureKey(o.tts_api_key);
|
||||
obj.tts_region = o.tts_region;
|
||||
obj.stt_api_key = obscureKey(o.stt_api_key);
|
||||
obj.stt_region = o.stt_region;
|
||||
obj.instance_id = o.instance_id;
|
||||
} else if ('nvidia' == obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.riva_server_uri = o.riva_server_uri;
|
||||
}
|
||||
else if ('soniox' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.api_key = obscureKey(o.api_key);
|
||||
}
|
||||
else if (obj.vendor.startsWith('custom:')) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.auth_token = obscureKey(o.auth_token);
|
||||
obj.custom_stt_url = o.custom_stt_url;
|
||||
obj.custom_tts_url = o.custom_tts_url;
|
||||
}
|
||||
|
||||
if (req.user.hasAccountAuth && obj.account_sid === null) {
|
||||
delete obj.api_key;
|
||||
@@ -338,7 +370,68 @@ router.get('/:sid', async(req, res) => {
|
||||
await validateRetrieveUpdateDelete(req, cred);
|
||||
|
||||
const {credential, ...obj} = cred[0];
|
||||
decryptCredential(obj, credential, logger);
|
||||
if ('google' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
const key_header = '-----BEGIN PRIVATE KEY-----\n';
|
||||
const obscured = {
|
||||
...o,
|
||||
private_key: `${key_header}${obscureKey(o.private_key.slice(key_header.length, o.private_key.length))}`
|
||||
};
|
||||
obj.service_key = JSON.stringify(obscured);
|
||||
}
|
||||
else if ('aws' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.access_key_id = o.access_key_id;
|
||||
obj.secret_access_key = obscureKey(o.secret_access_key);
|
||||
obj.aws_region = o.aws_region;
|
||||
}
|
||||
else if ('microsoft' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.api_key = obscureKey(o.api_key);
|
||||
obj.region = o.region;
|
||||
obj.use_custom_tts = o.use_custom_tts;
|
||||
obj.custom_tts_endpoint = o.custom_tts_endpoint;
|
||||
obj.custom_tts_endpoint_url = o.custom_tts_endpoint_url;
|
||||
obj.use_custom_stt = o.use_custom_stt;
|
||||
obj.custom_stt_endpoint = o.custom_stt_endpoint;
|
||||
obj.custom_stt_endpoint_url = o.custom_stt_endpoint_url;
|
||||
}
|
||||
else if ('wellsaid' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.api_key = obscureKey(o.api_key);
|
||||
}
|
||||
else if ('nuance' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.client_id = o.client_id;
|
||||
obj.secret = o.secret ? obscureKey(o.secret) : null;
|
||||
obj.nuance_tts_uri = o.nuance_tts_uri;
|
||||
obj.nuance_stt_uri = o.nuance_stt_uri;
|
||||
}
|
||||
else if ('deepgram' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.api_key = obscureKey(o.api_key);
|
||||
}
|
||||
else if ('ibm' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.tts_api_key = obscureKey(o.tts_api_key);
|
||||
obj.tts_region = o.tts_region;
|
||||
obj.stt_api_key = obscureKey(o.stt_api_key);
|
||||
obj.stt_region = o.stt_region;
|
||||
obj.instance_id = o.instance_id;
|
||||
} else if ('nvidia' == obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.riva_server_uri = o.riva_server_uri;
|
||||
}
|
||||
else if ('soniox' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.api_key = obscureKey(o.api_key);
|
||||
}
|
||||
else if (obj.vendor.startsWith('custom:')) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.auth_token = obscureKey(o.auth_token);
|
||||
obj.custom_stt_url = o.custom_stt_url;
|
||||
obj.custom_tts_url = o.custom_tts_url;
|
||||
}
|
||||
|
||||
if (req.user.hasAccountAuth && obj.account_sid === null) {
|
||||
delete obj.api_key;
|
||||
@@ -410,10 +503,7 @@ router.put('/:sid', async(req, res) => {
|
||||
custom_stt_endpoint,
|
||||
custom_stt_endpoint_url,
|
||||
custom_stt_url,
|
||||
custom_tts_url,
|
||||
cobalt_server_uri,
|
||||
model_id,
|
||||
options
|
||||
custom_tts_url
|
||||
} = req.body;
|
||||
|
||||
const newCred = {
|
||||
@@ -433,10 +523,7 @@ router.put('/:sid', async(req, res) => {
|
||||
nuance_stt_uri,
|
||||
nuance_tts_uri,
|
||||
custom_stt_url,
|
||||
custom_tts_url,
|
||||
cobalt_server_uri,
|
||||
model_id,
|
||||
options
|
||||
custom_tts_url
|
||||
};
|
||||
logger.info({o, newCred}, 'updating speech credential with this new credential');
|
||||
obj.credential = encryptCredential(newCred);
|
||||
@@ -465,7 +552,7 @@ router.put('/:sid', async(req, res) => {
|
||||
* Test a credential
|
||||
*/
|
||||
router.get('/:sid/test', async(req, res) => {
|
||||
const {logger, synthAudio} = req.app.locals;
|
||||
const logger = req.app.locals.logger;
|
||||
try {
|
||||
const sid = parseSpeechCredentialSid(req);
|
||||
const creds = await SpeechCredential.retrieve(sid);
|
||||
@@ -556,7 +643,7 @@ router.get('/:sid/test', async(req, res) => {
|
||||
} = credential;
|
||||
if (cred.use_for_tts) {
|
||||
try {
|
||||
await testMicrosoftTts(logger, synthAudio, {
|
||||
await testMicrosoftTts(logger, {
|
||||
api_key,
|
||||
region,
|
||||
use_custom_tts,
|
||||
@@ -637,16 +724,6 @@ router.get('/:sid/test', async(req, res) => {
|
||||
}
|
||||
else if (cred.vendor === 'deepgram') {
|
||||
const {api_key} = credential;
|
||||
if (cred.use_for_tts) {
|
||||
try {
|
||||
await testDeepgramTTS(logger, synthAudio, credential);
|
||||
results.tts.status = 'ok';
|
||||
SpeechCredential.ttsTestResult(sid, true);
|
||||
} catch (err) {
|
||||
results.tts = {status: 'fail', reason: err.message};
|
||||
SpeechCredential.ttsTestResult(sid, false);
|
||||
}
|
||||
}
|
||||
if (cred.use_for_stt) {
|
||||
try {
|
||||
await testDeepgramStt(logger, {api_key});
|
||||
@@ -703,41 +780,6 @@ router.get('/:sid/test', async(req, res) => {
|
||||
SpeechCredential.sttTestResult(sid, false);
|
||||
}
|
||||
}
|
||||
} else if (cred.vendor === 'elevenlabs') {
|
||||
const {api_key, model_id} = credential;
|
||||
if (cred.use_for_tts) {
|
||||
try {
|
||||
await testElevenlabs(logger, {api_key, model_id});
|
||||
results.tts.status = 'ok';
|
||||
SpeechCredential.ttsTestResult(sid, true);
|
||||
} catch (err) {
|
||||
results.tts = {status: 'fail', reason: err.message};
|
||||
SpeechCredential.ttsTestResult(sid, false);
|
||||
}
|
||||
}
|
||||
} else if (cred.vendor === 'assemblyai') {
|
||||
const {api_key} = credential;
|
||||
if (cred.use_for_stt) {
|
||||
try {
|
||||
await testAssemblyStt(logger, {api_key});
|
||||
results.stt.status = 'ok';
|
||||
SpeechCredential.sttTestResult(sid, true);
|
||||
} catch (err) {
|
||||
results.stt = {status: 'fail', reason: err.message};
|
||||
SpeechCredential.sttTestResult(sid, false);
|
||||
}
|
||||
}
|
||||
} else if (cred.vendor === 'whisper') {
|
||||
if (cred.use_for_tts) {
|
||||
try {
|
||||
await testWhisper(logger, synthAudio, credential);
|
||||
results.tts.status = 'ok';
|
||||
SpeechCredential.ttsTestResult(sid, true);
|
||||
} catch (err) {
|
||||
results.tts = {status: 'fail', reason: err.message};
|
||||
SpeechCredential.ttsTestResult(sid, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
res.status(200).json(results);
|
||||
@@ -747,34 +789,4 @@ router.get('/:sid/test', async(req, res) => {
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Fetch speech voices and languages
|
||||
*/
|
||||
|
||||
router.get('/speech/supportedLanguagesAndVoices', async(req, res) => {
|
||||
const logger = req.app.locals.logger;
|
||||
try {
|
||||
const {vendor, label} = req.query;
|
||||
if (!vendor) {
|
||||
throw new DbErrorBadRequest('vendor is required');
|
||||
}
|
||||
const account_sid = req.user.account_sid || req.body.account_sid;
|
||||
const service_provider_sid = req.user.service_provider_sid ||
|
||||
req.body.service_provider_sid || parseServiceProviderSid(req);
|
||||
|
||||
const credentials = await SpeechCredential.getSpeechCredentialsByVendorAndLabel(
|
||||
service_provider_sid, account_sid, vendor, label);
|
||||
const tmp = credentials && credentials.length > 0 ? credentials[0] : null;
|
||||
const cred = tmp ? JSON.parse(decrypt(tmp.credential)) : null;
|
||||
try {
|
||||
const data = await getLanguagesAndVoicesForVendor(logger, vendor, cred);
|
||||
res.status(200).json(data);
|
||||
} catch (err) {
|
||||
throw new DbErrorUnprocessableRequest(err.message);
|
||||
}
|
||||
} catch (err) {
|
||||
sysError(logger, res, err);
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
|
||||
@@ -2,14 +2,6 @@ const router = require('express').Router();
|
||||
const {
|
||||
parseAccountSid
|
||||
} = require('./utils');
|
||||
const SpeechCredential = require('../../models/speech-credential');
|
||||
const fs = require('fs');
|
||||
const { v4: uuidv4 } = require('uuid');
|
||||
const {DbErrorBadRequest} = require('../../utils/errors');
|
||||
const Account = require('../../models/account');
|
||||
const sysError = require('../error');
|
||||
const { getSpeechCredential, decryptCredential } = require('../../utils/speech-utils');
|
||||
const PCMToMP3Encoder = require('../../record/encoder');
|
||||
|
||||
router.delete('/', async(req, res) => {
|
||||
const {purgeTtsCache} = req.app.locals;
|
||||
@@ -34,93 +26,4 @@ router.get('/', async(req, res) => {
|
||||
res.status(200).json({size});
|
||||
});
|
||||
|
||||
router.post('/Synthesize', async(req, res) => {
|
||||
const {logger, synthAudio} = req.app.locals;
|
||||
try {
|
||||
const accountSid = parseAccountSid(req);
|
||||
const body = req.body;
|
||||
const encodingMp3 = req.body.encodingMp3 || false;
|
||||
if (!body.speech_credential_sid || !body.text || !body.language || !body.voice) {
|
||||
throw new DbErrorBadRequest('speech_credential_sid, text, language, voice are all required');
|
||||
}
|
||||
|
||||
const result = await Account.retrieve(accountSid);
|
||||
if (!result || result.length === 0 || !result[0].is_active) {
|
||||
throw new DbErrorBadRequest(`Account not found for sid ${accountSid}`);
|
||||
}
|
||||
const credentials = await SpeechCredential.retrieve(body.speech_credential_sid);
|
||||
if (!credentials || credentials.length === 0) {
|
||||
throw new
|
||||
DbErrorBadRequest(`There is no available speech credential for ${body.speech_credential_sid}`);
|
||||
}
|
||||
const {credential, ...obj} = credentials[0];
|
||||
|
||||
decryptCredential(obj, credential, logger, false);
|
||||
const cred = getSpeechCredential(obj, logger);
|
||||
|
||||
const { text, language, engine = 'standard' } = body;
|
||||
const salt = uuidv4();
|
||||
/* parse Nuance voices into name and model */
|
||||
let voice = body.voice;
|
||||
let model;
|
||||
if (cred.vendor === 'nuance' && voice) {
|
||||
const arr = /([A-Za-z-]*)\s+-\s+(enhanced|standard)/.exec(voice);
|
||||
if (arr) {
|
||||
voice = arr[1];
|
||||
model = arr[2];
|
||||
}
|
||||
}
|
||||
const stats = {
|
||||
histogram: () => {},
|
||||
increment: () => {},
|
||||
};
|
||||
const { filePath } = await synthAudio(stats, {
|
||||
account_sid: accountSid,
|
||||
text,
|
||||
vendor: cred.vendor,
|
||||
language,
|
||||
voice,
|
||||
engine,
|
||||
model,
|
||||
salt,
|
||||
credentials: cred,
|
||||
disableTtsCache: false
|
||||
});
|
||||
|
||||
let contentType = 'audio/mpeg';
|
||||
|
||||
let readStream = fs.createReadStream(filePath);
|
||||
if (['nuance', 'nvidia'].includes(cred.vendor) ||
|
||||
(
|
||||
process.env.JAMBONES_TTS_TRIM_SILENCE &&
|
||||
['microsoft', 'azure'].includes(cred.vendor)
|
||||
)
|
||||
) {
|
||||
if (encodingMp3) {
|
||||
readStream = readStream
|
||||
.pipe(new PCMToMP3Encoder({
|
||||
channels: 1,
|
||||
sampleRate: 8000,
|
||||
bitRate: 128
|
||||
}, logger));
|
||||
} else {
|
||||
contentType = 'application/octet-stream';
|
||||
}
|
||||
}
|
||||
res.writeHead(200, {
|
||||
'Content-Type': contentType,
|
||||
});
|
||||
readStream.pipe(res);
|
||||
readStream.on('end', () => {
|
||||
fs.unlink(filePath, (err) => {
|
||||
if (err) throw err;
|
||||
logger.info(`${filePath} was deleted`);
|
||||
});
|
||||
});
|
||||
|
||||
} catch (err) {
|
||||
sysError(logger, res, err);
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
openapi: 3.0.0
|
||||
info:
|
||||
title: Jambonz REST API
|
||||
description: Jambonz REST API specification
|
||||
title: jambonz REST API
|
||||
description: jambonz REST API
|
||||
contact:
|
||||
email: daveh@drachtio.org
|
||||
license:
|
||||
@@ -44,8 +44,6 @@ tags:
|
||||
description: Least Cost Routing Routes operations
|
||||
- name: LcrCarrierSetEntries
|
||||
description: Least Cost Routing Carrier Set Entries operation
|
||||
- name: GoogleCustomVoices
|
||||
description: Google Custom voices operation
|
||||
paths:
|
||||
/BetaInviteCodes:
|
||||
post:
|
||||
@@ -2072,35 +2070,6 @@ paths:
|
||||
description: credential successfully deleted
|
||||
404:
|
||||
description: credential not found
|
||||
/ServiceProviders/{ServiceProviderSid}/SpeechCredentials/speech/supportedLanguagesAndVoices:
|
||||
get:
|
||||
tags:
|
||||
- Service Providers
|
||||
summary: get supported languages, voices and models
|
||||
operationId: supportedLanguagesAndVoices
|
||||
parameters:
|
||||
- name: vendor
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: label
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
200:
|
||||
description: get supported languages, voices and models
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/SpeechLanguagesVoices'
|
||||
500:
|
||||
description: system error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GeneralError'
|
||||
/ServiceProviders/{ServiceProviderSid}/SpeechCredentials/{SpeechCredentialSid}/test:
|
||||
get:
|
||||
tags:
|
||||
@@ -2961,35 +2930,6 @@ paths:
|
||||
description: credential successfully deleted
|
||||
404:
|
||||
description: credential not found
|
||||
/Accounts/{AccountSid}/SpeechCredentials/speech/supportedLanguagesAndVoices:
|
||||
get:
|
||||
tags:
|
||||
- Accounts
|
||||
summary: get supported languages, voices and models
|
||||
operationId: supportedLanguagesAndVoices
|
||||
parameters:
|
||||
- name: vendor
|
||||
in: query
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: label
|
||||
in: query
|
||||
schema:
|
||||
type: string
|
||||
responses:
|
||||
200:
|
||||
description: get supported languages, voices and models
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/SpeechLanguagesVoices'
|
||||
500:
|
||||
description: system error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GeneralError'
|
||||
/Accounts/{AccountSid}/SpeechCredentials/{SpeechCredentialSid}/test:
|
||||
get:
|
||||
tags:
|
||||
@@ -3857,7 +3797,7 @@ paths:
|
||||
/Accounts/{AccountSid}/Calls:
|
||||
post:
|
||||
tags:
|
||||
- Accounts
|
||||
- Accounts
|
||||
summary: create a call
|
||||
operationId: createCall
|
||||
parameters:
|
||||
@@ -3916,10 +3856,6 @@ paths:
|
||||
type: object
|
||||
description: The customer SIP headers to associate with the call
|
||||
example: {"X-Custom-Header": "Hello"}
|
||||
sipRequestWithinDialogHook:
|
||||
type: string
|
||||
description: The sip indialog hook to receive session messages
|
||||
example: '/customHook'
|
||||
responses:
|
||||
201:
|
||||
description: call successfully created
|
||||
@@ -4228,133 +4164,6 @@ paths:
|
||||
type: string
|
||||
length:
|
||||
type: string
|
||||
/Accounts/{AccountSid}/RegisteredSipUsers:
|
||||
parameters:
|
||||
- name: AccountSid
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
get:
|
||||
tags:
|
||||
- Accounts
|
||||
summary: retrieve online sip users for an account
|
||||
operationId: listQueues
|
||||
responses:
|
||||
200:
|
||||
description: retrieve online sip users for an account
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
post:
|
||||
tags:
|
||||
- Accounts
|
||||
summary: retrieve online sip users for an account by list of sip username
|
||||
operationId: listRegisteredSipUsers
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
responses:
|
||||
200:
|
||||
description: retrieve online sip users for an account
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/RegisteredClient'
|
||||
/Accounts/{AccountSid}/RegisteredSipUsers/{Client}:
|
||||
parameters:
|
||||
- name: Client
|
||||
in: path
|
||||
required: true
|
||||
style: simple
|
||||
explode: false
|
||||
schema:
|
||||
type: string
|
||||
get:
|
||||
tags:
|
||||
- Accounts
|
||||
summary: retrieve registered client registration
|
||||
operationId: getRegisteredClient
|
||||
responses:
|
||||
200:
|
||||
description: registered client found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/RegisteredClient'
|
||||
/Accounts/{AccountSid}/TtsCache/Synthesize:
|
||||
post:
|
||||
tags:
|
||||
- Accounts
|
||||
summary: get TTS from provider
|
||||
operationId: Synthesize
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
speech_credential_sid:
|
||||
type: string
|
||||
description: Speech credential Sid
|
||||
example: 553b4b6b-8918-4394-a46d-1e3c5a3c717b
|
||||
text:
|
||||
type: string
|
||||
description: the text to convert to audio
|
||||
example: Hello How are you
|
||||
language:
|
||||
type: string
|
||||
description: language is used in text
|
||||
example: en-US
|
||||
voice:
|
||||
type: string
|
||||
description: voice ID
|
||||
example: en-US-Standard-C
|
||||
encodingMp3:
|
||||
type: boolean
|
||||
description: convert audio to mp3.
|
||||
example: true
|
||||
required:
|
||||
- speech_credential_sid
|
||||
- text
|
||||
- language
|
||||
- voice
|
||||
responses:
|
||||
200:
|
||||
description: Audio is created
|
||||
content:
|
||||
audio/mpeg:
|
||||
schema:
|
||||
type: string
|
||||
format: binary
|
||||
400:
|
||||
description: bad request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GeneralError'
|
||||
422:
|
||||
description: unprocessable entity
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GeneralError'
|
||||
500:
|
||||
description: system error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GeneralError'
|
||||
/Lcrs:
|
||||
post:
|
||||
tags:
|
||||
@@ -4502,69 +4311,6 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GeneralError'
|
||||
/Lcrs/{LcrSid}/Routes:
|
||||
parameters:
|
||||
- name: LcrSid
|
||||
in: path
|
||||
required: true
|
||||
style: simple
|
||||
explode: false
|
||||
schema:
|
||||
type: string
|
||||
post:
|
||||
tags:
|
||||
- Lcrs
|
||||
summary: Create least cost routing routes and carrier set entries
|
||||
operationId: createLeastCostRoutingRoutesAndCarrierEntries
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/LcrRoutes'
|
||||
responses:
|
||||
204:
|
||||
description: least cost routing routes and carrier set entries created
|
||||
400:
|
||||
description: bad request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GeneralError'
|
||||
404:
|
||||
description: least cost routing not found
|
||||
500:
|
||||
description: system error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GeneralError'
|
||||
put:
|
||||
tags:
|
||||
- Lcrs
|
||||
summary: update least cost routing routes and carrier set entries
|
||||
operationId: updateLeastCostRoutingRoutesAndCarrierEntries
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/LcrRoutes'
|
||||
responses:
|
||||
204:
|
||||
description: least cost routing ruoutes and carrier entries updated
|
||||
400:
|
||||
description: bad request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GeneralError'
|
||||
404:
|
||||
description: least cost routing not found
|
||||
500:
|
||||
description: system error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GeneralError'
|
||||
/LcrRoutes:
|
||||
post:
|
||||
tags:
|
||||
@@ -4857,173 +4603,6 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GeneralError'
|
||||
/GoogleCustomVoices:
|
||||
post:
|
||||
tags:
|
||||
- GoogleCustomVoices
|
||||
summary: create a Google custom voice
|
||||
operationId: createGoogleCustomVoice
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/GoogleCustomVoice'
|
||||
required:
|
||||
- speech_credential_sid
|
||||
- name
|
||||
- reported_usage
|
||||
- model
|
||||
responses:
|
||||
201:
|
||||
description: Least Cost Routing Carrier Set Entry successfully created
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/SuccessfulAdd'
|
||||
400:
|
||||
description: bad request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GeneralError'
|
||||
422:
|
||||
description: unprocessable entity
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GeneralError'
|
||||
500:
|
||||
description: system error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GeneralError'
|
||||
get:
|
||||
tags:
|
||||
- GoogleCustomVoices
|
||||
parameters:
|
||||
- in: query
|
||||
name: service_provider_sid
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
description: return only the google voice custom operated belong to this service provider
|
||||
- in: query
|
||||
name: account_sid
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
description: return only the google voice custom operated belong to this account_sid
|
||||
|
||||
- in: query
|
||||
name: speech_credential_sid
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
description: return only the google voice custom operated belong to this speech credential
|
||||
summary: list google custom voices
|
||||
operationId: listGoogleCustomVoices
|
||||
responses:
|
||||
200:
|
||||
description: list oflist google custom voices
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/GoogleCustomVoice'
|
||||
500:
|
||||
description: system error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GeneralError'
|
||||
/GoogleCustomVoices/{GoogleCustomVoiceSid}:
|
||||
parameters:
|
||||
- name: GoogleCustomVoiceSid
|
||||
in: path
|
||||
required: true
|
||||
style: simple
|
||||
explode: false
|
||||
schema:
|
||||
type: string
|
||||
delete:
|
||||
tags:
|
||||
- GoogleCustomVoices
|
||||
summary: delete a google custom voice
|
||||
operationId: deleteGoogleCustomVoice
|
||||
responses:
|
||||
204:
|
||||
description: google custom voice successfully deleted
|
||||
404:
|
||||
description: google custom voice not found
|
||||
422:
|
||||
description: unprocessable entity
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GeneralError'
|
||||
example:
|
||||
msg: a service provider with active accounts can not be deleted
|
||||
500:
|
||||
description: system error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GeneralError'
|
||||
get:
|
||||
tags:
|
||||
- GoogleCustomVoices
|
||||
summary: retrieve google custom voice
|
||||
operationId: getGoogleCustomVoice
|
||||
responses:
|
||||
200:
|
||||
description: google custom voice found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GoogleCustomVoice'
|
||||
404:
|
||||
description: google custom voice not found
|
||||
500:
|
||||
description: system error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GeneralError'
|
||||
put:
|
||||
tags:
|
||||
- GoogleCustomVoices
|
||||
summary: update google custom voice
|
||||
operationId: updateGoogleCustomVoice
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GoogleCustomVoice'
|
||||
responses:
|
||||
204:
|
||||
description: google custom voice updated
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GoogleCustomVoice'
|
||||
400:
|
||||
description: bad request
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GeneralError'
|
||||
404:
|
||||
description: least cost routing carrier set entry not found
|
||||
500:
|
||||
description: system error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/GeneralError'
|
||||
components:
|
||||
securitySchemes:
|
||||
bearerAuth:
|
||||
@@ -5982,122 +5561,6 @@ components:
|
||||
- lcr_route_sid
|
||||
- voip_carrier_sid
|
||||
- priority
|
||||
LcrRouteAndCarrierEntries:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/LcrRoute'
|
||||
- type: object
|
||||
properties:
|
||||
lcr_carrier_set_entries:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/LcrCarrierSetEntry'
|
||||
LcrRoutes:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/LcrRouteAndCarrierEntries'
|
||||
GoogleCustomVoice:
|
||||
type: object
|
||||
properties:
|
||||
speech_credential_sid:
|
||||
type: string
|
||||
example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
|
||||
name:
|
||||
type: string
|
||||
example: Sally
|
||||
reported_usage:
|
||||
type: string
|
||||
example: REALTIME
|
||||
model:
|
||||
type: string
|
||||
example: projects/12412312/locations/global/models/2134124123-2dbf-43be-9593-12314123
|
||||
required:
|
||||
- speech_credential_sid
|
||||
- name
|
||||
- reported_usage
|
||||
- model
|
||||
RegisteredClient:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
example: xhoaluu
|
||||
contact:
|
||||
type: string
|
||||
example: sip:0dluqjt6@od41sl9jfc9m.invalid;transport=ws
|
||||
expiryTime:
|
||||
type: number
|
||||
example: 1698981449173
|
||||
protocol:
|
||||
type: string
|
||||
example: wss
|
||||
allow_direct_app_calling:
|
||||
type: number
|
||||
example: 1
|
||||
allow_direct_queue_calling:
|
||||
type: number
|
||||
example: 1
|
||||
allow_direct_user_calling:
|
||||
type: number
|
||||
example: 1
|
||||
registered_status:
|
||||
type: string
|
||||
enum:
|
||||
- active
|
||||
- inactive
|
||||
required:
|
||||
- speech_credential_sid
|
||||
- name
|
||||
- reported_usage
|
||||
- model
|
||||
TtsModel:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
example: Turbo v2
|
||||
value:
|
||||
type: string
|
||||
example: eleven_turbo_v2
|
||||
LanguageVoice:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
example: Standard-A (Female)
|
||||
value:
|
||||
type: string
|
||||
example: ar-XA-Standard-A
|
||||
LanguageVoices:
|
||||
type: object
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
example: English (US)
|
||||
value:
|
||||
type: string
|
||||
example: en-US
|
||||
voices:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/LanguageVoice'
|
||||
|
||||
SpeechLanguagesVoices:
|
||||
type: object
|
||||
properties:
|
||||
tts:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/LanguageVoices'
|
||||
stt:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/LanguageVoice'
|
||||
ttsModel:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/components/schemas/TtsModel'
|
||||
|
||||
|
||||
|
||||
security:
|
||||
- bearerAuth: []
|
||||
@@ -89,12 +89,7 @@ const createDnsRecords = async(logger, domain, name, value, ttl = 3600) => {
|
||||
const str = await res.text();
|
||||
return JSON.parse(str);
|
||||
}
|
||||
let body;
|
||||
try {
|
||||
body = await res.json();
|
||||
} catch (err) {
|
||||
}
|
||||
logger.error({headers: res.headers, body}, `Error creating records, status ${res.statusCode}`);
|
||||
logger.error({res}, 'Error creating records');
|
||||
} catch (err) {
|
||||
logger.error({err}, 'Error retrieving domains');
|
||||
}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
module.exports = [
|
||||
{ name: 'Global English', value: 'en' },
|
||||
{ name: 'Australian English', value: 'en_au' },
|
||||
{ name: 'British English', value: 'en_uk' },
|
||||
{ name: 'US English', value: 'en_us' },
|
||||
{ name: 'Spanish', value: 'es' },
|
||||
{ name: 'French', value: 'fr' },
|
||||
{ name: 'German', value: 'de' },
|
||||
{ name: 'Italian', value: 'it' },
|
||||
{ name: 'Portuguese', value: 'pt' },
|
||||
{ name: 'Dutch', value: 'nl' },
|
||||
{ name: 'Hindi', value: 'hi' },
|
||||
{ name: 'Japanese', value: 'ja' },
|
||||
{ name: 'Chinese', value: 'zh' },
|
||||
{ name: 'Finnish', value: 'fi' },
|
||||
{ name: 'Korean', value: 'ko' },
|
||||
{ name: 'Polish', value: 'pl' },
|
||||
{ name: 'Russian', value: 'ru' },
|
||||
{ name: 'Turkish', value: 'tr' },
|
||||
{ name: 'Ukrainian', value: 'uk' },
|
||||
{ name: 'Vietnamese', value: 'vi' },
|
||||
];
|
||||
@@ -1,10 +0,0 @@
|
||||
module.exports = [
|
||||
{ name: 'Australian English', value: 'en-AU' },
|
||||
{ name: 'British English', value: 'en-GB' },
|
||||
{ name: 'US English', value: 'en-US' },
|
||||
{ name: 'French', value: 'fr-FR' },
|
||||
{ name: 'Canadian French', value: 'fr-CA' },
|
||||
{ name: 'German', value: 'de-DE' },
|
||||
{ name: 'Italian', value: 'it-IT' },
|
||||
{ name: 'US Spanish', value: 'es-US' },
|
||||
];
|
||||
@@ -1,26 +0,0 @@
|
||||
module.exports = [
|
||||
{
|
||||
name: 'English US',
|
||||
value: 'en_US-8khz',
|
||||
},
|
||||
{
|
||||
name: 'English UK',
|
||||
value: 'en_UK-8khz',
|
||||
},
|
||||
{
|
||||
name: 'Spanish',
|
||||
value: 'es_xx-8khz',
|
||||
},
|
||||
{
|
||||
name: 'French',
|
||||
value: 'fr_fr-8khz',
|
||||
},
|
||||
{
|
||||
name: 'Russian',
|
||||
value: 'ru_ru-8khz',
|
||||
},
|
||||
{
|
||||
name: 'Portuguese',
|
||||
value: 'pt_br-8khz',
|
||||
},
|
||||
];
|
||||
@@ -1,138 +0,0 @@
|
||||
module.exports = [
|
||||
{
|
||||
name: 'Chinese - general',
|
||||
value: 'zh',
|
||||
},
|
||||
{
|
||||
name: 'Chinese (China)',
|
||||
value: 'zh-CN',
|
||||
},
|
||||
{
|
||||
name: 'Chinese (Taiwan)',
|
||||
value: 'zh-TW',
|
||||
},
|
||||
{
|
||||
name: 'Dutch - general',
|
||||
value: 'nl',
|
||||
},
|
||||
{
|
||||
name: 'English - general',
|
||||
value: 'en',
|
||||
},
|
||||
{
|
||||
name: 'English (Australia)',
|
||||
value: 'en-AU',
|
||||
},
|
||||
{
|
||||
name: 'English (United Kingdom)',
|
||||
value: 'en-GB',
|
||||
},
|
||||
{
|
||||
name: 'English (India)',
|
||||
value: 'en-IN',
|
||||
},
|
||||
{
|
||||
name: 'English (New Zealand)',
|
||||
value: 'en-NZ',
|
||||
},
|
||||
{
|
||||
name: 'English (United States)',
|
||||
value: 'en-US',
|
||||
},
|
||||
{
|
||||
name: 'French - general',
|
||||
value: 'fr',
|
||||
},
|
||||
{
|
||||
name: 'French (Canada)',
|
||||
value: 'fr-CA',
|
||||
},
|
||||
{
|
||||
name: 'German - general',
|
||||
value: 'de',
|
||||
},
|
||||
{
|
||||
name: 'Hindi - general',
|
||||
value: 'hi',
|
||||
},
|
||||
{
|
||||
name: 'Hindi (Roman Script)',
|
||||
value: 'hi-Latin',
|
||||
},
|
||||
{
|
||||
name: 'Indonesian - general',
|
||||
value: 'in',
|
||||
},
|
||||
{
|
||||
name: 'Italian - general',
|
||||
value: 'it',
|
||||
},
|
||||
{
|
||||
name: 'Japanese - general',
|
||||
value: 'ja',
|
||||
},
|
||||
{
|
||||
name: 'Korean - general',
|
||||
value: 'ko',
|
||||
},
|
||||
{
|
||||
name: 'Norwegian - general',
|
||||
value: 'no',
|
||||
},
|
||||
{
|
||||
name: 'Polish - general',
|
||||
value: 'pl',
|
||||
},
|
||||
{
|
||||
name: 'Portuguese - general',
|
||||
value: 'pt',
|
||||
},
|
||||
{
|
||||
name: 'Portuguese (Brazil)',
|
||||
value: 'pt-BR',
|
||||
},
|
||||
{
|
||||
name: 'Portuguese (Portugal)',
|
||||
value: 'pt-PT',
|
||||
},
|
||||
{
|
||||
name: 'Russian - general',
|
||||
value: 'ru',
|
||||
},
|
||||
{
|
||||
name: 'Spanish - general',
|
||||
value: 'es',
|
||||
},
|
||||
{
|
||||
name: 'Spanish (Latin America)',
|
||||
value: 'es-419',
|
||||
},
|
||||
{
|
||||
name: 'Swedish - general',
|
||||
value: 'sv',
|
||||
},
|
||||
{
|
||||
name: 'Turkish - general',
|
||||
value: 'tr',
|
||||
},
|
||||
{
|
||||
name: 'Ukrainian - general',
|
||||
value: 'uk',
|
||||
},
|
||||
{
|
||||
name: 'Flemish - general',
|
||||
value: 'nl-BE',
|
||||
},
|
||||
{
|
||||
name: 'Danish - general',
|
||||
value: 'da',
|
||||
},
|
||||
{
|
||||
name: 'Tamil - general',
|
||||
value: 'ta',
|
||||
},
|
||||
{
|
||||
name: 'Tamasheq - general',
|
||||
value: 'taq',
|
||||
},
|
||||
];
|
||||
@@ -1,130 +0,0 @@
|
||||
module.exports = [
|
||||
{ name: 'Afrikaans (South Africa)', value: 'af-ZA' },
|
||||
{ name: 'Albanian (Albania)', value: 'sq-AL' },
|
||||
{ name: 'Amharic (Ethiopia)', value: 'am-ET' },
|
||||
{ name: 'Arabic (Algeria)', value: 'ar-DZ' },
|
||||
{ name: 'Arabic (Bahrain)', value: 'ar-BH' },
|
||||
{ name: 'Arabic (Egypt)', value: 'ar-EG' },
|
||||
{ name: 'Arabic (Iraq)', value: 'ar-IQ' },
|
||||
{ name: 'Arabic (Israel)', value: 'ar-IL' },
|
||||
{ name: 'Arabic (Jordan)', value: 'ar-JO' },
|
||||
{ name: 'Arabic (Kuwait)', value: 'ar-KW' },
|
||||
{ name: 'Arabic (Lebanon)', value: 'ar-LB' },
|
||||
{ name: 'Arabic (Morocco)', value: 'ar-MA' },
|
||||
{ name: 'Arabic (Oman)', value: 'ar-OM' },
|
||||
{ name: 'Arabic (Qatar)', value: 'ar-QA' },
|
||||
{ name: 'Arabic (Saudi Arabia)', value: 'ar-SA' },
|
||||
{ name: 'Arabic (State of Palestine)', value: 'ar-PS' },
|
||||
{ name: 'Arabic (Tunisia)', value: 'ar-TN' },
|
||||
{ name: 'Arabic (United Arab Emirates)', value: 'ar-AE' },
|
||||
{ name: 'Armenian (Armenia)', value: 'hy-AM' },
|
||||
{ name: 'Azerbaijani (Azerbaijan)', value: 'az-AZ' },
|
||||
{ name: 'Basque (Spain)', value: 'eu-ES' },
|
||||
{ name: 'Bengali (Bangladesh)', value: 'bn-BD' },
|
||||
{ name: 'Bengali (India)', value: 'bn-IN' },
|
||||
{ name: 'Bulgarian (Bulgaria)', value: 'bg-BG' },
|
||||
{ name: 'Burmese (Myanmar)', value: 'my-MM' },
|
||||
{ name: 'Catalan (Spain)', value: 'ca-ES' },
|
||||
{ name: 'Chinese, Cantonese (Traditional, Hong Kong)', value: 'yue-Hant-HK' },
|
||||
{ name: 'Chinese, Mandarin (Simplified, China)', value: 'zh' },
|
||||
{ name: 'Chinese, Mandarin (Simplified, Hong Kong)', value: 'zh-HK' },
|
||||
{ name: 'Chinese, Mandarin (Simplified, Taiwan)', value: 'zh-TW' },
|
||||
{ name: 'Croatian (Croatia)', value: 'hr-HR' },
|
||||
{ name: 'Czech (Czech Republic)', value: 'cs-CZ' },
|
||||
{ name: 'Danish (Denmark)', value: 'da-DK' },
|
||||
{ name: 'Dutch (Belgium)', value: 'nl-BE' },
|
||||
{ name: 'Dutch (Netherlands)', value: 'nl-NL' },
|
||||
{ name: 'English (Australia)', value: 'en-AU' },
|
||||
{ name: 'English (Canada)', value: 'en-CA' },
|
||||
{ name: 'English (Ghana)', value: 'en-GH' },
|
||||
{ name: 'English (India)', value: 'en-IN' },
|
||||
{ name: 'English (Ireland)', value: 'en-IE' },
|
||||
{ name: 'English (Kenya)', value: 'en-KE' },
|
||||
{ name: 'English (New Zealand)', value: 'en-NZ' },
|
||||
{ name: 'English (Nigeria)', value: 'en-NG' },
|
||||
{ name: 'English (Philippines)', value: 'en-PH' },
|
||||
{ name: 'English (Singapore)', value: 'en-SG' },
|
||||
{ name: 'English (South Africa)', value: 'en-ZA' },
|
||||
{ name: 'English (Tanzania)', value: 'en-TZ' },
|
||||
{ name: 'English (United Kingdom)', value: 'en-GB' },
|
||||
{ name: 'English (United States)', value: 'en-US' },
|
||||
{ name: 'Estonian (Estonia)', value: 'et-EE' },
|
||||
{ name: 'Filipino (Philippines)', value: 'fil-PH' },
|
||||
{ name: 'Finnish (Finland)', value: 'fi-FI' },
|
||||
{ name: 'French (Canada)', value: 'fr-CA' },
|
||||
{ name: 'French (France)', value: 'fr-FR' },
|
||||
{ name: 'Galician (Spain)', value: 'gl-ES' },
|
||||
{ name: 'Georgian (Georgia)', value: 'ka-GE' },
|
||||
{ name: 'German (Germany)', value: 'de-DE' },
|
||||
{ name: 'Greek (Greece)', value: 'el-GR' },
|
||||
{ name: 'Gujarati (India)', value: 'gu-IN' },
|
||||
{ name: 'Hebrew (Israel)', value: 'he-IL' },
|
||||
{ name: 'Hindi (India)', value: 'hi-IN' },
|
||||
{ name: 'Hungarian (Hungary)', value: 'hu-HU' },
|
||||
{ name: 'Icelandic (Iceland)', value: 'is-IS' },
|
||||
{ name: 'Indonesian (Indonesia)', value: 'id-ID' },
|
||||
{ name: 'Italian (Italy)', value: 'it-IT' },
|
||||
{ name: 'Japanese (Japan)', value: 'ja-JP' },
|
||||
{ name: 'Javanese (Indonesia)', value: 'jv-ID' },
|
||||
{ name: 'Kannada (India)', value: 'kn-IN' },
|
||||
{ name: 'Khmer (Cambodia)', value: 'km-KH' },
|
||||
{ name: 'Korean (South Korea)', value: 'ko-KR' },
|
||||
{ name: 'Lao (Laos)', value: 'lo-LA' },
|
||||
{ name: 'Latvian (Latvia)', value: 'lv-LV' },
|
||||
{ name: 'Lithuanian (Lithuania)', value: 'lt-LT' },
|
||||
{ name: 'Macedonian (North Macedonia)', value: 'mk-MK' },
|
||||
{ name: 'Malay (Malaysia)', value: 'ms-MY' },
|
||||
{ name: 'Malayalam (India)', value: 'ml-IN' },
|
||||
{ name: 'Marathi (India)', value: 'mr-IN' },
|
||||
{ name: 'Mongolian (Mongolia)', value: 'mn-MN' },
|
||||
{ name: 'Nepali (Nepal)', value: 'ne-NP' },
|
||||
{ name: 'Norwegian Bokmål (Norway)', value: 'nb-NO' },
|
||||
{ name: 'Persian (Iran)', value: 'fa-IR' },
|
||||
{ name: 'Polish (Poland)', value: 'pl-PL' },
|
||||
{ name: 'Portuguese (Brazil)', value: 'pt-BR' },
|
||||
{ name: 'Portuguese (Portugal)', value: 'pt-PT' },
|
||||
{ name: 'Punjabi (Gurmukhi, India)', value: 'pa-guru-IN' },
|
||||
{ name: 'Romanian (Romania)', value: 'ro-RO' },
|
||||
{ name: 'Russian (Russia)', value: 'ru-RU' },
|
||||
{ name: 'Serbian (Serbia)', value: 'sr-RS' },
|
||||
{ name: 'Sinhala (Sri Lanka)', value: 'si-LK' },
|
||||
{ name: 'Slovak (Slovakia)', value: 'sk-SK' },
|
||||
{ name: 'Slovenian (Slovenia)', value: 'sl-SI' },
|
||||
{ name: 'Spanish (Argentina)', value: 'es-AR' },
|
||||
{ name: 'Spanish (Bolivia)', value: 'es-BO' },
|
||||
{ name: 'Spanish (Chile)', value: 'es-CL' },
|
||||
{ name: 'Spanish (Colombia)', value: 'es-CO' },
|
||||
{ name: 'Spanish (Costa Rica)', value: 'es-CR' },
|
||||
{ name: 'Spanish (Dominican Republic)', value: 'es-DO' },
|
||||
{ name: 'Spanish (Ecuador)', value: 'es-EC' },
|
||||
{ name: 'Spanish (El Salvador)', value: 'es-SV' },
|
||||
{ name: 'Spanish (Guatemala)', value: 'es-GT' },
|
||||
{ name: 'Spanish (Honduras)', value: 'es-HN' },
|
||||
{ name: 'Spanish (Mexico)', value: 'es-MX' },
|
||||
{ name: 'Spanish (Nicaragua)', value: 'es-NI' },
|
||||
{ name: 'Spanish (Panama)', value: 'es-PA' },
|
||||
{ name: 'Spanish (Paraguay)', value: 'es-PY' },
|
||||
{ name: 'Spanish (Peru)', value: 'es-PE' },
|
||||
{ name: 'Spanish (Puerto Rico)', value: 'es-PR' },
|
||||
{ name: 'Spanish (Spain)', value: 'es-ES' },
|
||||
{ name: 'Spanish (United States)', value: 'es-US' },
|
||||
{ name: 'Spanish (Uruguay)', value: 'es-UY' },
|
||||
{ name: 'Spanish (Venezuela)', value: 'es-VE' },
|
||||
{ name: 'Sundanese (Indonesia)', value: 'su-ID' },
|
||||
{ name: 'Swahili (Kenya)', value: 'sw-KE' },
|
||||
{ name: 'Swahili (Tanzania)', value: 'sw-TZ' },
|
||||
{ name: 'Swedish (Sweden)', value: 'sv-SE' },
|
||||
{ name: 'Tamil (India)', value: 'ta-IN' },
|
||||
{ name: 'Tamil (Malaysia)', value: 'ta-MY' },
|
||||
{ name: 'Tamil (Singapore)', value: 'ta-SG' },
|
||||
{ name: 'Tamil (Sri Lanka)', value: 'ta-LK' },
|
||||
{ name: 'Telugu (India)', value: 'te-IN' },
|
||||
{ name: 'Thai (Thailand)', value: 'th-TH' },
|
||||
{ name: 'Turkish (Turkey)', value: 'tr-TR' },
|
||||
{ name: 'Ukrainian (Ukraine)', value: 'uk-UA' },
|
||||
{ name: 'Urdu (India)', value: 'ur-IN' },
|
||||
{ name: 'Urdu (Pakistan)', value: 'ur-PK' },
|
||||
{ name: 'Uzbek (Uzbekistan)', value: 'uz-UZ' },
|
||||
{ name: 'Vietnamese (Vietnam)', value: 'vi-VN' },
|
||||
{ name: 'Zulu (South Africa)', value: 'zu-ZA' },
|
||||
];
|
||||
@@ -1,82 +0,0 @@
|
||||
module.exports = [
|
||||
{
|
||||
name: 'Arabic (Modern Standard)',
|
||||
value: 'ar-MS_Telephony',
|
||||
},
|
||||
{
|
||||
name: 'Chinese (Mandarin)',
|
||||
value: 'zh-CN_Telephony',
|
||||
},
|
||||
{
|
||||
name: 'Czech ',
|
||||
value: 'cs-CZ_Telephony',
|
||||
},
|
||||
{
|
||||
name: 'Dutch (Belgian)',
|
||||
value: 'nl-BE_Telephony',
|
||||
},
|
||||
{
|
||||
name: 'Dutch (Netherlands)',
|
||||
value: 'nl-NL_Telephony',
|
||||
},
|
||||
{
|
||||
name: 'English (all supported dialects)',
|
||||
value: 'en-WW_Medical_Telephony',
|
||||
},
|
||||
{
|
||||
name: 'English (Australian)',
|
||||
value: 'en-AU_Telephony',
|
||||
},
|
||||
{
|
||||
name: 'English (Indian)',
|
||||
value: 'en-IN_Telephony',
|
||||
},
|
||||
{
|
||||
name: 'English (United Kingdom)',
|
||||
value: 'en-GB_Telephony',
|
||||
},
|
||||
{
|
||||
name: 'English (United States)',
|
||||
value: 'en-US_Telephony',
|
||||
},
|
||||
{
|
||||
name: 'French (Canadian)',
|
||||
value: 'fr-CA_Telephony',
|
||||
},
|
||||
{
|
||||
name: 'French (France)',
|
||||
value: 'fr-FR_Telephony',
|
||||
},
|
||||
{
|
||||
name: 'German',
|
||||
value: 'de-DE_Telephony',
|
||||
},
|
||||
{
|
||||
name: 'Hindi (Indian)',
|
||||
value: 'hi-IN_Telephony',
|
||||
},
|
||||
{
|
||||
name: 'Italian',
|
||||
value: 'it-IT_Telephony',
|
||||
},
|
||||
{
|
||||
name: 'Korean',
|
||||
value: 'ko-KR_Telephony',
|
||||
},
|
||||
{
|
||||
name: 'Portuguese (Brazilian)',
|
||||
value: 'pt-BR_Telephony',
|
||||
},
|
||||
{
|
||||
name: 'Spanish (Mexican)',
|
||||
value: 'es-LA_Telephony',
|
||||
},
|
||||
{
|
||||
name: 'Spanish (Castilian)',
|
||||
value: 'es-ES_Telephony',
|
||||
},
|
||||
{
|
||||
name: 'Swedish ',
|
||||
value: 'sv-SE_Telephony',
|
||||
},
|
||||
];
|
||||
@@ -1,490 +0,0 @@
|
||||
module.exports = [
|
||||
{
|
||||
name: 'Afrikaans (South Africa)',
|
||||
value: 'af-ZA',
|
||||
},
|
||||
{
|
||||
name: 'Amharic (Ethiopia)',
|
||||
value: 'am-ET',
|
||||
},
|
||||
{
|
||||
name: 'Arabic (Algeria)',
|
||||
value: 'ar-DZ',
|
||||
},
|
||||
{
|
||||
name: 'Arabic (Bahrain)',
|
||||
value: 'ar-BH',
|
||||
},
|
||||
{
|
||||
name: 'Arabic (Egypt)',
|
||||
value: 'ar-EG',
|
||||
},
|
||||
{
|
||||
name: 'Arabic (Iraq)',
|
||||
value: 'ar-IQ',
|
||||
},
|
||||
{
|
||||
name: 'Arabic (Israel)',
|
||||
value: 'ar-IL',
|
||||
},
|
||||
{
|
||||
name: 'Arabic (Jordan)',
|
||||
value: 'ar-JO',
|
||||
},
|
||||
{
|
||||
name: 'Arabic (Kuwait)',
|
||||
value: 'ar-KW',
|
||||
},
|
||||
{
|
||||
name: 'Arabic (Lebanon)',
|
||||
value: 'ar-LB',
|
||||
},
|
||||
{
|
||||
name: 'Arabic (Libya)',
|
||||
value: 'ar-LY',
|
||||
},
|
||||
{
|
||||
name: 'Arabic (Morocco)',
|
||||
value: 'ar-MA',
|
||||
},
|
||||
{
|
||||
name: 'Arabic (Oman)',
|
||||
value: 'ar-OM',
|
||||
},
|
||||
{
|
||||
name: 'Arabic (Qatar)',
|
||||
value: 'ar-QA',
|
||||
},
|
||||
{
|
||||
name: 'Arabic (Saudi Arabia)',
|
||||
value: 'ar-SA',
|
||||
},
|
||||
{
|
||||
name: 'Arabic (Palestinian Authority)',
|
||||
value: 'ar-PS',
|
||||
},
|
||||
{
|
||||
name: 'Arabic (Syria)',
|
||||
value: 'ar-SY',
|
||||
},
|
||||
{
|
||||
name: 'Arabic (Tunisia)',
|
||||
value: 'ar-TN',
|
||||
},
|
||||
{
|
||||
name: 'Arabic (United Arab Emirates)',
|
||||
value: 'ar-AE',
|
||||
},
|
||||
{
|
||||
name: 'Arabic (Yemen)',
|
||||
value: 'ar-YE',
|
||||
},
|
||||
{
|
||||
name: 'Bulgarian (Bulgaria)',
|
||||
value: 'bg-BG',
|
||||
},
|
||||
{
|
||||
name: 'Bengali (India)',
|
||||
value: 'bn-IN',
|
||||
},
|
||||
{
|
||||
name: 'Catalan (Spain)',
|
||||
value: 'ca-ES',
|
||||
},
|
||||
{
|
||||
name: 'Chinese (Cantonese, Traditional)',
|
||||
value: 'zh-HK',
|
||||
},
|
||||
{
|
||||
name: 'Chinese (Mandarin, Simplified)',
|
||||
value: 'zh-CN',
|
||||
},
|
||||
{
|
||||
name: 'Chinese (Taiwanese Mandarin)',
|
||||
value: 'zh-TW',
|
||||
},
|
||||
{
|
||||
name: 'Croatian (Croatia)',
|
||||
value: 'hr-HR',
|
||||
},
|
||||
{
|
||||
name: 'Czech (Czech)',
|
||||
value: 'cs-CZ',
|
||||
},
|
||||
{
|
||||
name: 'Danish (Denmark)',
|
||||
value: 'da-DK',
|
||||
},
|
||||
{
|
||||
name: 'Dutch (Netherlands)',
|
||||
value: 'nl-NL',
|
||||
},
|
||||
{
|
||||
name: 'Dutch (Belgium)',
|
||||
value: 'nl-BE',
|
||||
},
|
||||
{
|
||||
name: 'English (Australia)',
|
||||
value: 'en-AU',
|
||||
},
|
||||
{
|
||||
name: 'English (Canada)',
|
||||
value: 'en-CA',
|
||||
},
|
||||
{
|
||||
name: 'English (Ghana)',
|
||||
value: 'en-GH',
|
||||
},
|
||||
{
|
||||
name: 'English (Hong Kong)',
|
||||
value: 'en-HK',
|
||||
},
|
||||
{
|
||||
name: 'English (India)',
|
||||
value: 'en-IN',
|
||||
},
|
||||
{
|
||||
name: 'English (Ireland)',
|
||||
value: 'en-IE',
|
||||
},
|
||||
{
|
||||
name: 'English (Kenya)',
|
||||
value: 'en-KE',
|
||||
},
|
||||
{
|
||||
name: 'English (New Zealand)',
|
||||
value: 'en-NZ',
|
||||
},
|
||||
{
|
||||
name: 'English (Nigeria)',
|
||||
value: 'en-NG',
|
||||
},
|
||||
{
|
||||
name: 'English (Philippines)',
|
||||
value: 'en-PH',
|
||||
},
|
||||
{
|
||||
name: 'English (Singapore)',
|
||||
value: 'en-SG',
|
||||
},
|
||||
{
|
||||
name: 'English (South Africa)',
|
||||
value: 'en-ZA',
|
||||
},
|
||||
{
|
||||
name: 'English (Tanzania)',
|
||||
value: 'en-TZ',
|
||||
},
|
||||
{
|
||||
name: 'English (United Kingdom)',
|
||||
value: 'en-GB',
|
||||
},
|
||||
{
|
||||
name: 'English (United States)',
|
||||
value: 'en-US',
|
||||
},
|
||||
{
|
||||
name: 'Estonian(Estonia)',
|
||||
value: 'et-EE',
|
||||
},
|
||||
{
|
||||
name: 'Filipino (Philippines)',
|
||||
value: 'fil-PH',
|
||||
},
|
||||
{
|
||||
name: 'Finnish (Finland)',
|
||||
value: 'fi-FI',
|
||||
},
|
||||
{
|
||||
name: 'French (Belgium)',
|
||||
value: 'fr-BE',
|
||||
},
|
||||
{
|
||||
name: 'French (Canada)',
|
||||
value: 'fr-CA',
|
||||
},
|
||||
{
|
||||
name: 'French (France)',
|
||||
value: 'fr-FR',
|
||||
},
|
||||
{
|
||||
name: 'French (Switzerland)',
|
||||
value: 'fr-CH',
|
||||
},
|
||||
{
|
||||
name: 'German (Austria)',
|
||||
value: 'de-AT',
|
||||
},
|
||||
{
|
||||
name: 'German (Switzerland)',
|
||||
value: 'de-CH',
|
||||
},
|
||||
{
|
||||
name: 'German (Germany)',
|
||||
value: 'de-DE',
|
||||
},
|
||||
{
|
||||
name: 'Greek (Greece)',
|
||||
value: 'el-GR',
|
||||
},
|
||||
{
|
||||
name: 'Gujarati (Indian)',
|
||||
value: 'gu-IN',
|
||||
},
|
||||
{
|
||||
name: 'Hebrew (Israel)',
|
||||
value: 'he-IL',
|
||||
},
|
||||
{
|
||||
name: 'Hindi (India)',
|
||||
value: 'hi-IN',
|
||||
},
|
||||
{
|
||||
name: 'Hungarian (Hungary)',
|
||||
value: 'hu-HU',
|
||||
},
|
||||
{
|
||||
name: 'Indonesian (Indonesia)',
|
||||
value: 'id-ID',
|
||||
},
|
||||
{
|
||||
name: 'Icelandic (Iceland)',
|
||||
value: 'is-IS',
|
||||
},
|
||||
{
|
||||
name: 'Irish (Ireland)',
|
||||
value: 'ga-IE',
|
||||
},
|
||||
{
|
||||
name: 'Italian (Italy)',
|
||||
value: 'it-IT',
|
||||
},
|
||||
{
|
||||
name: 'Japanese (Japan)',
|
||||
value: 'ja-JP',
|
||||
},
|
||||
{
|
||||
name: 'Javanese (Indonesia)',
|
||||
value: 'jv-ID',
|
||||
},
|
||||
{
|
||||
name: 'Kannada (India)',
|
||||
value: 'kn-IN',
|
||||
},
|
||||
{
|
||||
name: 'Khmer (Cambodia)',
|
||||
value: 'km-KH',
|
||||
},
|
||||
{
|
||||
name: 'Korean (Korea)',
|
||||
value: 'ko-KR',
|
||||
},
|
||||
{
|
||||
name: 'Latvian (Latvia)',
|
||||
value: 'lv-LV',
|
||||
},
|
||||
{
|
||||
name: 'Lao (Laos)',
|
||||
value: 'lo-LA',
|
||||
},
|
||||
{
|
||||
name: 'Lithuanian (Lithuania)',
|
||||
value: 'lt-LT',
|
||||
},
|
||||
{
|
||||
name: 'Malay (Malaysia)',
|
||||
value: 'ms-MY',
|
||||
},
|
||||
{
|
||||
name: 'Macedonian (North Macedonia)',
|
||||
value: 'mk-MK',
|
||||
},
|
||||
{
|
||||
name: 'Maltese (Malta)',
|
||||
value: 'mt-MT',
|
||||
},
|
||||
{
|
||||
name: 'Marathi (India)',
|
||||
value: 'mr-IN',
|
||||
},
|
||||
{
|
||||
name: 'Burmese (Myanmar)',
|
||||
value: 'my-MM',
|
||||
},
|
||||
{
|
||||
name: 'Norwegian (Bokmål, Norway)',
|
||||
value: 'nb-NO',
|
||||
},
|
||||
{
|
||||
name: 'Persian (Iran)',
|
||||
value: 'fa-IR',
|
||||
},
|
||||
{
|
||||
name: 'Polish (Poland)',
|
||||
value: 'pl-PL',
|
||||
},
|
||||
{
|
||||
name: 'Portuguese (Brazil)',
|
||||
value: 'pt-BR',
|
||||
},
|
||||
{
|
||||
name: 'Portuguese (Portugal)',
|
||||
value: 'pt-PT',
|
||||
},
|
||||
{
|
||||
name: 'Romanian (Romania)',
|
||||
value: 'ro-RO',
|
||||
},
|
||||
{
|
||||
name: 'Russian (Russia)',
|
||||
value: 'ru-RU',
|
||||
},
|
||||
{
|
||||
name: 'Slovak (Slovakia)',
|
||||
value: 'sk-SK',
|
||||
},
|
||||
{
|
||||
name: 'Slovenian (Slovenia)',
|
||||
value: 'sl-SI',
|
||||
},
|
||||
{
|
||||
name: 'Spanish (Argentina)',
|
||||
value: 'es-AR',
|
||||
},
|
||||
{
|
||||
name: 'Spanish (Bolivia)',
|
||||
value: 'es-BO',
|
||||
},
|
||||
{
|
||||
name: 'Spanish (Chile)',
|
||||
value: 'es-CL',
|
||||
},
|
||||
{
|
||||
name: 'Spanish (Colombia)',
|
||||
value: 'es-CO',
|
||||
},
|
||||
{
|
||||
name: 'Spanish (Costa Rica)',
|
||||
value: 'es-CR',
|
||||
},
|
||||
{
|
||||
name: 'Spanish (Cuba)',
|
||||
value: 'es-CU',
|
||||
},
|
||||
{
|
||||
name: 'Spanish (Dominican Republic)',
|
||||
value: 'es-DO',
|
||||
},
|
||||
{
|
||||
name: 'Spanish (Ecuador)',
|
||||
value: 'es-EC',
|
||||
},
|
||||
{
|
||||
name: 'Spanish (El Salvador)',
|
||||
value: 'es-SV',
|
||||
},
|
||||
{
|
||||
name: 'Spanish (Equatorial Guinea)',
|
||||
value: 'es-GQ',
|
||||
},
|
||||
{
|
||||
name: 'Spanish (Guatemala)',
|
||||
value: 'es-GT',
|
||||
},
|
||||
{
|
||||
name: 'Spanish (Honduras)',
|
||||
value: 'es-HN',
|
||||
},
|
||||
{
|
||||
name: 'Spanish (Mexico)',
|
||||
value: 'es-MX',
|
||||
},
|
||||
{
|
||||
name: 'Spanish (Nicaragua)',
|
||||
value: 'es-NI',
|
||||
},
|
||||
{
|
||||
name: 'Spanish (Panama)',
|
||||
value: 'es-PA',
|
||||
},
|
||||
{
|
||||
name: 'Spanish (Paraguay)',
|
||||
value: 'es-PY',
|
||||
},
|
||||
{
|
||||
name: 'Spanish (Peru)',
|
||||
value: 'es-PE',
|
||||
},
|
||||
{
|
||||
name: 'Spanish (Puerto Rico)',
|
||||
value: 'es-PR',
|
||||
},
|
||||
{
|
||||
name: 'Spanish (Spain)',
|
||||
value: 'es-ES',
|
||||
},
|
||||
{
|
||||
name: 'Spanish (Uruguay)',
|
||||
value: 'es-UY',
|
||||
},
|
||||
{
|
||||
name: 'Spanish (USA)',
|
||||
value: 'es-US',
|
||||
},
|
||||
{
|
||||
name: 'Spanish (Venezuela)',
|
||||
value: 'es-VE',
|
||||
},
|
||||
{
|
||||
name: 'Swahili (Kenya)',
|
||||
value: 'sw-KE',
|
||||
},
|
||||
{
|
||||
name: 'Swahili (Tanzania)',
|
||||
value: 'sw-TZ',
|
||||
},
|
||||
{
|
||||
name: 'Sinhala (Sri Lanka)',
|
||||
value: 'si-LK',
|
||||
},
|
||||
{
|
||||
name: 'Swedish (Sweden)',
|
||||
value: 'sv-SE',
|
||||
},
|
||||
{
|
||||
name: 'Serbian (Serbia)',
|
||||
value: 'sr-RS',
|
||||
},
|
||||
{
|
||||
name: 'Tamil (India)',
|
||||
value: 'ta-IN',
|
||||
},
|
||||
{
|
||||
name: 'Telugu (India)',
|
||||
value: 'te-IN',
|
||||
},
|
||||
{
|
||||
name: 'Thai (Thailand)',
|
||||
value: 'th-TH',
|
||||
},
|
||||
{
|
||||
name: 'Turkish (Turkey)',
|
||||
value: 'tr-TR',
|
||||
},
|
||||
{
|
||||
name: 'Ukrainian (Ukraine)',
|
||||
value: 'uk-UA',
|
||||
},
|
||||
{
|
||||
name: 'Uzbek (Uzbekistan)',
|
||||
value: 'uz-UZ',
|
||||
},
|
||||
{
|
||||
name: 'Zulu (South Africa)',
|
||||
value: 'zu-ZA',
|
||||
},
|
||||
{
|
||||
name: 'Vietnamese (Vietnam)',
|
||||
value: 'vi-VN',
|
||||
},
|
||||
];
|
||||
@@ -1,207 +0,0 @@
|
||||
module.exports = [
|
||||
{
|
||||
name: 'Arabic (Worldwide)',
|
||||
value: 'ar-WW',
|
||||
valueMix: 'ara-XWW',
|
||||
},
|
||||
{
|
||||
name: 'Catalan (Spain)',
|
||||
value: 'ca-ES',
|
||||
valueMix: 'cat-ESP',
|
||||
},
|
||||
{
|
||||
name: 'Croatian (Croatia)',
|
||||
value: 'hr-HR',
|
||||
valueMix: 'hrv-HRV',
|
||||
},
|
||||
{
|
||||
name: 'Czech (Czech Republic)',
|
||||
value: 'cs-CZ',
|
||||
valueMix: 'ces-CZE',
|
||||
},
|
||||
{
|
||||
name: 'Danish (Denmark)',
|
||||
value: 'da-DK',
|
||||
valueMix: 'dan-DNK',
|
||||
},
|
||||
{
|
||||
name: 'Dutch (Netherlands)',
|
||||
value: 'nl-NL',
|
||||
valueMix: 'nld-NLD',
|
||||
},
|
||||
{
|
||||
name: 'English (Australia)',
|
||||
value: 'en-AU',
|
||||
valueMix: 'eng-AUS',
|
||||
},
|
||||
{
|
||||
name: 'English (United States)',
|
||||
value: 'en-US',
|
||||
valueMix: 'eng-USA',
|
||||
},
|
||||
{
|
||||
name: 'English (India)',
|
||||
value: 'en-IN',
|
||||
valueMix: 'eng-IND',
|
||||
},
|
||||
{
|
||||
name: 'English (United Kingdom)',
|
||||
value: 'en-GB',
|
||||
valueMix: 'eng-GBR',
|
||||
},
|
||||
{
|
||||
name: 'Finnish (Finland)',
|
||||
value: 'fi-FI',
|
||||
valueMix: 'fin-FIN',
|
||||
},
|
||||
{
|
||||
name: 'French (Canada)',
|
||||
value: 'fr-CA',
|
||||
valueMix: 'fra-CAN',
|
||||
},
|
||||
{
|
||||
name: 'French (France)',
|
||||
value: 'fr-FR',
|
||||
valueMix: 'fra-FRA',
|
||||
},
|
||||
{
|
||||
name: 'German (Germany)',
|
||||
value: 'de-DE',
|
||||
valueMix: 'deu-DEU',
|
||||
},
|
||||
{
|
||||
name: 'Greek (Greece)',
|
||||
value: 'el-GR',
|
||||
valueMix: 'ell-GRC',
|
||||
},
|
||||
{
|
||||
name: 'Hebrew (Israel)',
|
||||
value: 'he-IL',
|
||||
valueMix: 'heb-ISR',
|
||||
},
|
||||
{
|
||||
name: 'Hindi (India)',
|
||||
value: 'hi-IN',
|
||||
valueMix: 'hin-IND',
|
||||
},
|
||||
{
|
||||
name: 'Hungarian (Hungary)',
|
||||
value: 'hu-HU',
|
||||
valueMix: 'hun-HUN',
|
||||
},
|
||||
{
|
||||
name: 'Indonesian (Indonesia)',
|
||||
value: 'id-ID',
|
||||
valueMix: 'ind-IDN',
|
||||
},
|
||||
{
|
||||
name: 'Italian (Italy)',
|
||||
value: 'it-IT',
|
||||
valueMix: 'ita-ITA',
|
||||
},
|
||||
{
|
||||
name: 'Japanese (Japan)',
|
||||
value: 'ja-JP',
|
||||
valueMix: 'jpn-JPN',
|
||||
},
|
||||
{
|
||||
name: 'Korean (South Korea)',
|
||||
value: 'ko-KR',
|
||||
valueMix: 'kor-KOR',
|
||||
},
|
||||
{
|
||||
name: 'Malay (Malaysia)',
|
||||
value: 'ms-MY',
|
||||
valueMix: 'zlm-MYS',
|
||||
},
|
||||
{
|
||||
name: 'Norwegian (Norway)',
|
||||
value: 'no-NO',
|
||||
valueMix: 'nor-NOR',
|
||||
},
|
||||
{
|
||||
name: 'Polish (Poland)',
|
||||
value: 'pl-PL',
|
||||
valueMix: 'pol-POL',
|
||||
},
|
||||
{
|
||||
name: 'Portuguese (Brazil)',
|
||||
value: 'pt-BR',
|
||||
valueMix: 'por-BRA',
|
||||
},
|
||||
{
|
||||
name: 'Portuguese (Portugal)',
|
||||
value: 'pt-PT',
|
||||
valueMix: 'por-PRT',
|
||||
},
|
||||
{
|
||||
name: 'Romanian (Romania)',
|
||||
value: 'ro-RO',
|
||||
valueMix: 'ron-ROU',
|
||||
},
|
||||
{
|
||||
name: 'Russian (Russia)',
|
||||
value: 'ru-RU',
|
||||
valueMix: 'rus-RUS',
|
||||
},
|
||||
{
|
||||
name: 'Shanghainese (China)',
|
||||
value: 'zh-WU',
|
||||
valueMix: 'wuu-CHN',
|
||||
},
|
||||
{
|
||||
name: 'Mandarin (China)',
|
||||
value: 'zh-CN',
|
||||
valueMix: 'cmn-CHN',
|
||||
},
|
||||
{
|
||||
name: 'Slovak (Slovakia)',
|
||||
value: 'sk-SK',
|
||||
valueMix: 'slk-SVK',
|
||||
},
|
||||
{
|
||||
name: 'Spanish (Spain)',
|
||||
value: 'es-ES',
|
||||
valueMix: 'spa-ESP',
|
||||
},
|
||||
{
|
||||
name: 'Spanish (Latin America)',
|
||||
value: 'es-US',
|
||||
valueMix: 'spa-XLA',
|
||||
},
|
||||
{
|
||||
name: 'Swedish (Sweden)',
|
||||
value: 'sv-SE',
|
||||
valueMix: 'swe-SWE',
|
||||
},
|
||||
{
|
||||
name: 'Thai (Thailand)',
|
||||
value: 'th-TH',
|
||||
valueMix: 'tha-THA',
|
||||
},
|
||||
{
|
||||
name: 'Cantonese (Hong Kong)',
|
||||
value: 'cn-HK',
|
||||
valueMix: 'yue-CHS',
|
||||
},
|
||||
{
|
||||
name: 'Mandarin (Taiwan)',
|
||||
value: 'zh-TW',
|
||||
valueMix: 'cmn-TWN',
|
||||
},
|
||||
{
|
||||
name: 'Turkish (Turkey)',
|
||||
value: 'tr-TR',
|
||||
valueMix: 'tur-TUR',
|
||||
},
|
||||
{
|
||||
name: 'Ukrainian (Ukraine)',
|
||||
value: 'uk-UA',
|
||||
valueMix: 'ukr-UKR',
|
||||
},
|
||||
{
|
||||
name: 'Vietnamese (Vietnam)',
|
||||
value: 'vi-VN',
|
||||
valueMix: 'vie-VNM',
|
||||
},
|
||||
];
|
||||
@@ -1,58 +0,0 @@
|
||||
module.exports = [
|
||||
{
|
||||
name: 'Arabic',
|
||||
value: 'ar-AR',
|
||||
},
|
||||
{
|
||||
name: 'English',
|
||||
value: 'en-US',
|
||||
},
|
||||
{
|
||||
name: 'English - GB',
|
||||
value: 'en-GB',
|
||||
},
|
||||
{
|
||||
name: 'Spanish - US',
|
||||
value: 'es-US',
|
||||
},
|
||||
{
|
||||
name: 'Spanish',
|
||||
value: 'es-ES',
|
||||
},
|
||||
{
|
||||
name: 'German',
|
||||
value: 'de-DE',
|
||||
},
|
||||
{
|
||||
name: 'French',
|
||||
value: 'fr-FR',
|
||||
},
|
||||
{
|
||||
name: 'Hindi',
|
||||
value: 'hi-IN',
|
||||
},
|
||||
{
|
||||
name: 'Russian',
|
||||
value: 'ru-RU',
|
||||
},
|
||||
{
|
||||
name: 'Korean',
|
||||
value: 'ko-KR',
|
||||
},
|
||||
{
|
||||
name: 'Brazilian-Portuguese',
|
||||
value: 'pt-BR',
|
||||
},
|
||||
{
|
||||
name: 'Japanese',
|
||||
value: 'ja-JP',
|
||||
},
|
||||
{
|
||||
name: 'Italian',
|
||||
value: 'it-IT',
|
||||
},
|
||||
{
|
||||
name: 'Mandarin',
|
||||
value: 'zh-CN',
|
||||
},
|
||||
];
|
||||
@@ -1,6 +0,0 @@
|
||||
module.exports = [
|
||||
{
|
||||
name: 'English (United States)',
|
||||
value: 'en-US',
|
||||
},
|
||||
];
|
||||
@@ -1,213 +0,0 @@
|
||||
module.exports = [
|
||||
{
|
||||
value: 'arb',
|
||||
name: 'Arabic',
|
||||
voices: [{ value: 'Zeina', name: 'Zeina (Female)' }],
|
||||
},
|
||||
{
|
||||
value: 'cmn-CN',
|
||||
name: 'Chinese, Mandarin',
|
||||
voices: [{ value: 'Zhiyu', name: 'Zhiyu (Female)' }],
|
||||
},
|
||||
{
|
||||
value: 'da-DK',
|
||||
name: 'Danish',
|
||||
voices: [
|
||||
{ value: 'Naja', name: 'Naja (Female)' },
|
||||
{ value: 'Mads', name: 'Mads (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'nl-NL',
|
||||
name: 'Dutch',
|
||||
voices: [
|
||||
{ value: 'Lotte', name: 'Lotte (Female)' },
|
||||
{ value: 'Ruben', name: 'Ruben (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'en-AU',
|
||||
name: 'English (Australian)',
|
||||
voices: [
|
||||
{ value: 'Nicole', name: 'Nicole (Female)' },
|
||||
{ value: 'Russell', name: 'Russell (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'en-GB',
|
||||
name: 'English (British)',
|
||||
voices: [
|
||||
{ value: 'Amy', name: 'Amy (Female)' },
|
||||
{ value: 'Emma', name: 'Emma (Female)' },
|
||||
{ value: 'Brian', name: 'Brian (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'en-IN',
|
||||
name: 'English (Indian)',
|
||||
voices: [
|
||||
{ value: 'Aditi', name: 'Aditi (Female)' },
|
||||
{ value: 'Raveena', name: 'Raveena (Female)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'en-US',
|
||||
name: 'English (US)',
|
||||
voices: [
|
||||
{ value: 'Joanna', name: 'Joanna (Female)' },
|
||||
{ value: 'Kendra', name: 'Kendra (Female)' },
|
||||
{ value: 'Kimberly', name: 'Kimberly (Female)' },
|
||||
{ value: 'Ivy', name: 'Ivy (Female child)' },
|
||||
{ value: 'Salli', name: 'Salli (Female)' },
|
||||
{ value: 'Joey', name: 'Joey (Male)' },
|
||||
{ value: 'Matthew', name: 'Matthew (Male)' },
|
||||
{ value: 'Justin', name: 'Justin (Male child)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'en-GB-WLS',
|
||||
name: 'English (Welsh)',
|
||||
voices: [{ value: 'Geraint', name: 'Geraint (Male)' }],
|
||||
},
|
||||
{
|
||||
value: 'fr-FR',
|
||||
name: 'French',
|
||||
voices: [
|
||||
{ value: 'Celine', name: 'Céline (Female)' },
|
||||
{ value: 'Lea', name: 'Léa (Female)' },
|
||||
{ value: 'Mathieu', name: 'Mathieu (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'fr-CA',
|
||||
name: 'French (Canadian)',
|
||||
voices: [{ value: 'Chantal', name: 'Chantal (Female)' }],
|
||||
},
|
||||
{
|
||||
value: 'de-DE',
|
||||
name: 'German',
|
||||
voices: [
|
||||
{ value: 'Marlene', name: 'Marlene (Female)' },
|
||||
{ value: 'Vicki', name: 'Vicki (Female)' },
|
||||
{ value: 'Hans', name: 'Hans (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'hi-IN',
|
||||
name: 'Hindi',
|
||||
voices: [{ value: 'Aditi', name: 'Aditi (Female)' }],
|
||||
},
|
||||
{
|
||||
value: 'is-IS',
|
||||
name: 'Icelandic',
|
||||
voices: [
|
||||
{ value: 'Dora', name: 'Dóra (Female)' },
|
||||
{ value: 'Karl', name: 'Karl (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'it-IT',
|
||||
name: 'Italian',
|
||||
voices: [
|
||||
{ value: 'Carla', name: 'Carla (Female)' },
|
||||
{ value: 'Bianca', name: 'Bianca (Female)' },
|
||||
{ value: 'Giorgio', name: 'Giorgio (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'ja-JP',
|
||||
name: 'Japanese',
|
||||
voices: [
|
||||
{ value: 'Mizuki', name: 'Mizuki (Female)' },
|
||||
{ value: 'Takumi', name: 'Takumi (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'ko-KR',
|
||||
name: 'Korean',
|
||||
voices: [{ value: 'Seoyeon', name: 'Seoyeon (Female)' }],
|
||||
},
|
||||
{
|
||||
value: 'nb-NO',
|
||||
name: 'Norwegian',
|
||||
voices: [{ value: 'Liv', name: 'Liv (Female)' }],
|
||||
},
|
||||
{
|
||||
value: 'pl-PL',
|
||||
name: 'Polish',
|
||||
voices: [
|
||||
{ value: 'Ewa', name: 'Ewa (Female)' },
|
||||
{ value: 'Maja', name: 'Maja (Female)' },
|
||||
{ value: 'Jacek', name: 'Jacek (Male)' },
|
||||
{ value: 'Jan', name: 'Jan (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'pt-BR',
|
||||
name: 'Portuguese (Brazilian)',
|
||||
voices: [
|
||||
{ value: 'Camila', name: 'Camila (Female)' },
|
||||
{ value: 'Vitoria', name: 'Vitória (Female)' },
|
||||
{ value: 'Ricardo', name: 'Ricardo (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'pt-PT',
|
||||
name: 'Portuguese (European)',
|
||||
voices: [
|
||||
{ value: 'Ines', name: 'Inês (Female)' },
|
||||
{ value: 'Cristiano', name: 'Cristiano (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'ro-RO',
|
||||
name: 'Romanian',
|
||||
voices: [{ value: 'Carmen', name: 'Carmen (Female)' }],
|
||||
},
|
||||
{
|
||||
value: 'ru-RU',
|
||||
name: 'Russian',
|
||||
voices: [
|
||||
{ value: 'Tatyana', name: 'Tatyana (Female)' },
|
||||
{ value: 'Maxim', name: 'Maxim (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'es-ES',
|
||||
name: 'Spanish (European)',
|
||||
voices: [
|
||||
{ value: 'Conchita', name: 'Conchita (Female)' },
|
||||
{ value: 'Lucia', name: 'Lucia (Female)' },
|
||||
{ value: 'Enrique', name: 'Enrique (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'es-MX',
|
||||
name: 'Spanish (Mexican)',
|
||||
voices: [{ value: 'Mia', name: 'Mia (Female)' }],
|
||||
},
|
||||
{
|
||||
value: 'es-US',
|
||||
name: 'Spanish (US)',
|
||||
voices: [
|
||||
{ value: 'Lupe', name: 'Lupe (Female)' },
|
||||
{ value: 'Penelope', name: 'Penélope (Female)' },
|
||||
{ value: 'Miguel', name: 'Miguel (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'sv-SE',
|
||||
name: 'Swedish',
|
||||
voices: [{ value: 'Astrid', name: 'Astrid (Female)' }],
|
||||
},
|
||||
{
|
||||
value: 'tr-TR',
|
||||
name: 'Turkish',
|
||||
voices: [{ value: 'Filiz', name: 'Filiz (Female)' }],
|
||||
},
|
||||
{
|
||||
value: 'cy-GB',
|
||||
name: 'Welsh',
|
||||
voices: [{ value: 'Gwyneth', name: 'Gwyneth (Female)' }],
|
||||
},
|
||||
];
|
||||
@@ -1,192 +0,0 @@
|
||||
module.exports = [
|
||||
{
|
||||
value: 'ar',
|
||||
name: 'Arabic',
|
||||
voices: [
|
||||
{
|
||||
value: 'pNInz6obpgDQGcFmaJgB',
|
||||
name: 'Adam - american, deep, middle aged, male, narration',
|
||||
},
|
||||
{
|
||||
value: 'ErXwobaYiN019PkySvjV',
|
||||
name: 'Antoni - american, well-rounded, young, male, narration',
|
||||
},
|
||||
{
|
||||
value: 'VR6AewLTigWG4xSOukaG',
|
||||
name: 'Arnold - american, crisp, middle aged, male, narration',
|
||||
},
|
||||
{
|
||||
value: 'EXAVITQu4vr4xnSDxMaL',
|
||||
name: 'Bella - american, soft, young, female, narration',
|
||||
},
|
||||
{
|
||||
value: 'N2lVS1w4EtoT3dr4eOWO',
|
||||
name: 'Callum - american, hoarse, middle aged, male, video games',
|
||||
},
|
||||
{
|
||||
value: 'IKne3meq5aSn9XLyUdCD',
|
||||
name: 'Charlie - australian, casual, middle aged, male, conversational',
|
||||
},
|
||||
{
|
||||
value: 'XB0fDUnXU5powFXDhCwa',
|
||||
name: 'Charlotte - english-swedish, seductive, middle aged, female, video games',
|
||||
},
|
||||
{
|
||||
value: '2EiwWnXFnvU5JabPnv8n',
|
||||
name: 'Clyde - american, war veteran, middle aged, male, video games',
|
||||
},
|
||||
{
|
||||
value: 'onwK4e9ZLuTAKqWW03F9',
|
||||
name: 'Daniel - british, deep, middle aged, male, news presenter',
|
||||
},
|
||||
{
|
||||
value: 'CYw3kZ02Hs0563khs1Fj',
|
||||
name: 'Dave - british-essex, conversational, young, male, video games',
|
||||
},
|
||||
{
|
||||
value: 'AZnzlk1XvdvUeBnXmlld',
|
||||
name: 'Domi - american, strong, young, female, narration',
|
||||
},
|
||||
{
|
||||
value: 'ThT5KcBeYPX3keUQqHPh',
|
||||
name: "Dorothy - british, pleasant, young, female, children's stories",
|
||||
},
|
||||
{
|
||||
value: 'MF3mGyEYCl7XYWbV9V6O',
|
||||
name: 'Elli - american, emotional, young, female, narration',
|
||||
},
|
||||
{
|
||||
value: 'LcfcDJNUP1GQjkzn1xUU',
|
||||
name: 'Emily - american, calm, young, female, meditation',
|
||||
},
|
||||
{
|
||||
value: 'g5CIjZEefAph4nQFvHAz',
|
||||
name: 'Ethan - american, undefined, young, male, ASMR',
|
||||
},
|
||||
{
|
||||
value: 'D38z5RcWu1voky8WS1ja',
|
||||
name: 'Fin - irish, sailor, old, male, video games',
|
||||
},
|
||||
{
|
||||
value: 'jsCqWAovK2LkecY7zXl4',
|
||||
name: 'Freya - american, undefined, young, female, undefined',
|
||||
},
|
||||
{
|
||||
value: 'jBpfuIE2acCO8z3wKNLl',
|
||||
name: 'Gigi - american, childlish, young, female, animation',
|
||||
},
|
||||
{
|
||||
value: 'zcAOhNBS3c14rBihAFp1',
|
||||
name: 'Giovanni - english-italian, foreigner, young, male, audiobook',
|
||||
},
|
||||
{
|
||||
value: 'z9fAnlkpzviPz146aGWa',
|
||||
name: 'Glinda - american, witch, middle aged, female, video games',
|
||||
},
|
||||
{
|
||||
value: 'oWAxZDx7w5VEj9dCyTzz',
|
||||
name: 'Grace - american-southern, undefined, young, female, audiobook ',
|
||||
},
|
||||
{
|
||||
value: 'SOYHLrjzK2X1ezoPC6cr',
|
||||
name: 'Harry - american, anxious, young, male, video games',
|
||||
},
|
||||
{
|
||||
value: 'ZQe5CZNOzWyzPSCn5a3c',
|
||||
name: 'James - australian, calm , old, male, news',
|
||||
},
|
||||
{
|
||||
value: 'bVMeCyTHy58xNoL34h3p',
|
||||
name: 'Jeremy - american-irish, excited, young, male, narration',
|
||||
},
|
||||
{
|
||||
value: 't0jbNlBVZ17f02VDIeMI',
|
||||
name: 'Jessie - american, raspy , old, male, video games',
|
||||
},
|
||||
{
|
||||
value: 'Zlb1dXrM653N07WRdFW3',
|
||||
name: 'Joseph - british, undefined, middle aged, male, news',
|
||||
},
|
||||
{
|
||||
value: 'TxGEqnHWrfWFTfGW9XjX',
|
||||
name: 'Josh - american, deep, young, male, narration',
|
||||
},
|
||||
{
|
||||
value: 'TX3LPaxmHKxFdv7VOQHJ',
|
||||
name: 'Liam - american, undefined, young, male, narration',
|
||||
},
|
||||
{
|
||||
value: 'XrExE9yKIg1WjnnlVkGX',
|
||||
name: 'Matilda - american, warm, young, female, audiobook',
|
||||
},
|
||||
{
|
||||
value: 'Yko7PKHZNXotIFUBG7I9',
|
||||
name: 'Matthew - british, undefined, middle aged, male, audiobook',
|
||||
},
|
||||
{
|
||||
value: 'flq6f7yk4E4fJM5XTYuZ',
|
||||
name: 'Michael - american, undefined, old, male, audiobook',
|
||||
},
|
||||
{
|
||||
value: 'zrHiDhphv9ZnVXBqCLjz',
|
||||
name: 'Mimi - english-swedish, childish, young, female, animation',
|
||||
},
|
||||
{
|
||||
value: 'piTKgcLEGmPE4e6mEKli',
|
||||
name: 'Nicole - american, whisper, young, female, audiobook',
|
||||
},
|
||||
{
|
||||
value: 'ODq5zmih8GrVes37Dizd',
|
||||
name: 'Patrick - american, shouty, middle aged, male, video games',
|
||||
},
|
||||
{
|
||||
value: '21m00Tcm4TlvDq8ikWAM',
|
||||
name: 'Rachel - american, calm, young, female, narration',
|
||||
},
|
||||
{
|
||||
value: 'wViXBPUzp2ZZixB1xQuM',
|
||||
name: 'Ryan - american, soldier, middle aged, male, audiobook',
|
||||
},
|
||||
{
|
||||
value: 'yoZ06aMxZJJ28mfd3POQ',
|
||||
name: 'Sam - american, raspy, young, male, narration',
|
||||
},
|
||||
{
|
||||
value: 'pMsXgVXv3BLzUgSXRplE',
|
||||
name: 'Serena - american, pleasant, middle aged, female, interactive',
|
||||
},
|
||||
{
|
||||
value: 'GBv7mTt0atIp3Br8iCZE',
|
||||
name: 'Thomas - american, calm, young, male, meditation',
|
||||
},
|
||||
],
|
||||
},
|
||||
{ value: 'bg', name: 'Bulgarian', voices: [] },
|
||||
{ value: 'zh', name: 'Chinese', voices: [] },
|
||||
{ value: 'hr', name: 'Croatian', voices: [] },
|
||||
{ value: 'cs', name: 'Czech', voices: [] },
|
||||
{ value: 'da', name: 'Danish', voices: [] },
|
||||
{ value: 'nl', name: 'Dutch', voices: [] },
|
||||
{ value: 'en', name: 'English', voices: [] },
|
||||
{ value: 'fil', name: 'Filipino', voices: [] },
|
||||
{ value: 'fi', name: 'Finnish', voices: [] },
|
||||
{ value: 'fr', name: 'French', voices: [] },
|
||||
{ value: 'de', name: 'German', voices: [] },
|
||||
{ value: 'el', name: 'Greek', voices: [] },
|
||||
{ value: 'hi', name: 'Hindi', voices: [] },
|
||||
{ value: 'id', name: 'Indonesian', voices: [] },
|
||||
{ value: 'it', name: 'Italian', voices: [] },
|
||||
{ value: 'ja', name: 'Japanese', voices: [] },
|
||||
{ value: 'ko', name: 'Korean', voices: [] },
|
||||
{ value: 'ms', name: 'Malay', voices: [] },
|
||||
{ value: 'pl', name: 'Polish', voices: [] },
|
||||
{ value: 'pt', name: 'Portuguese', voices: [] },
|
||||
{ value: 'ro', name: 'Romanian', voices: [] },
|
||||
{ value: 'ru', name: 'Russian', voices: [] },
|
||||
{ value: 'sk', name: 'Slovak', voices: [] },
|
||||
{ value: 'es', name: 'Spanish', voices: [] },
|
||||
{ value: 'sv', name: 'Swedish', voices: [] },
|
||||
{ value: 'ta', name: 'Tamil', voices: [] },
|
||||
{ value: 'tr', name: 'Turkish', voices: [] },
|
||||
{ value: 'uk', name: 'Ukrainian', voices: [] },
|
||||
];
|
||||
@@ -1,796 +0,0 @@
|
||||
module.exports = [
|
||||
{
|
||||
value: 'ar-XA',
|
||||
name: 'Arabic',
|
||||
voices: [
|
||||
{ value: 'ar-XA-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'ar-XA-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'ar-XA-Standard-C', name: 'Standard-C (Male)' },
|
||||
{ value: 'ar-XA-Standard-D', name: 'Standard-D (Female)' },
|
||||
{ value: 'ar-XA-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'ar-XA-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
{ value: 'ar-XA-Wavenet-C', name: 'Wavenet-C (Male)' },
|
||||
{ value: 'ar-XA-Wavenet-D', name: 'Wavenet-D (Female)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'af-ZA',
|
||||
name: 'Afrikaans (South Africa)',
|
||||
voices: [{ value: 'af-ZA-Standard-A', name: 'Standard-A (Female)' }],
|
||||
},
|
||||
{
|
||||
value: 'bn-IN',
|
||||
name: 'Bengali (India)',
|
||||
voices: [
|
||||
{ value: 'bn-IN-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'bn-IN-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'bn-IN-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'bn-IN-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'bg-BG',
|
||||
name: 'Bulgarian (Bulgaria)',
|
||||
voices: [{ value: 'bg-BG-Standard-A', name: 'Standard-A (Female)' }],
|
||||
},
|
||||
{
|
||||
value: 'ca-ES',
|
||||
name: 'Catalan (Spain)',
|
||||
voices: [{ value: 'ca-ES-Standard-A', name: 'Standard-A (Female)' }],
|
||||
},
|
||||
{
|
||||
value: 'cs-CZ',
|
||||
name: 'Czech (Czech Republic)',
|
||||
voices: [
|
||||
{ value: 'cs-CZ-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'cs-CZ-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'da-DK',
|
||||
name: 'Danish (Denmark)',
|
||||
voices: [
|
||||
{ value: 'da-DK-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'da-DK-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'da-DK-Neural2-D', name: 'Neural2-D (Female)' },
|
||||
{ value: 'da-DK-Neural2-F', name: 'Neural2-F (Male)' },
|
||||
|
||||
{ value: 'da-DK-Standard-C', name: 'Standard-C (Male)' },
|
||||
{ value: 'da-DK-Standard-D', name: 'Standard-D (Female)' },
|
||||
{ value: 'da-DK-Standard-E', name: 'Standard-E (Female)' },
|
||||
{ value: 'da-DK-Wavenet-C', name: 'Wavenet-C (Male)' },
|
||||
{ value: 'da-DK-Wavenet-D', name: 'Wavenet-D (Female)' },
|
||||
{ value: 'da-DK-Wavenet-E', name: 'Wavenet-E (Female)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'eu-ES',
|
||||
name: 'Basque (Spain)',
|
||||
voices: [{ value: 'eu-ES-Standard-A', name: 'Standard-A (Female)' }],
|
||||
},
|
||||
{
|
||||
value: 'nl-NL',
|
||||
name: 'Dutch (Netherlands)',
|
||||
voices: [
|
||||
{ value: 'nl-NL-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'nl-NL-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'nl-NL-Standard-C', name: 'Standard-C (Male)' },
|
||||
{ value: 'nl-NL-Standard-D', name: 'Standard-D (Female)' },
|
||||
{ value: 'nl-NL-Standard-E', name: 'Standard-E (Female)' },
|
||||
{ value: 'nl-NL-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'nl-NL-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
{ value: 'nl-NL-Wavenet-C', name: 'Wavenet-C (Male)' },
|
||||
{ value: 'nl-NL-Wavenet-D', name: 'Wavenet-D (Female)' },
|
||||
{ value: 'nl-NL-Wavenet-E', name: 'Wavenet-E (Female)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'en-AU',
|
||||
name: 'English (Australia)',
|
||||
voices: [
|
||||
{ value: 'en-AU-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'en-AU-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'en-AU-Standard-C', name: 'Standard-C (Female)' },
|
||||
{ value: 'en-AU-Standard-D', name: 'Standard-D (Male)' },
|
||||
{ value: 'en-AU-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'en-AU-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
{ value: 'en-AU-Wavenet-C', name: 'Wavenet-C (Female)' },
|
||||
{ value: 'en-AU-Wavenet-D', name: 'Wavenet-D (Male)' },
|
||||
{ value: 'en-AU-Neural2-A', name: 'Neural2-A (Female)' },
|
||||
{ value: 'en-AU-Neural2-B', name: 'Neural2-B (Male)' },
|
||||
{ value: 'en-AU-Neural2-C', name: 'Neural2-C (Female)' },
|
||||
{ value: 'en-AU-Neural2-D', name: 'Neural2-D (Male)' },
|
||||
{ value: 'en-AU-Polyglot-1', name: 'Polyglot-1 (Male)' },
|
||||
{ value: 'en-AU-News-E', name: 'News-E (Female)' },
|
||||
{ value: 'en-AU-News-F', name: 'News-F (Female)' },
|
||||
{ value: 'en-AU-News-G', name: 'News-G (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'en-IN',
|
||||
name: 'English (India)',
|
||||
voices: [
|
||||
{ value: 'en-IN-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'en-IN-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'en-IN-Standard-C', name: 'Standard-C (Male)' },
|
||||
{ value: 'en-IN-Standard-D', name: 'Standard-D (Female)' },
|
||||
{ value: 'en-IN-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'en-IN-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
{ value: 'en-IN-Wavenet-C', name: 'Wavenet-C (Male)' },
|
||||
{ value: 'en-IN-Wavenet-D', name: 'Wavenet-D (Female)' },
|
||||
|
||||
{ value: 'en-IN-Neural2-A', name: 'Neural2-A (Female)' },
|
||||
{ value: 'en-IN-Neural2-B', name: 'Neural2-B (Male)' },
|
||||
{ value: 'en-IN-Neural2-C', name: 'Neural2-C (Male)' },
|
||||
{ value: 'en-IN-Neural2-D', name: 'Neural2-D (Female)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'en-GB',
|
||||
name: 'English (UK)',
|
||||
voices: [
|
||||
{ value: 'en-GB-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'en-GB-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'en-GB-Standard-C', name: 'Standard-C (Female)' },
|
||||
{ value: 'en-GB-Standard-D', name: 'Standard-D (Male)' },
|
||||
{ value: 'en-GB-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'en-GB-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
{ value: 'en-GB-Wavenet-C', name: 'Wavenet-C (Female)' },
|
||||
{ value: 'en-GB-Wavenet-D', name: 'Wavenet-D (Male)' },
|
||||
{ value: 'en-GB-Neural2-A', name: 'Neural2-A (Female)' },
|
||||
{ value: 'en-GB-Neural2-B', name: 'Neural2-B (Male)' },
|
||||
{ value: 'en-GB-Neural2-C', name: 'Neural2-C (Female)' },
|
||||
{ value: 'en-GB-Neural2-D', name: 'Neural2-D (Male)' },
|
||||
{ value: 'en-GB-Neural2-F', name: 'Neural2-F (Female)' },
|
||||
{ value: 'en-GB-News-G', name: 'News-G (Female)' },
|
||||
{ value: 'en-GB-News-H', name: 'News-H (Female)' },
|
||||
{ value: 'en-GB-News-I', name: 'News-I (Female)' },
|
||||
{ value: 'en-GB-News-J', name: 'News-J (Male)' },
|
||||
{ value: 'en-GB-News-K', name: 'News-K (Male)' },
|
||||
{ value: 'en-GB-News-L', name: 'News-L (Male)' },
|
||||
{ value: 'en-GB-News-M', name: 'News-M (Male)' },
|
||||
|
||||
{ value: 'en-GB-Studio-B', name: 'Studio-B (Male)' },
|
||||
{ value: 'en-GB-Studio-C', name: 'Studio-C (Female)' },
|
||||
{ value: 'en-GB-Wavenet-F', name: 'Wavenet-F (Female)' },
|
||||
{ value: 'en-GB-Standard-F', name: 'Standard-F (Female)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'en-US',
|
||||
name: 'English (US)',
|
||||
voices: [
|
||||
{ value: 'en-US-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'en-US-Standard-C', name: 'Standard-C (Female)' },
|
||||
{ value: 'en-US-Standard-D', name: 'Standard-D (Male)' },
|
||||
{ value: 'en-US-Standard-E', name: 'Standard-E (Female)' },
|
||||
{ value: 'en-US-Wavenet-A', name: 'Wavenet-A (Male)' },
|
||||
{ value: 'en-US-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
{ value: 'en-US-Wavenet-C', name: 'Wavenet-C (Female)' },
|
||||
{ value: 'en-US-Wavenet-D', name: 'Wavenet-D (Male)' },
|
||||
{ value: 'en-US-Wavenet-E', name: 'Wavenet-E (Female)' },
|
||||
{ value: 'en-US-Wavenet-F', name: 'Wavenet-F (Female)' },
|
||||
{ value: 'en-US-Neural2-A', name: 'Neural2-A (Male)' },
|
||||
{ value: 'en-US-Neural2-C', name: 'Neural2-C (Female)' },
|
||||
{ value: 'en-US-Neural2-D', name: 'Neural2-D (Male)' },
|
||||
{ value: 'en-US-Neural2-E', name: 'Neural2-E (Female)' },
|
||||
{ value: 'en-US-Neural2-F', name: 'Neural2-F (Female)' },
|
||||
{ value: 'en-US-Neural2-G', name: 'Neural2-G (Female)' },
|
||||
{ value: 'en-US-Neural2-H', name: 'Neural2-H (Female)' },
|
||||
{ value: 'en-US-Neural2-I', name: 'Neural2-I (Male)' },
|
||||
{ value: 'en-US-Neural2-J', name: 'Neural2-J (Male)' },
|
||||
{ value: 'en-US-Studio-M', name: 'Studio-M (Male)' },
|
||||
{ value: 'en-US-Studio-O', name: 'Studio-M (Female)' },
|
||||
{ value: 'en-US-Polyglot-1', name: 'Polyglot-1 (Male)' },
|
||||
{ value: 'en-US-News-K', name: 'News-K (Female)' },
|
||||
{ value: 'en-US-News-L', name: 'News-L (Female)' },
|
||||
{ value: 'en-US-News-M', name: 'News-M (Male)' },
|
||||
{ value: 'en-US-News-N', name: 'News-N (Male)' },
|
||||
|
||||
{ value: 'en-US-Standard-A', name: 'Standard-A (Male)' },
|
||||
{ value: 'en-US-Standard-F', name: 'Standard-F (Female)' },
|
||||
{ value: 'en-US-Standard-G', name: 'Standard-G (Female)' },
|
||||
{ value: 'en-US-Standard-H', name: 'Standard-H (Female)' },
|
||||
{ value: 'en-US-Standard-I', name: 'Standard-I (Male)' },
|
||||
{ value: 'en-US-Standard-J', name: 'Standard-J (Male)' },
|
||||
{ value: 'en-US-Wavenet-G', name: 'Wavenet-G (Female)' },
|
||||
{ value: 'en-US-Wavenet-H', name: 'Wavenet-H (Female)' },
|
||||
{ value: 'en-US-Wavenet-I', name: 'Wavenet-I (Male)' },
|
||||
{ value: 'en-US-Wavenet-J', name: 'Wavenet-J (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'fil-PH',
|
||||
name: 'Filipino (Philippines)',
|
||||
voices: [
|
||||
{ value: 'fil-PH-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'fil-PH-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'fil-ph-Neural2-A', name: 'Neural2-A (Female)' },
|
||||
{ value: 'fil-ph-Neural2-D', name: 'Neural2-A (Male)' },
|
||||
|
||||
{ value: 'fil-PH-Standard-B', name: 'Standard-B (Female)' },
|
||||
{ value: 'fil-PH-Standard-C', name: 'Standard-C (Male)' },
|
||||
{ value: 'fil-PH-Standard-D', name: 'Standard-D (Male)' },
|
||||
{ value: 'fil-PH-Wavenet-B', name: 'Wavenet-B (Female)' },
|
||||
{ value: 'fil-PH-Wavenet-C', name: 'Wavenet-C (Male)' },
|
||||
{ value: 'fil-PH-Wavenet-D', name: 'Wavenet-D (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'fi-FI',
|
||||
name: 'Finnish (Finland)',
|
||||
voices: [
|
||||
{ value: 'fi-FI-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'fi-FI-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'fr-CA',
|
||||
name: 'French (Canada)',
|
||||
voices: [
|
||||
{ value: 'fr-CA-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'fr-CA-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'fr-CA-Standard-C', name: 'Standard-C (Female)' },
|
||||
{ value: 'fr-CA-Standard-D', name: 'Standard-D (Male)' },
|
||||
{ value: 'fr-CA-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'fr-CA-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
{ value: 'fr-CA-Wavenet-C', name: 'Wavenet-C (Female)' },
|
||||
{ value: 'fr-CA-Wavenet-D', name: 'Wavenet-D (Male)' },
|
||||
{ value: 'fr-CA-Neural2-A', name: 'Neural2-A (Female)' },
|
||||
{ value: 'fr-CA-Neural2-B', name: 'Neural2-B (Male)' },
|
||||
{ value: 'fr-CA-Neural2-C', name: 'Neural2-C (Female)' },
|
||||
{ value: 'fr-CA-Neural2-D', name: 'Neural2-D (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'fr-FR',
|
||||
name: 'French (France)',
|
||||
voices: [
|
||||
{ value: 'fr-FR-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'fr-FR-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'fr-FR-Standard-C', name: 'Standard-C (Female)' },
|
||||
{ value: 'fr-FR-Standard-D', name: 'Standard-D (Male)' },
|
||||
{ value: 'fr-FR-Standard-E', name: 'Standard-E (Female)' },
|
||||
{ value: 'fr-FR-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'fr-FR-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
{ value: 'fr-FR-Wavenet-C', name: 'Wavenet-C (Female)' },
|
||||
{ value: 'fr-FR-Wavenet-D', name: 'Wavenet-D (Male)' },
|
||||
{ value: 'fr-FR-Wavenet-E', name: 'Wavenet-E (Female)' },
|
||||
{ value: 'fr-FR-Neural2-A', name: 'Neural2-A (Female)' },
|
||||
{ value: 'fr-FR-Neural2-B', name: 'Neural2-B (Male)' },
|
||||
{ value: 'fr-FR-Neural2-C', name: 'Neural2-C (Female)' },
|
||||
{ value: 'fr-FR-Neural2-D', name: 'Neural2-D (Male)' },
|
||||
{ value: 'fr-FR-Neural2-E', name: 'Neural2-E (Female)' },
|
||||
{ value: 'fr-FR-Polyglot-1', name: 'Polyglot-1 (Male)' },
|
||||
|
||||
{ value: 'fr-FR-Studio-A', name: 'Studio-A (Female)' },
|
||||
{ value: 'fr-FR-Studio-D', name: 'Studio-D (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'de-DE',
|
||||
name: 'German (Germany)',
|
||||
voices: [
|
||||
{ value: 'de-DE-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'de-DE-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'de-DE-Standard-E', name: 'Standard-E (Male)' },
|
||||
{ value: 'de-DE-Standard-F', name: 'Standard-F (Female)' },
|
||||
{ value: 'de-DE-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'de-DE-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
{ value: 'de-DE-Wavenet-C', name: 'Wavenet-C (Female)' },
|
||||
{ value: 'de-DE-Wavenet-D', name: 'Wavenet-D (Male)' },
|
||||
{ value: 'de-DE-Wavenet-E', name: 'Wavenet-E (Male)' },
|
||||
{ value: 'de-DE-Wavenet-F', name: 'Wavenet-F (Female)' },
|
||||
{ value: 'de-DE-Neural2-B', name: 'Neural2-B (Male)' },
|
||||
{ value: 'de-DE-Neural2-C', name: 'Neural2-C (Female)' },
|
||||
{ value: 'de-DE-Neural2-D', name: 'Neural2-D (Male)' },
|
||||
{ value: 'de-DE-Neural2-F', name: 'Neural2-F (Female)' },
|
||||
{ value: 'de-DE-Polyglot-1', name: 'Polyglot-1 (Male)' },
|
||||
|
||||
{ value: 'de-DE-Neural2-A', name: 'Neural2-A (Female)' },
|
||||
{ value: 'de-DE-Standard-C', name: 'Standard-C (Female)' },
|
||||
{ value: 'de-DE-Standard-D', name: 'Standard-D (Male)' },
|
||||
{ value: 'de-DE-Studio-B', name: 'Studio-B (Male)' },
|
||||
{ value: 'de-DE-Studio-C', name: 'Studio-C (Female)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'el-GR',
|
||||
name: 'Greek (Greece)',
|
||||
voices: [
|
||||
{ value: 'el-GR-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'el-GR-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
value: 'gl-ES',
|
||||
name: 'Galician (Spain)',
|
||||
voices: [{ value: 'gl-ES-Standard-A', name: 'Standard-A (Female)' }],
|
||||
},
|
||||
{
|
||||
value: 'gu-IN',
|
||||
name: 'Gujarati (India)',
|
||||
voices: [
|
||||
{ value: 'gu-IN-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'gu-IN-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'gu-IN-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'gu-IN-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'he-IL',
|
||||
name: 'Hebrew (Israel)',
|
||||
voices: [
|
||||
{ value: 'he-IL-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'he-IL-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'he-IL-Standard-C', name: 'Standard-C (Female)' },
|
||||
{ value: 'he-IL-Standard-D', name: 'Standard-D (Male)' },
|
||||
{ value: 'he-IL-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'he-IL-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
{ value: 'he-IL-Wavenet-C', name: 'Wavenet-C (Female)' },
|
||||
{ value: 'he-IL-Wavenet-D', name: 'Wavenet-D (Male)' },
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
value: 'hi-IN',
|
||||
name: 'Hindi (India)',
|
||||
voices: [
|
||||
{ value: 'hi-IN-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'hi-IN-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'hi-IN-Standard-C', name: 'Standard-C (Male)' },
|
||||
{ value: 'hi-IN-Standard-D', name: 'Standard-D (Female)' },
|
||||
{ value: 'hi-IN-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'hi-IN-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
{ value: 'hi-IN-Wavenet-C', name: 'Wavenet-C (Male)' },
|
||||
{ value: 'hi-IN-Wavenet-D', name: 'Wavenet-D (Female)' },
|
||||
{ value: 'hi-IN-Neural2-A', name: 'Neural2-A (Female)' },
|
||||
{ value: 'hi-IN-Neural2-B', name: 'Neural2-B (Male)' },
|
||||
{ value: 'hi-IN-Neural2-C', name: 'Neural2-C (Male)' },
|
||||
{ value: 'hi-IN-Neural2-D', name: 'Neural2-D (Female)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'hu-HU',
|
||||
name: 'Hungarian (Hungary)',
|
||||
voices: [
|
||||
{ value: 'hu-HU-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'hu-HU-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'is-IS',
|
||||
name: 'Icelandic (Iceland)',
|
||||
voices: [{ value: 'is-IS-Standard-A', name: 'Standard-A (Female)' }],
|
||||
},
|
||||
{
|
||||
value: 'id-ID',
|
||||
name: 'Indonesian (Indonesia)',
|
||||
voices: [
|
||||
{ value: 'id-ID-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'id-ID-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'id-ID-Standard-C', name: 'Standard-C (Male)' },
|
||||
{ value: 'id-ID-Standard-D', name: 'Standard-D (Female)' },
|
||||
{ value: 'id-ID-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'id-ID-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
{ value: 'id-ID-Wavenet-C', name: 'Wavenet-C (Male)' },
|
||||
{ value: 'id-ID-Wavenet-D', name: 'Wavenet-D (Female)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'it-IT',
|
||||
name: 'Italian (Italy)',
|
||||
voices: [
|
||||
{ value: 'it-IT-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'it-IT-Standard-B', name: 'Standard-B (Female)' },
|
||||
{ value: 'it-IT-Standard-C', name: 'Standard-C (Male)' },
|
||||
{ value: 'it-IT-Standard-D', name: 'Standard-D (Male)' },
|
||||
{ value: 'it-IT-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'it-IT-Wavenet-B', name: 'Wavenet-B (Female)' },
|
||||
{ value: 'it-IT-Wavenet-C', name: 'Wavenet-C (Male)' },
|
||||
{ value: 'it-IT-Wavenet-D', name: 'Wavenet-D (Male)' },
|
||||
{ value: 'it-IT-Neural2-A', name: 'Neural2-A (Female)' },
|
||||
{ value: 'it-IT-Neural2-C', name: 'Neural2-C (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'ja-JP',
|
||||
name: 'Japanese (Japan)',
|
||||
voices: [
|
||||
{ value: 'ja-JP-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'ja-JP-Standard-B', name: 'Standard-B (Female)' },
|
||||
{ value: 'ja-JP-Standard-C', name: 'Standard-C (Male)' },
|
||||
{ value: 'ja-JP-Standard-D', name: 'Standard-D (Male)' },
|
||||
{ value: 'ja-JP-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'ja-JP-Wavenet-B', name: 'Wavenet-B (Female)' },
|
||||
{ value: 'ja-JP-Wavenet-C', name: 'Wavenet-C (Male)' },
|
||||
{ value: 'ja-JP-Wavenet-D', name: 'Wavenet-D (Male)' },
|
||||
{ value: 'ja-JP-Neural2-B', name: 'Neural2-B (Female)' },
|
||||
{ value: 'ja-JP-Neural2-C', name: 'Neural2-C (Male)' },
|
||||
{ value: 'ja-JP-Neural2-D', name: 'Neural2-D (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'kn-IN',
|
||||
name: 'Kannada (India)',
|
||||
voices: [
|
||||
{ value: 'kn-IN-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'kn-IN-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'kn-IN-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'kn-IN-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'ko-KR',
|
||||
name: 'Korean (South Korea)',
|
||||
voices: [
|
||||
{ value: 'ko-KR-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'ko-KR-Standard-B', name: 'Standard-B (Female)' },
|
||||
{ value: 'ko-KR-Standard-C', name: 'Standard-C (Male)' },
|
||||
{ value: 'ko-KR-Standard-D', name: 'Standard-D (Male)' },
|
||||
{ value: 'ko-KR-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'ko-KR-Wavenet-B', name: 'Wavenet-B (Female)' },
|
||||
{ value: 'ko-KR-Wavenet-C', name: 'Wavenet-C (Male)' },
|
||||
{ value: 'ko-KR-Wavenet-D', name: 'Wavenet-D (Male)' },
|
||||
{ value: 'ko-KR-Neural2-A', name: 'Neural2-A (Female)' },
|
||||
{ value: 'ko-KR-Neural2-B', name: 'Neural2-B (Female)' },
|
||||
{ value: 'ko-KR-Neural2-C', name: 'Neural2-C (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'lv-LV',
|
||||
name: 'Latvian (Latvia)',
|
||||
voices: [{ value: 'lv-LV-Standard-A', name: 'Standard-A (Male)' }],
|
||||
},
|
||||
{
|
||||
value: 'lt-LT',
|
||||
name: 'Lithuanian (Lithuania)',
|
||||
voices: [{ value: 'lt-LT-Standard-A', name: 'Standard-A (Male)' }],
|
||||
},
|
||||
{
|
||||
value: 'cmn-CN',
|
||||
name: 'Mandarin Chinese',
|
||||
voices: [
|
||||
{ value: 'cmn-CN-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'cmn-CN-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'cmn-CN-Standard-C', name: 'Standard-C (Male)' },
|
||||
{ value: 'cmn-CN-Standard-D', name: 'Standard-D (Female)' },
|
||||
{ value: 'cmn-CN-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'cmn-CN-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
{ value: 'cmn-CN-Wavenet-C', name: 'Wavenet-C (Male)' },
|
||||
{ value: 'cmn-CN-Wavenet-D', name: 'Wavenet-D (Female)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'cmn-TW',
|
||||
name: 'Mandarin Chinese (Traditional)',
|
||||
voices: [
|
||||
{ value: 'cmn-TW-Standard-A-Alpha', name: 'Standard-A-Alpha (Female)' },
|
||||
{ value: 'cmn-TW-Standard-B-Alpha', name: 'Standard-B-Alpha (Male)' },
|
||||
{ value: 'cmn-TW-Standard-C-Alpha', name: 'Standard-C-Alpha (Male)' },
|
||||
{ value: 'cmn-TW-Wavenet-A-Alpha', name: 'Wavenet-A-Alpha (Female)' },
|
||||
{ value: 'cmn-TW-Wavenet-B-Alpha', name: 'Wavenet-B-Alpha (Male)' },
|
||||
{ value: 'cmn-TW-Wavenet-C-Alpha', name: 'Wavenet-C-Alpha (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'ms-MY',
|
||||
name: 'Malay (Malaysia)',
|
||||
voices: [
|
||||
{ value: 'ms-MY-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'ms-MY-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'ms-MY-Standard-C', name: 'Standard-C (Female)' },
|
||||
{ value: 'ms-MY-Standard-D', name: 'Standard-D (Male)' },
|
||||
{ value: 'ms-MY-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'ms-MY-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
{ value: 'ms-MY-Wavenet-C', name: 'Wavenet-C (Female)' },
|
||||
{ value: 'ms-MY-Wavenet-D', name: 'Wavenet-D (Male)' },
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
value: 'ml-IN',
|
||||
name: 'Malayalam (India)',
|
||||
voices: [
|
||||
{ value: 'ml-IN-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'ml-IN-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'ml-IN-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'ml-IN-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
{ value: 'ml-IN-Wavenet-C', name: 'Wavenet-C (Female)' },
|
||||
{ value: 'ml-IN-Wavenet-D', name: 'Wavenet-D (Male)' },
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
value: 'mr-IN',
|
||||
name: 'Marathi (India)',
|
||||
voices: [
|
||||
{ value: 'mr-IN-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'mr-IN-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'mr-IN-Standard-C', name: 'Standard-C (Female)' },
|
||||
{ value: 'mr-IN-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'mr-IN-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
{ value: 'mr-IN-Wavenet-C', name: 'Wavenet-C (Female)' },
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
value: 'nb-NO',
|
||||
name: 'Norwegian (Norway)',
|
||||
voices: [
|
||||
{ value: 'nb-NO-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'nb-NO-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'nb-NO-Standard-C', name: 'Standard-C (Female)' },
|
||||
{ value: 'nb-NO-Standard-D', name: 'Standard-D (Male)' },
|
||||
{ value: 'nb-no-Standard-E', name: 'Standard-E (Female)' },
|
||||
{ value: 'nb-NO-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'nb-NO-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
{ value: 'nb-NO-Wavenet-C', name: 'Wavenet-C (Female)' },
|
||||
{ value: 'nb-NO-Wavenet-D', name: 'Wavenet-D (Male)' },
|
||||
{ value: 'nb-no-Wavenet-E', name: 'Wavenet-E (Female)' },
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
value: 'nl-BE',
|
||||
name: 'Dutch (Belgium)',
|
||||
voices: [
|
||||
{ value: 'nl-BE-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'nl-BE-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'nl-BE-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'nl-BE-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
value: 'pl-PL',
|
||||
name: 'Polish (Poland)',
|
||||
voices: [
|
||||
{ value: 'pl-PL-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'pl-PL-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'pl-PL-Standard-C', name: 'Standard-C (Male)' },
|
||||
{ value: 'pl-PL-Standard-D', name: 'Standard-D (Female)' },
|
||||
{ value: 'pl-PL-Standard-E', name: 'Standard-E (Female)' },
|
||||
{ value: 'pl-PL-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'pl-PL-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
{ value: 'pl-PL-Wavenet-C', name: 'Wavenet-C (Male)' },
|
||||
{ value: 'pl-PL-Wavenet-D', name: 'Wavenet-D (Female)' },
|
||||
{ value: 'pl-PL-Wavenet-E', name: 'Wavenet-E (Female)' },
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
value: 'pa-IN',
|
||||
name: 'Punjabi (India)',
|
||||
voices: [
|
||||
{ value: 'pa-IN-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'pa-IN-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'pa-IN-Standard-C', name: 'Standard-C (Female)' },
|
||||
{ value: 'pa-IN-Standard-D', name: 'Standard-D (Male)' },
|
||||
{ value: 'pa-IN-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'pa-IN-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
{ value: 'pa-IN-Wavenet-C', name: 'Wavenet-C (Female)' },
|
||||
{ value: 'pa-IN-Wavenet-D', name: 'Wavenet-D (Male)' },
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
value: 'pt-BR',
|
||||
name: 'Portuguese (Brazil)',
|
||||
voices: [
|
||||
{ value: 'pt-BR-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'pt-BR-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'pt-BR-Neural2-A', name: 'Neural2-A (Female)' },
|
||||
{ value: 'pt-BR-Neural2-B', name: 'Neural2-B (Male)' },
|
||||
{ value: 'pt-BR-Neural2-C', name: 'Neural2-C (Female)' },
|
||||
|
||||
{ value: 'pt-BR-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'pt-BR-Standard-C', name: 'Standard-C (Female)' },
|
||||
{ value: 'pt-BR-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
{ value: 'pt-BR-Wavenet-C', name: 'Wavenet-C (Female)' },
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
value: 'pt-PT',
|
||||
name: 'Portuguese (Portugal)',
|
||||
voices: [
|
||||
{ value: 'pt-PT-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'pt-PT-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'pt-PT-Standard-C', name: 'Standard-C (Male)' },
|
||||
{ value: 'pt-PT-Standard-D', name: 'Standard-D (Female)' },
|
||||
{ value: 'pt-PT-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'pt-PT-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
{ value: 'pt-PT-Wavenet-C', name: 'Wavenet-C (Male)' },
|
||||
{ value: 'pt-PT-Wavenet-D', name: 'Wavenet-D (Female)' },
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
value: 'ro-RO',
|
||||
name: 'Romanian (Romania)',
|
||||
voices: [
|
||||
{ value: 'ro-RO-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'ro-RO-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
value: 'ru-RU',
|
||||
name: 'Russian (Russia)',
|
||||
voices: [
|
||||
{ value: 'ru-RU-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'ru-RU-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'ru-RU-Standard-C', name: 'Standard-C (Female)' },
|
||||
{ value: 'ru-RU-Standard-D', name: 'Standard-D (Male)' },
|
||||
{ value: 'ru-RU-Standard-E', name: 'Standard-E (Female)' },
|
||||
{ value: 'ru-RU-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'ru-RU-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
{ value: 'ru-RU-Wavenet-C', name: 'Wavenet-C (Female)' },
|
||||
{ value: 'ru-RU-Wavenet-D', name: 'Wavenet-D (Male)' },
|
||||
{ value: 'ru-RU-Wavenet-E', name: 'Wavenet-E (Female)' },
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
value: 'sk-SK',
|
||||
name: 'Slovak (Slovakia)',
|
||||
voices: [
|
||||
{ value: 'sk-SK-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'sk-SK-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
value: 'sr-RS',
|
||||
name: 'Serbian (Cyrillic)',
|
||||
voices: [{ value: 'sr-RS-Standard-A', name: 'Standard-A (Female)' }],
|
||||
},
|
||||
|
||||
{
|
||||
value: 'es-ES',
|
||||
name: 'Spanish (Spain)',
|
||||
voices: [
|
||||
{ value: 'es-ES-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'es-ES-Neural2-A', name: 'Neural2-A (Female)' },
|
||||
{ value: 'es-ES-Neural2-B', name: 'Neural2-B (Male)' },
|
||||
{ value: 'es-ES-Neural2-C', name: 'Neural2-C (Female)' },
|
||||
{ value: 'es-ES-Neural2-D', name: 'Neural2-D (Female)' },
|
||||
{ value: 'es-ES-Neural2-E', name: 'Neural2-E (Female)' },
|
||||
{ value: 'es-ES-Neural2-F', name: 'Neural2-F (Male)' },
|
||||
{ value: 'es-ES-Polyglot-1', name: 'Polyglot-1 (Male)' },
|
||||
|
||||
{ value: 'es-ES-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'es-ES-Standard-C', name: 'Standard-C (Female)' },
|
||||
{ value: 'es-ES-Standard-D', name: 'Standard-D (Female)' },
|
||||
{ value: 'es-ES-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
{ value: 'es-ES-Wavenet-C', name: 'Wavenet-C (Female)' },
|
||||
{ value: 'es-ES-Wavenet-D', name: 'Wavenet-D (Female)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'es-US',
|
||||
name: 'Spanish (US)',
|
||||
voices: [
|
||||
{ value: 'es-US-Neural2-A', name: 'Neural2-A (Female)' },
|
||||
{ value: 'es-US-Neural2-B', name: 'Neural2-B (Male)' },
|
||||
{ value: 'es-US-Neural2-C', name: 'Neural2-C (Male)' },
|
||||
{ value: 'es-US-Studio-B', name: 'Studio-B (Male)' },
|
||||
{ value: 'es-US-Polyglot-1', name: 'Polyglot-1 (Male)' },
|
||||
{ value: 'es-US-News-D', name: 'News-D (Male)' },
|
||||
{ value: 'es-US-News-E', name: 'News-E (Male)' },
|
||||
{ value: 'es-US-News-F', name: 'News-F (Female)' },
|
||||
{ value: 'es-US-News-G', name: 'News-G (Female)' },
|
||||
|
||||
{ value: 'es-US-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'es-US-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'es-US-Standard-C', name: 'Standard-C (Male)' },
|
||||
{ value: 'es-US-Studio-B', name: 'Studio-B (Male)' },
|
||||
{ value: 'es-US-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'es-US-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
{ value: 'es-US-Wavenet-C', name: 'Wavenet-C (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'sv-SE',
|
||||
name: 'Swedish (Sweden)',
|
||||
voices: [
|
||||
{ value: 'sv-SE-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'sv-SE-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
|
||||
{ value: 'sv-SE-Standard-B', name: 'Standard-B (Female)' },
|
||||
{ value: 'sv-SE-Standard-C', name: 'Standard-C (Female)' },
|
||||
{ value: 'sv-SE-Standard-D', name: 'Standard-D (Male)' },
|
||||
{ value: 'sv-SE-Standard-E', name: 'Standard-E (Male)' },
|
||||
{ value: 'sv-SE-Wavenet-B', name: 'Wavenet-B (Female)' },
|
||||
{ value: 'sv-SE-Wavenet-C', name: 'Wavenet-C (Male)' },
|
||||
{ value: 'sv-SE-Wavenet-D', name: 'Wavenet-D (Female)' },
|
||||
{ value: 'sv-SE-Wavenet-E', name: 'Wavenet-E (Male)' },
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
value: 'ta-IN',
|
||||
name: 'Tamil (India)',
|
||||
voices: [
|
||||
{ value: 'ta-IN-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'ta-IN-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'ta-IN-Standard-C', name: 'Standard-C (Female)' },
|
||||
{ value: 'ta-IN-Standard-D', name: 'Standard-D (Male)' },
|
||||
{ value: 'ta-IN-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'ta-IN-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
{ value: 'ta-IN-Wavenet-C', name: 'Wavenet-C (Female)' },
|
||||
{ value: 'ta-IN-Wavenet-D', name: 'Wavenet-D (Male)' },
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
value: 'te-IN',
|
||||
name: 'Telugu (India)',
|
||||
voices: [
|
||||
{ value: 'te-IN-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'te-IN-Standard-B', name: 'Standard-B (Male)' },
|
||||
],
|
||||
},
|
||||
|
||||
{
|
||||
value: 'tr-TR',
|
||||
name: 'Turkish (Turkey)',
|
||||
voices: [
|
||||
{ value: 'tr-TR-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'tr-TR-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'tr-TR-Standard-C', name: 'Standard-C (Female)' },
|
||||
{ value: 'tr-TR-Standard-D', name: 'Standard-D (Female)' },
|
||||
{ value: 'tr-TR-Standard-E', name: 'Standard-E (Male)' },
|
||||
{ value: 'tr-TR-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'tr-TR-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
{ value: 'tr-TR-Wavenet-C', name: 'Wavenet-C (Female)' },
|
||||
{ value: 'tr-TR-Wavenet-D', name: 'Wavenet-D (Female)' },
|
||||
{ value: 'tr-TR-Wavenet-E', name: 'Wavenet-E (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'uk-UA',
|
||||
name: 'Ukrainian (Ukraine)',
|
||||
voices: [
|
||||
{ value: 'uk-UA-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'uk-UA-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'th-TH',
|
||||
name: 'Thai (Thailand)',
|
||||
voices: [
|
||||
{ value: 'th-TH-Neural2-C', name: 'Neural2-C (Female)' },
|
||||
|
||||
{ value: 'th-TH-Standard-A', name: 'Standard-A (Female)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'vi-VN',
|
||||
name: 'Vietnamese (Vietnam)',
|
||||
voices: [
|
||||
{ value: 'vi-VN-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'vi-VN-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'vi-VN-Standard-C', name: 'Standard-C (Female)' },
|
||||
{ value: 'vi-VN-Standard-D', name: 'Standard-D (Male)' },
|
||||
{ value: 'vi-VN-Wavenet-A', name: 'Wavenet-A (Female)' },
|
||||
{ value: 'vi-VN-Wavenet-B', name: 'Wavenet-B (Male)' },
|
||||
{ value: 'vi-VN-Wavenet-C', name: 'Wavenet-C (Female)' },
|
||||
{ value: 'vi-VN-Wavenet-D', name: 'Wavenet-D (Male)' },
|
||||
{ value: 'vi-VN-Neural2-A', name: 'Neural2-A (Female)' },
|
||||
{ value: 'vi-VN-Neural2-D', name: 'Neural2-D (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'yue-HK',
|
||||
name: 'Chinese (Hong Kong)',
|
||||
voices: [
|
||||
{ value: 'yue-HK-Standard-A', name: 'Standard-A (Female)' },
|
||||
{ value: 'yue-HK-Standard-B', name: 'Standard-B (Male)' },
|
||||
{ value: 'yue-HK-Standard-C', name: 'Standard-C (Female)' },
|
||||
{ value: 'yue-HK-Standard-D', name: 'Standard-D (Male)' },
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -1,167 +0,0 @@
|
||||
module.exports = [
|
||||
{
|
||||
value: 'de-DE',
|
||||
name: 'German (Germany)',
|
||||
voices: [
|
||||
{ value: 'de-DE_DieterVoice', name: 'Dieter (Male): Standard German' },
|
||||
{
|
||||
value: 'de-DE_DieterV2Voice',
|
||||
name: 'Dieter 2 (Male): Standard German',
|
||||
},
|
||||
{
|
||||
value: 'de-DE_DieterV3Voice',
|
||||
name: 'Dieter 3 (Male): Standard German',
|
||||
},
|
||||
{ value: 'de-DE_ErikaV3Voice', name: 'Erika (Female): Standard German' },
|
||||
{ value: 'de-DE_BirgitVoice', name: 'Brigit (Female): Standard German' },
|
||||
{
|
||||
value: 'de-DE_BirgitV2Voice',
|
||||
name: 'Brigit 2 (Female): Standard German',
|
||||
},
|
||||
{
|
||||
value: 'de-DE_BirgitV3Voice',
|
||||
name: 'Brigit 3 (Female): Standard German',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'en-US',
|
||||
name: 'English (US)',
|
||||
voices: [
|
||||
{
|
||||
value: 'en-US_MichaelExpressive',
|
||||
name: 'Michael (Male): American English - Expressive',
|
||||
},
|
||||
{ value: 'en-US_MichaelVoice', name: 'Michael (Male): American English' },
|
||||
{
|
||||
value: 'en-US_MichaelV2Voice',
|
||||
name: 'Michael 2 (Male): American English',
|
||||
},
|
||||
{
|
||||
value: 'en-US_MichaelV3Voice',
|
||||
name: 'Michael 3 (Male): American English',
|
||||
},
|
||||
{ value: 'en-US_HenryV3Voice', name: 'Henry (Male): American English' },
|
||||
{ value: 'en-US_EmilyV3Voice', name: 'Emily (Female): American English' },
|
||||
{
|
||||
value: 'en-US_OliviaV3Voice',
|
||||
name: 'Olivia (Female): American English',
|
||||
},
|
||||
{
|
||||
value: 'en-US_AllisonExpressive',
|
||||
name: 'Allison (Female): American English - Expressive',
|
||||
},
|
||||
{
|
||||
value: 'en-US_AllisonVoice',
|
||||
name: 'Allison (Female): American English',
|
||||
},
|
||||
{
|
||||
value: 'en-US_AllisonV2Voice',
|
||||
name: 'Allison 2 (Female): American English',
|
||||
},
|
||||
{
|
||||
value: 'en-US_AllisonV3Voice',
|
||||
name: 'Allison 3 (Female): American English',
|
||||
},
|
||||
{
|
||||
value: 'en-US_LisaExpressive',
|
||||
name: 'Lisa (Female): American English - Expressive',
|
||||
},
|
||||
{ value: 'en-US_LisaVoice', name: 'Lisa (Female): American English' },
|
||||
{ value: 'en-US_LisaV2Voice', name: 'Lisa 2 (Female): American English' },
|
||||
{ value: 'en-US_LisaV3Voice', name: 'Lisa 3 (Female): American English' },
|
||||
{ value: 'en-US_KevinV3Voice', name: 'Kevin (Male): American English' },
|
||||
{
|
||||
value: 'en-US_EmmaExpressive',
|
||||
name: 'Emma (Female): American English - Expressive',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'en-GB',
|
||||
name: 'English (GB)',
|
||||
voices: [
|
||||
{ value: 'en-GB_JamesV3Voice', name: 'James (Male)' },
|
||||
{ value: 'en-GB_KateVoice', name: 'Kate (Female)' },
|
||||
{ value: 'en-GB_KateV3Voice', name: 'Kate 2 (Female)' },
|
||||
{ value: 'en-GB_CharlotteV3Voice', name: 'Charlotte (Female)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'es-US',
|
||||
name: 'Spanish (North America)',
|
||||
voices: [
|
||||
{
|
||||
value: 'es-US_SofiaVoice',
|
||||
name: 'Sofia (Female): North American Spanish',
|
||||
},
|
||||
{
|
||||
value: 'es-US_SofiaV3Voice',
|
||||
name: 'Sofia 2 (Female): North American Spanish',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'es-LA',
|
||||
name: 'Spanish (Latin America)',
|
||||
voices: [
|
||||
{
|
||||
value: 'es-LA_SofiaVoice',
|
||||
name: 'Sofia (Female): Latin American Spanish',
|
||||
},
|
||||
{
|
||||
value: 'es-LA_SofiaV3Voice',
|
||||
name: 'Sofia 2 (Female): Latin American Spanish',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'es-ES',
|
||||
name: 'Spanish (Castilian)',
|
||||
voices: [
|
||||
{ value: 'es-ES_LauraVoice', name: 'Laura (Female)' },
|
||||
{ value: 'es-ES_LauraV3Voice', name: 'Laura 2 (Female)' },
|
||||
{ value: 'es-ES_EnriqueVoice', name: 'Enrique (Male)' },
|
||||
{ value: 'es-ES_EnriqueV3Voice', name: 'Enrique 2 (Male)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'fr-FR',
|
||||
name: 'French (FR)',
|
||||
voices: [
|
||||
{ value: 'fr-FR_NicolasV3Voice', name: 'Nicolas (Male)' },
|
||||
{ value: 'fr-FR_ReneeVoice', name: 'Renee (Female)' },
|
||||
{ value: 'fr-FR_ReneeV3Voice', name: 'Renee 2 (Female)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'fr-CA',
|
||||
name: 'French (CA)',
|
||||
voices: [{ value: 'fr-CA_LouiseV3Voice', name: 'Louise (Female)' }],
|
||||
},
|
||||
{
|
||||
value: 'it-IT',
|
||||
name: 'Italian',
|
||||
voices: [
|
||||
{ value: 'it-IT_FrancescaVoice', name: 'Francesca (Female)' },
|
||||
{ value: 'it-IT_FrancescaV2Voice', name: 'Francesca 2 (Female)' },
|
||||
{ value: 'it-IT_FrancescaV3Voice', name: 'Francesca 3 (Female)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'pt-BR',
|
||||
name: 'Portuguese (Brazil)',
|
||||
voices: [
|
||||
{ value: 'pt-BR_IsabelaVoice', name: 'Isabela (Female)' },
|
||||
{ value: 'pt-BR_IsabelaV3Voice', name: 'Isabela 2 (Female)' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'ja-JP',
|
||||
name: 'Japanese',
|
||||
voices: [
|
||||
{ value: 'ja-JP_EmiVoice', name: 'Emi (Female)' },
|
||||
{ value: 'ja-JP_EmiV3Voice', name: 'Emi 2 (Female)' },
|
||||
],
|
||||
},
|
||||
];
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,28 +0,0 @@
|
||||
const TtsAwsLanguagesVoiceRaw = require('./tts-microsoft-raw');
|
||||
|
||||
const languagesVoices = [];
|
||||
|
||||
TtsAwsLanguagesVoiceRaw.forEach((data) => {
|
||||
const lang = languagesVoices.find((l) => {
|
||||
return l.value === data.Locale;
|
||||
});
|
||||
|
||||
if (!lang) {
|
||||
languagesVoices.push({
|
||||
value: data.Locale,
|
||||
name: data.LocaleName,
|
||||
voices: TtsAwsLanguagesVoiceRaw
|
||||
.filter((d) => {
|
||||
return d.Locale === data.Locale;
|
||||
})
|
||||
.map((d) => {
|
||||
return {
|
||||
value: d.ShortName,
|
||||
name: `${d.DisplayName} (${d.Gender})`,
|
||||
};
|
||||
}),
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = languagesVoices;
|
||||
@@ -1,9 +0,0 @@
|
||||
module.exports = [
|
||||
{ name: 'Aurora English (US) Female', value: 'alpha-aurora-en-v2' },
|
||||
{ name: 'Asteria English (US) Female', value: 'alpha-asteria-en-v2' },
|
||||
{ name: 'Artemis English (UK) Female', value: 'alpha-artemis-en-v3' },
|
||||
{ name: 'Andromeda English (US) Female', value: 'alpha-andromeda-en-v3' },
|
||||
{ name: 'Stella English (UK) Female', value: 'alpha-stella-en-v2' },
|
||||
{ name: 'Orion English (US) Male', value: 'alpha-orion-en-v2' },
|
||||
{ name: 'Atlas English (US) Male', value: 'alpha-atlas-en-v3' },
|
||||
];
|
||||
@@ -1,8 +0,0 @@
|
||||
module.exports = [
|
||||
{ name: 'Turbo v2', value: 'eleven_turbo_v2' },
|
||||
{ name: 'Multilingual v2', value: 'eleven_multilingual_v2' },
|
||||
{ name: 'Multilingual v1', value: 'eleven_multilingual_v1' },
|
||||
{ name: 'English v1', value: 'eleven_monolingual_v1' },
|
||||
{ name: 'English v2', value: 'eleven_english_sts_v2' },
|
||||
];
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
module.exports = [
|
||||
{ name: 'TTS-1', value: 'tts-1' },
|
||||
{ name: 'TTS-1-HD', value: 'tts-1-hd' },
|
||||
];
|
||||
|
||||
@@ -1,958 +0,0 @@
|
||||
module.exports = [
|
||||
{
|
||||
value: 'ar-WW',
|
||||
name: 'Arabic (Worldwide)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Laila - standard',
|
||||
name: 'Laila (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Tarik - standard',
|
||||
name: 'Tarik (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Miriam - standard',
|
||||
name: 'Miriam (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'eu-ES',
|
||||
name: 'Basque (Spain)',
|
||||
voices: [{ value: 'Miren', name: 'Miren (standard)', model: 'standard' }],
|
||||
},
|
||||
{
|
||||
value: 'bn-IN',
|
||||
name: 'Bengali (India)',
|
||||
voices: [
|
||||
{ value: 'Paya - standard', name: 'Paya (standard)', model: 'standard' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'bho-IN',
|
||||
name: 'Bhojpuri (India)',
|
||||
voices: [
|
||||
{ value: 'Jaya - standard', name: 'Jaya (standard)', model: 'standard' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'bg-BG',
|
||||
name: 'Bulgarian (Bulgaria)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Daria - standard',
|
||||
name: 'Daria (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'yue-HK',
|
||||
name: 'Cantonese (Hong Kong)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Sinji-Ml - standard',
|
||||
name: 'Sinji-Ml (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'ca-ES',
|
||||
name: 'Catalan (Spain)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Jordi - standard',
|
||||
name: 'Jordi (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Montserrat - standard',
|
||||
name: 'Montserrat (standard)',
|
||||
model: 'enhanced',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'yue-HK',
|
||||
name: 'Croatian (Croatia)',
|
||||
voices: [
|
||||
{ value: 'Lana - standard', name: 'Lana (standard)', model: 'standard' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'cs-CZ',
|
||||
name: 'Czech (Czech Republic)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Iveta - standard',
|
||||
name: 'Iveta (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Zuzana - standard',
|
||||
name: 'Zuzana (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Zuzana-ml - enhanced',
|
||||
name: 'Zuzana (enhanced)',
|
||||
model: 'enhanced',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'da-DK',
|
||||
name: 'Danish (Denmark)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Magnus - standard',
|
||||
name: 'Magnus (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{ value: 'Sara - standard', name: 'Sara (standard)', model: 'standard' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'nl-BE',
|
||||
name: 'Dutch (Belgium)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Ellen - standard',
|
||||
name: 'Ellen (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'nl-NL',
|
||||
name: 'Dutch (Belgium)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Claire-Ml - standard',
|
||||
name: 'Claire-Ml (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Xander - standard',
|
||||
name: 'Xander (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'en-AU',
|
||||
name: 'English (Australia)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Karen - standard',
|
||||
name: 'Karen (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{ value: 'Lee - standard', name: 'Lee (standard)', model: 'standard' },
|
||||
{
|
||||
value: 'Matilda - enhanced',
|
||||
name: 'Matilda (enhanced)',
|
||||
model: 'enhanced',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'en-IN',
|
||||
name: 'English (India)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Isha-Ml - enhanced',
|
||||
name: 'Isha-Ml (enhanced)',
|
||||
model: 'enhanced',
|
||||
},
|
||||
{
|
||||
value: 'Rishi - standard',
|
||||
name: 'Rishi (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Rishi-Ml - standard',
|
||||
name: 'Rishi-Ml (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Sangeeta - standard',
|
||||
name: 'Sangeeta (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Veena - standard',
|
||||
name: 'Veena (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'en-IE',
|
||||
name: 'English (Ireland)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Moira - standard',
|
||||
name: 'Moira (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'en-SC',
|
||||
name: 'English (Scotland)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Fiona - standard',
|
||||
name: 'Fiona (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'en-ZA',
|
||||
name: 'English (South Africa)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Tessa - standard',
|
||||
name: 'Tessa (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'en-GB',
|
||||
name: 'English (United Kingdom)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Daniel - standard',
|
||||
name: 'Daniel (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{ value: 'Kate - standard', name: 'Kate (standard)', model: 'standard' },
|
||||
{
|
||||
value: 'Malcolm - standard',
|
||||
name: 'Malcolm (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Oliver - standard',
|
||||
name: 'Oliver (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Serena - enhanced',
|
||||
name: 'Serena (enhanced)',
|
||||
model: 'enhanced',
|
||||
},
|
||||
{
|
||||
value: 'Simon - standard',
|
||||
name: 'Simon (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Stephanie - standard',
|
||||
name: 'Stephanie (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'en-US',
|
||||
name: 'English (United States)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Allison - standard',
|
||||
name: 'Allison (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Ava-Ml - enhanced',
|
||||
name: 'Ava-Ml (enhanced)',
|
||||
model: 'enhanced',
|
||||
},
|
||||
{
|
||||
value: 'Chloe - standard',
|
||||
name: 'Chloe (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{ value: 'Evan - enhanced', name: 'Evan (enhanced)', model: 'enhanced' },
|
||||
{
|
||||
value: 'Nathan - enhanced',
|
||||
name: 'Nathan (enhanced)',
|
||||
model: 'enhanced',
|
||||
},
|
||||
{
|
||||
value: 'Evelyn - standard',
|
||||
name: 'Evelyn (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Nolan - standard',
|
||||
name: 'Nolan (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Samantha - standard',
|
||||
name: 'Samantha (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Susan - standard',
|
||||
name: 'Susan (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{ value: 'Tom - standard', name: 'Tom (standard)', model: 'standard' },
|
||||
{
|
||||
value: 'Zoe-Ml - enhanced',
|
||||
name: 'Zoe-Ml (enhanced)',
|
||||
model: 'enhanced',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'fi-FI',
|
||||
name: 'Finnish (Finland)',
|
||||
voices: [
|
||||
{ value: 'Onni - standard', name: 'Onni (standard)', model: 'standard' },
|
||||
{ value: 'Satu - standard', name: 'Satu (standard)', model: 'standard' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'fr-BE',
|
||||
name: 'French (Belgium)',
|
||||
voices: [
|
||||
{ value: 'Aude - standard', name: 'Aude (standard)', model: 'standard' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'fr-CA',
|
||||
name: 'French (Canada)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Amelie-Ml - enhanced',
|
||||
name: 'Amelie-Ml (enhanced)',
|
||||
model: 'enhanced',
|
||||
},
|
||||
{
|
||||
value: 'Chantal - standard',
|
||||
name: 'Chantal (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Nicolas - standard',
|
||||
name: 'Nicolas (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'fr-FR',
|
||||
name: 'French (France)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Audrey-Ml - enhanced',
|
||||
name: 'Audrey-Ml (enhanced)',
|
||||
model: 'enhanced',
|
||||
},
|
||||
{
|
||||
value: 'Aurelie - standard',
|
||||
name: 'Aurelie (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Thomas - standard',
|
||||
name: 'Thomas (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'gl-ES',
|
||||
name: 'Galician (Spain)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Carmela - standard',
|
||||
name: 'Carmela (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'de-DE',
|
||||
name: 'German (Germany)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Anna-Ml - enhanced',
|
||||
name: 'Anna-Ml (enhanced)',
|
||||
model: 'enhanced',
|
||||
},
|
||||
{
|
||||
value: 'Markus - standard',
|
||||
name: 'Markus (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Petra-Ml - enhanced',
|
||||
name: 'Petra-Ml (enhanced)',
|
||||
model: 'enhanced',
|
||||
},
|
||||
{
|
||||
value: 'Viktor - standard',
|
||||
name: 'Viktor (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Yannick - standard',
|
||||
name: 'Yannick (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'el-GR',
|
||||
name: 'Greek (Greece)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Melina - standard',
|
||||
name: 'Melina (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Nikos - standard',
|
||||
name: 'Nikos (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'he-IL',
|
||||
name: 'Hebrew (Israel)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Carmit - standard',
|
||||
name: 'Carmit (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'hi-IN',
|
||||
name: 'Hindi (India)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Kiyara-Ml - enhanced',
|
||||
name: 'Kiyara-Ml (enhanced)',
|
||||
model: 'enhanced',
|
||||
},
|
||||
{
|
||||
value: 'Lekha - standard',
|
||||
name: 'Lekha (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{ value: 'neel - standard', name: 'Neel (standard)', model: 'standard' },
|
||||
{
|
||||
value: 'Neel-Ml - standard',
|
||||
name: 'Neel-Ml (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'hu-HU',
|
||||
name: 'Hungarian (Hungary)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Mariska - standard',
|
||||
name: 'Mariska (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'id-ID',
|
||||
name: 'Indonesian (Indonesia)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Damayanti - standard',
|
||||
name: 'Damayanti (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'it-IT',
|
||||
name: 'Italian (Italy)',
|
||||
voices: [
|
||||
{ value: 'Emma - enhanced', name: 'Emma (enhanced)', model: 'enhanced' },
|
||||
{
|
||||
value: 'Federica-Ml - standard',
|
||||
name: 'Federica-Ml (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{ value: 'Luca - standard', name: 'Luca (standard)', model: 'standard' },
|
||||
{
|
||||
value: 'Neel-Ml - standard',
|
||||
name: 'Neel-Ml (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Paola - standard',
|
||||
name: 'Paola (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'ja-JP',
|
||||
name: 'Japanese (Japan)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Ayane - standard',
|
||||
name: 'Ayane (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Daisuke - standard',
|
||||
name: 'Daisuke (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Ichiro - standard',
|
||||
name: 'Ichiro (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Koharu - standard',
|
||||
name: 'Koharu (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Kyoko - standard',
|
||||
name: 'Kyoko (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Mizuki - standard',
|
||||
name: 'Mizuki (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Otoya - standard',
|
||||
name: 'Otoya (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Sakura - standard',
|
||||
name: 'Sakura (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Seiji - standard',
|
||||
name: 'Seiji (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'kn-IN',
|
||||
name: 'Kannada (India)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Alpana - standard',
|
||||
name: 'Alpana (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'ko-KR',
|
||||
name: 'Korean (South Korea)',
|
||||
voices: [
|
||||
{ value: 'Jina - enhanced', name: 'Jina (enhanced)', model: 'enhanced' },
|
||||
{ value: 'Sora - standard', name: 'Sora (standard)', model: 'standard' },
|
||||
{ value: 'Yuna - standard', name: 'Yuna (standard)', model: 'standard' },
|
||||
{
|
||||
value: 'Yuna-Ml - enhanced',
|
||||
name: 'Yuna-Ml (enhanced)',
|
||||
model: 'enhanced',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'zlm-MY',
|
||||
name: 'Malay (Malaysia)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Amira - standard',
|
||||
name: 'Amira (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'zh-CN',
|
||||
name: 'Mandarin (China)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Lili-Ml - enhanced',
|
||||
name: 'Lili-Ml (enhanced)',
|
||||
model: 'enhanced',
|
||||
},
|
||||
{
|
||||
value: 'Binbin-Ml - standard',
|
||||
name: 'Binbin-Ml (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Lilian-Ml - standard',
|
||||
name: 'Lilian-Ml (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Lisheng-Ml - standard',
|
||||
name: 'Lisheng-Ml (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Tiantian-Ml - standard',
|
||||
name: 'Tiantian-Ml (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Tingting-Ml - standard',
|
||||
name: 'Tingting-Ml (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'cmn-TW',
|
||||
name: 'Mandarin (Taiwan)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Meijia-Ml - standard',
|
||||
name: 'Meijia-Ml (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'mr-IN',
|
||||
name: 'Marathi (India)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Ananya - standard',
|
||||
name: 'Ananya (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'nb-NO',
|
||||
name: 'Norwegian Bokmål (Norway)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Henrik - standard',
|
||||
name: 'Henrik (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{ value: 'Nora - standard', name: 'Nora (standard)', model: 'standard' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'pl-PL',
|
||||
name: 'Polish (Poland)',
|
||||
voices: [
|
||||
{ value: 'Ewa - enhanced', name: 'Ewa (enhanced)', model: 'enhanced' },
|
||||
{
|
||||
value: 'Krzysztof - standard',
|
||||
name: 'Krzysztof (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Zosia - standard',
|
||||
name: 'Zosia (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'pt-BR',
|
||||
name: 'Portuguese (Brazil)',
|
||||
voices: [
|
||||
{
|
||||
value: 'luciana - enhanced',
|
||||
name: 'Luciana (enhanced)',
|
||||
model: 'enhanced',
|
||||
},
|
||||
{
|
||||
value: 'Fernanda - standard',
|
||||
name: 'Fernanda (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Felipe - standard',
|
||||
name: 'Felipe (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'pt-PT',
|
||||
name: 'Portuguese (Portugal)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Catarina - standard',
|
||||
name: 'Catarina (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Joana - standard',
|
||||
name: 'Joana (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Joaquim - standard',
|
||||
name: 'Joaquim (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'ro-RO',
|
||||
name: 'Romanian (Romania)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Ioana - standard',
|
||||
name: 'Ioana (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'ru-RU',
|
||||
name: 'Russian (Russia)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Katya - standard',
|
||||
name: 'Katya (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Katya-Ml - standard',
|
||||
name: 'Katya-Ml (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Milena - standard',
|
||||
name: 'Milena (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{ value: 'yuri - standard', name: 'Yuri (standard)', model: 'standard' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'sk-SK',
|
||||
name: 'Slovak (Slovakia)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Laura - standard',
|
||||
name: 'Laura (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'es-AR',
|
||||
name: 'Spanish (Argentina)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Diego - standard',
|
||||
name: 'Diego (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Isabela - standard',
|
||||
name: 'Isabela (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'es-CL',
|
||||
name: 'Spanish (Chile)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Francisca - standard',
|
||||
name: 'Francisca (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'es-CO',
|
||||
name: 'Spanish (Colombia)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Carlos - standard',
|
||||
name: 'Carlos (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Soledad - standard',
|
||||
name: 'Soledad (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Ximena - standard',
|
||||
name: 'Ximena (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'es-MX',
|
||||
name: 'Spanish (Mexico)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Angelica - standard',
|
||||
name: 'Angelica (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Javier - standard',
|
||||
name: 'Javier (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{ value: 'Juan - standard', name: 'Juan (standard)', model: 'standard' },
|
||||
{
|
||||
value: 'Paulina-Ml - enhanced',
|
||||
name: 'Paulina-Ml (enhanced)',
|
||||
model: 'enhanced',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'es-ES',
|
||||
name: 'Spanish (Spain)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Jorge - standard',
|
||||
name: 'Jorge (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Marisol-Ml - standard',
|
||||
name: 'Marisol-Ml (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Monica-Ml - standard',
|
||||
name: 'Monica-Ml (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'sv-SE',
|
||||
name: 'Swedish (Sweden)',
|
||||
voices: [
|
||||
{ value: 'Alva - standard', name: 'Alva (standard)', model: 'standard' },
|
||||
{
|
||||
value: 'Klara - standard',
|
||||
name: 'Klara (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Oskar - standard',
|
||||
name: 'Oskar (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'ta-IN',
|
||||
name: 'Tamil (India)',
|
||||
voices: [
|
||||
{ value: 'Vani - standard', name: 'Vani (standard)', model: 'standard' },
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'te-IN',
|
||||
name: 'Telugu (India)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Geeta - standard',
|
||||
name: 'Geeta (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'th-TH',
|
||||
name: 'Thai (Thailand)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Kanya - enhanced',
|
||||
name: 'Kanya (enhanced)',
|
||||
model: 'enhanced',
|
||||
},
|
||||
{
|
||||
value: 'Narisa - standard',
|
||||
name: 'Narisa (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'tr-TR',
|
||||
name: 'Turkish (Turkey)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Cem-Ml - standard',
|
||||
name: 'Cem-Ml (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
{
|
||||
value: 'Yelda - standard',
|
||||
name: 'Yelda (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'uk-UA',
|
||||
name: 'Ukrainian (Ukraine)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Lesya - standard',
|
||||
name: 'Lesya (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'va-ES',
|
||||
name: 'Valencian (Spain)',
|
||||
voices: [
|
||||
{
|
||||
value: 'Empar - standard',
|
||||
name: 'Empar (standard)',
|
||||
model: 'standard',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
value: 'vi-VN',
|
||||
name: 'Vietnamese (Vietnam)',
|
||||
voices: [
|
||||
{ value: 'Linh - standard', name: 'Linh (standard)', model: 'standard' },
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -1,16 +0,0 @@
|
||||
module.exports = [
|
||||
{
|
||||
value: 'en-US',
|
||||
name: 'English',
|
||||
voices: [
|
||||
{
|
||||
value: 'English-US.Female-1',
|
||||
name: 'Female',
|
||||
},
|
||||
{
|
||||
value: 'English-US.Male-1',
|
||||
name: 'Male',
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -1,39 +0,0 @@
|
||||
module.exports = [
|
||||
{
|
||||
value: 'en-US',
|
||||
name: 'English (US)',
|
||||
voices: [
|
||||
{ value: '3', name: 'Alana B.' },
|
||||
{ value: '4', name: 'Ramona J.' },
|
||||
{ value: '5', name: 'Ramona J. (promo)' },
|
||||
{ value: '7', name: 'Wade C.' },
|
||||
{ value: '8', name: 'Sofia H.' },
|
||||
{ value: '9', name: 'David D.' },
|
||||
{ value: '11', name: 'Isabel V.' },
|
||||
{ value: '12', name: 'Ava H.' },
|
||||
{ value: '13', name: 'Jeremy G.' },
|
||||
{ value: '14', name: 'Nicole L.' },
|
||||
{ value: '15', name: 'Paige L.' },
|
||||
{ value: '16', name: 'Tobin A.' },
|
||||
{ value: '17', name: 'Kai M.' },
|
||||
{ value: '18', name: 'Tristan F.' },
|
||||
{ value: '19', name: 'Patrick K.' },
|
||||
{ value: '20', name: 'Soifia H. (promo)' },
|
||||
{ value: '21', name: 'Damian P. (promo)' },
|
||||
{ value: '22', name: 'Jodi P. (promo)' },
|
||||
{ value: '23', name: 'Lee M. (promo)' },
|
||||
{ value: '24', name: 'Selene R. (promo)' },
|
||||
{ value: '26', name: 'Wade C. (promo)' },
|
||||
{ value: '27', name: 'Joe F.' },
|
||||
{ value: '28', name: 'Joe F. (promo)' },
|
||||
{ value: '29', name: 'Garry J. (character)' },
|
||||
{ value: '33', name: 'Jude D.' },
|
||||
{ value: '34', name: 'Eric S. (promo)' },
|
||||
{ value: '35', name: 'Chase J.' },
|
||||
{ value: '37', name: 'Steve B. (promo)' },
|
||||
{ value: '38', name: 'Bella B. (promo)' },
|
||||
{ value: '39', name: 'Tilda C. (promo)' },
|
||||
{ value: '41', name: 'Paul B. (promo)' },
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -1,14 +0,0 @@
|
||||
module.exports = [
|
||||
{
|
||||
value: 'en-US',
|
||||
name: 'English',
|
||||
voices: [
|
||||
{ value: 'alloy', name: 'Alloy' },
|
||||
{ value: 'echo', name: 'Echo' },
|
||||
{ value: 'fable', name: 'Fable' },
|
||||
{ value: 'onyx', name: 'Onyx' },
|
||||
{ value: 'nova', name: 'Nova' },
|
||||
{ value: 'shimmer', name: 'Shimmer' },
|
||||
],
|
||||
},
|
||||
];
|
||||
@@ -5,33 +5,7 @@ const sdk = require('microsoft-cognitiveservices-speech-sdk');
|
||||
const { SpeechClient } = require('@soniox/soniox-node');
|
||||
const bent = require('bent');
|
||||
const fs = require('fs');
|
||||
const { AssemblyAI } = require('assemblyai');
|
||||
const {decrypt, obscureKey} = require('./encrypt-decrypt');
|
||||
|
||||
const TtsGoogleLanguagesVoices = require('./speech-data/tts-google');
|
||||
const TtsAwsLanguagesVoices = require('./speech-data/tts-aws');
|
||||
const TtsMicrosoftLanguagesVoices = require('./speech-data/tts-microsoft');
|
||||
const TtsWellsaidLanguagesVoices = require('./speech-data/tts-wellsaid');
|
||||
const TtsNuanceLanguagesVoices = require('./speech-data/tts-nuance');
|
||||
const TtsIbmLanguagesVoices = require('./speech-data/tts-ibm');
|
||||
const TtsNvidiaLanguagesVoices = require('./speech-data/tts-nvidia');
|
||||
const TtsElevenlabsLanguagesVoices = require('./speech-data/tts-elevenlabs');
|
||||
const TtsWhisperLanguagesVoices = require('./speech-data/tts-whisper');
|
||||
|
||||
const TtsModelDeepgram = require('./speech-data/tts-model-deepgram');
|
||||
const TtsModelElevenLabs = require('./speech-data/tts-model-elevenlabs');
|
||||
const TtsModelWhisper = require('./speech-data/tts-model-whisper');
|
||||
|
||||
const SttGoogleLanguagesVoices = require('./speech-data/stt-google');
|
||||
const SttAwsLanguagesVoices = require('./speech-data/stt-aws');
|
||||
const SttMicrosoftLanguagesVoices = require('./speech-data/stt-microsoft');
|
||||
const SttNuanceLanguagesVoices = require('./speech-data/stt-nuance');
|
||||
const SttDeepgramLanguagesVoices = require('./speech-data/stt-deepgram');
|
||||
const SttIbmLanguagesVoices = require('./speech-data/stt-ibm');
|
||||
const SttNvidiaLanguagesVoices = require('./speech-data/stt-nvidia');
|
||||
const SttCobaltLanguagesVoices = require('./speech-data/stt-cobalt');
|
||||
const SttSonioxLanguagesVoices = require('./speech-data/stt-soniox');
|
||||
const SttAssemblyaiLanguagesVoices = require('./speech-data/stt-assemblyai');
|
||||
|
||||
const testSonioxStt = async(logger, credentials) => {
|
||||
const api_key = credentials;
|
||||
@@ -119,13 +93,6 @@ const testMicrosoftStt = async(logger, credentials) => {
|
||||
const speechConfig = sdk.SpeechConfig.fromSubscription(api_key, region);
|
||||
const audioConfig = sdk.AudioConfig.fromWavFileInput(fs.readFileSync(`${__dirname}/../../data/test_audio.wav`));
|
||||
speechConfig.speechRecognitionLanguage = 'en-US';
|
||||
|
||||
if (process.env.JAMBONES_HTTP_PROXY_IP && process.env.JAMBONES_HTTP_PROXY_PORT) {
|
||||
logger.debug(
|
||||
`testMicrosoftStt: using proxy ${process.env.JAMBONES_HTTP_PROXY_IP}:${process.env.JAMBONES_HTTP_PROXY_PORT}`);
|
||||
speechConfig.setProxy(process.env.JAMBONES_HTTP_PROXY_IP, process.env.JAMBONES_HTTP_PROXY_PORT);
|
||||
}
|
||||
|
||||
const speechRecognizer = new sdk.SpeechRecognizer(speechConfig, audioConfig);
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
@@ -181,19 +148,38 @@ const testAwsStt = async(logger, credentials) => {
|
||||
}
|
||||
};
|
||||
|
||||
const testMicrosoftTts = async(logger, synthAudio, credentials) => {
|
||||
const testMicrosoftTts = async(logger, credentials) => {
|
||||
const {
|
||||
api_key,
|
||||
region,
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
use_custom_tts,
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
custom_tts_endpoint,
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
use_custom_stt,
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
custom_stt_endpoint
|
||||
} = credentials;
|
||||
|
||||
logger.info({
|
||||
api_key,
|
||||
region,
|
||||
use_custom_tts,
|
||||
custom_tts_endpoint,
|
||||
use_custom_stt,
|
||||
custom_stt_endpoint
|
||||
}, 'testing microsoft tts');
|
||||
if (!api_key) throw new Error('testMicrosoftTts: credentials are missing api_key');
|
||||
if (!region) throw new Error('testMicrosoftTts: credentials are missing region');
|
||||
try {
|
||||
await synthAudio({increment: () => {}, histogram: () => {}},
|
||||
{
|
||||
vendor: 'microsoft',
|
||||
credentials,
|
||||
language: 'en-US',
|
||||
voice: 'en-US-JennyMultilingualNeural',
|
||||
text: 'Hi there and welcome to jambones!'
|
||||
}
|
||||
);
|
||||
const getJSON = bent('json', {
|
||||
'Ocp-Apim-Subscription-Key': api_key
|
||||
});
|
||||
const response = await getJSON(`https://${region}.tts.speech.microsoft.com/cognitiveservices/voices/list`);
|
||||
return response;
|
||||
} catch (err) {
|
||||
logger.info({err}, 'testMicrosoftTts returned error');
|
||||
logger.info({err}, `testMicrosoftTts - failed to list voices for region ${region}`);
|
||||
throw err;
|
||||
}
|
||||
};
|
||||
@@ -217,64 +203,6 @@ const testWellSaidTts = async(logger, credentials) => {
|
||||
}
|
||||
};
|
||||
|
||||
const testElevenlabs = async(logger, credentials) => {
|
||||
const {api_key, model_id} = credentials;
|
||||
try {
|
||||
const post = bent('https://api.elevenlabs.io', 'POST', 'buffer', {
|
||||
'xi-api-key': api_key,
|
||||
'Accept': 'audio/mpeg',
|
||||
'Content-Type': 'application/json'
|
||||
});
|
||||
const mp3 = await post('/v1/text-to-speech/21m00Tcm4TlvDq8ikWAM', {
|
||||
text: 'Hello',
|
||||
model_id,
|
||||
voice_settings: {
|
||||
stability: 0.5,
|
||||
similarity_boost: 0.5
|
||||
}
|
||||
});
|
||||
return mp3;
|
||||
} catch (err) {
|
||||
logger.info({err}, 'synthEvenlabs returned error');
|
||||
throw err;
|
||||
}
|
||||
};
|
||||
|
||||
const testWhisper = async(logger, synthAudio, credentials) => {
|
||||
try {
|
||||
await synthAudio({increment: () => {}, histogram: () => {}},
|
||||
{
|
||||
vendor: 'whisper',
|
||||
credentials,
|
||||
language: 'en-US',
|
||||
voice: 'alloy',
|
||||
text: 'Hi there and welcome to jambones!'
|
||||
}
|
||||
);
|
||||
} catch (err) {
|
||||
logger.info({err}, 'synthEvenlabs returned error');
|
||||
throw err;
|
||||
}
|
||||
};
|
||||
|
||||
const testDeepgramTTS = async(logger, synthAudio, credentials) => {
|
||||
try {
|
||||
await synthAudio({increment: () => {}, histogram: () => {}},
|
||||
{
|
||||
vendor: 'deepgram',
|
||||
credentials,
|
||||
language: 'en-US',
|
||||
voice: 'alpha-aurora-en-v2',
|
||||
model: 'alpha-aurora-en-v2',
|
||||
text: 'Hi there and welcome to jambones!'
|
||||
}
|
||||
);
|
||||
} catch (err) {
|
||||
logger.info({err}, 'testDeepgramTTS returned error');
|
||||
throw err;
|
||||
}
|
||||
};
|
||||
|
||||
const testIbmTts = async(logger, getTtsVoices, credentials) => {
|
||||
const {tts_api_key, tts_region} = credentials;
|
||||
const voices = await getTtsVoices({vendor: 'ibm', credentials: {tts_api_key, tts_region}});
|
||||
@@ -309,293 +237,6 @@ const testWellSaidStt = async(logger, credentials) => {
|
||||
return true;
|
||||
};
|
||||
|
||||
const testAssemblyStt = async(logger, credentials) => {
|
||||
const {api_key} = credentials;
|
||||
|
||||
const assemblyai = new AssemblyAI({
|
||||
apiKey: api_key
|
||||
});
|
||||
|
||||
const audioUrl = `${__dirname}/../../data/test_audio.wav`;
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
assemblyai.transcripts
|
||||
.create({ audio_url: audioUrl })
|
||||
.then((transcript) => {
|
||||
logger.debug({transcript}, 'got transcription from AssemblyAi');
|
||||
if (transcript.status === 'error') {
|
||||
return reject({message: transcript.error});
|
||||
}
|
||||
return resolve(transcript.text);
|
||||
})
|
||||
.catch((err) => {
|
||||
logger.info({err}, 'failed to get assemblyAI transcription');
|
||||
reject(err);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
const getSpeechCredential = (credential, logger) => {
|
||||
const {vendor} = credential;
|
||||
logger.info(
|
||||
`Speech vendor: ${credential.vendor} ${credential.label ? `, label: ${credential.label}` : ''} selected`);
|
||||
if ('google' === vendor) {
|
||||
try {
|
||||
const cred = JSON.parse(credential.service_key.replace(/\n/g, '\\n'));
|
||||
return {
|
||||
...credential,
|
||||
credentials: cred
|
||||
};
|
||||
} catch (err) {
|
||||
logger.info({err}, `malformed google service_key provisioned for account ${credential.speech_credential_sid}`);
|
||||
}
|
||||
}
|
||||
else if (['aws', 'polly'].includes(vendor)) {
|
||||
return {
|
||||
...credential,
|
||||
accessKeyId: credential.access_key_id,
|
||||
secretAccessKey: credential.secret_access_key,
|
||||
region: credential.aws_region || 'us-east-1'
|
||||
};
|
||||
}
|
||||
return credential;
|
||||
};
|
||||
|
||||
function decryptCredential(obj, credential, logger, isObscureKey = true) {
|
||||
if ('google' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
const key_header = '-----BEGIN PRIVATE KEY-----\n';
|
||||
const obscured = {
|
||||
...o,
|
||||
private_key: `${key_header}${isObscureKey ?
|
||||
obscureKey(o.private_key.slice(key_header.length, o.private_key.length)) :
|
||||
o.private_key.slice(key_header.length, o.private_key.length)}`
|
||||
};
|
||||
obj.service_key = JSON.stringify(obscured);
|
||||
}
|
||||
else if ('aws' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.access_key_id = o.access_key_id;
|
||||
obj.secret_access_key = isObscureKey ? obscureKey(o.secret_access_key) : o.secret_access_key;
|
||||
obj.aws_region = o.aws_region;
|
||||
logger.info({obj, o}, 'retrieving aws speech credential');
|
||||
}
|
||||
else if ('microsoft' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.api_key = isObscureKey ? obscureKey(o.api_key) : o.api_key;
|
||||
obj.region = o.region;
|
||||
obj.use_custom_tts = o.use_custom_tts;
|
||||
obj.custom_tts_endpoint = o.custom_tts_endpoint;
|
||||
obj.custom_tts_endpoint_url = o.custom_tts_endpoint_url;
|
||||
obj.use_custom_stt = o.use_custom_stt;
|
||||
obj.custom_stt_endpoint = o.custom_stt_endpoint;
|
||||
obj.custom_stt_endpoint_url = o.custom_stt_endpoint_url;
|
||||
logger.info({obj, o}, 'retrieving azure speech credential');
|
||||
}
|
||||
else if ('wellsaid' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.api_key = isObscureKey ? obscureKey(o.api_key) : o.api_key;
|
||||
}
|
||||
else if ('nuance' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.client_id = o.client_id;
|
||||
obj.secret = o.secret ? (isObscureKey ? obscureKey(o.secret) : o.secret) : null;
|
||||
obj.nuance_tts_uri = o.nuance_tts_uri;
|
||||
obj.nuance_stt_uri = o.nuance_stt_uri;
|
||||
}
|
||||
else if ('deepgram' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.api_key = isObscureKey ? obscureKey(o.api_key) : o.api_key;
|
||||
}
|
||||
else if ('ibm' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.tts_api_key = isObscureKey ? obscureKey(o.tts_api_key) : o.tts_api_key;
|
||||
obj.tts_region = o.tts_region;
|
||||
obj.stt_api_key = isObscureKey ? obscureKey(o.stt_api_key) : o.stt_api_key;
|
||||
obj.stt_region = o.stt_region;
|
||||
obj.instance_id = o.instance_id;
|
||||
} else if ('nvidia' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.riva_server_uri = o.riva_server_uri;
|
||||
} else if ('cobalt' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.cobalt_server_uri = o.cobalt_server_uri;
|
||||
} else if ('soniox' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.api_key = isObscureKey ? obscureKey(o.api_key) : o.api_key;
|
||||
} else if ('elevenlabs' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.api_key = isObscureKey ? obscureKey(o.api_key) : o.api_key;
|
||||
obj.model_id = o.model_id;
|
||||
obj.options = o.options;
|
||||
} else if (obj.vendor.startsWith('custom:')) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.auth_token = isObscureKey ? obscureKey(o.auth_token) : o.auth_token;
|
||||
obj.custom_stt_url = o.custom_stt_url;
|
||||
obj.custom_tts_url = o.custom_tts_url;
|
||||
} else if ('assemblyai' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.api_key = isObscureKey ? obscureKey(o.api_key) : o.api_key;
|
||||
} else if ('whisper' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.api_key = isObscureKey ? obscureKey(o.api_key) : o.api_key;
|
||||
obj.model_id = o.model_id;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {*} logger logger
|
||||
* @param {*} vendor vendor
|
||||
* @param {*} credential STT/TTS vendor credential, can be null
|
||||
* @returns List of language and coresponding voices for specific vendor follow below format
|
||||
* {
|
||||
"tts": [
|
||||
{
|
||||
code: "ar-XA",
|
||||
name: "Arabic",
|
||||
voices: [
|
||||
{ value: "ar-XA-Standard-A", name: "Standard-A (Female)" },
|
||||
]
|
||||
}
|
||||
],
|
||||
"stt": [
|
||||
{ name: "Afrikaans (South Africa)", code: "af-ZA" },
|
||||
]
|
||||
}
|
||||
*/
|
||||
async function getLanguagesAndVoicesForVendor(logger, vendor, credential) {
|
||||
switch (vendor) {
|
||||
case 'google':
|
||||
return await getLanguagesVoicesForGoogle(credential);
|
||||
case 'aws':
|
||||
return await getLanguagesVoicesForAws(credential);
|
||||
case 'microsoft':
|
||||
return await getLanguagesVoicesForMicrosoft(credential);
|
||||
case 'wellsaid':
|
||||
return await getLanguagesVoicesForWellsaid(credential);
|
||||
case 'nuance':
|
||||
return await getLanguagesVoicesForNuane(credential);
|
||||
case 'deepgram':
|
||||
return await getLanguagesVoicesForDeepgram(credential);
|
||||
case 'ibm':
|
||||
return await getLanguagesVoicesForIbm(credential);
|
||||
case 'nvidia':
|
||||
return await getLanguagesVoicesForNvida(credential);
|
||||
case 'cobalt':
|
||||
return await getLanguagesVoicesForCobalt(credential);
|
||||
case 'soniox':
|
||||
return await getLanguagesVoicesForSoniox(credential);
|
||||
case 'elevenlabs':
|
||||
return await getLanguagesVoicesForElevenlabs(credential);
|
||||
case 'assemblyai':
|
||||
return await getLanguagesVoicesForAssemblyAI(credential);
|
||||
case 'whisper':
|
||||
return await getLanguagesVoicesForWhisper(credential);
|
||||
default:
|
||||
logger.info(`invalid vendor ${vendor}, return empty result`);
|
||||
throw new Error(`Invalid vendor ${vendor}`);
|
||||
}
|
||||
}
|
||||
|
||||
async function getLanguagesVoicesForGoogle(credential) {
|
||||
return tranform(TtsGoogleLanguagesVoices, SttGoogleLanguagesVoices);
|
||||
}
|
||||
|
||||
async function getLanguagesVoicesForAws(credential) {
|
||||
return tranform(TtsAwsLanguagesVoices, SttAwsLanguagesVoices);
|
||||
}
|
||||
|
||||
async function getLanguagesVoicesForMicrosoft(credential) {
|
||||
return tranform(TtsMicrosoftLanguagesVoices, SttMicrosoftLanguagesVoices);
|
||||
}
|
||||
|
||||
async function getLanguagesVoicesForWellsaid(credential) {
|
||||
return tranform(TtsWellsaidLanguagesVoices);
|
||||
}
|
||||
|
||||
async function getLanguagesVoicesForNuane(credential) {
|
||||
return tranform(TtsNuanceLanguagesVoices, SttNuanceLanguagesVoices);
|
||||
}
|
||||
|
||||
async function getLanguagesVoicesForDeepgram(credential) {
|
||||
return tranform(undefined, SttDeepgramLanguagesVoices, TtsModelDeepgram);
|
||||
}
|
||||
|
||||
async function getLanguagesVoicesForIbm(credential) {
|
||||
return tranform(TtsIbmLanguagesVoices, SttIbmLanguagesVoices);
|
||||
}
|
||||
|
||||
async function getLanguagesVoicesForNvida(credential) {
|
||||
return tranform(TtsNvidiaLanguagesVoices, SttNvidiaLanguagesVoices);
|
||||
}
|
||||
|
||||
async function getLanguagesVoicesForCobalt(credential) {
|
||||
return tranform(undefined, SttCobaltLanguagesVoices);
|
||||
}
|
||||
|
||||
async function getLanguagesVoicesForSoniox(credential) {
|
||||
return tranform(undefined, SttSonioxLanguagesVoices);
|
||||
}
|
||||
|
||||
async function getLanguagesVoicesForElevenlabs(credential) {
|
||||
if (credential) {
|
||||
const get = bent('https://api.elevenlabs.io', 'GET', 'json', {
|
||||
'xi-api-key' : credential.api_key
|
||||
});
|
||||
|
||||
const [langResp, voiceResp] = await Promise.all([get('/v1/models'), get('/v1/voices')]);
|
||||
|
||||
const model = langResp.find((m) => m.model_id === credential.model_id);
|
||||
const languages = model ? model.languages.map((l) => {
|
||||
return {
|
||||
value: l.language_id,
|
||||
name: l.name
|
||||
};
|
||||
}).sort((a, b) => a.name.localeCompare(b.name)) : [];
|
||||
|
||||
if (languages && languages.length > 0) {
|
||||
const voices = voiceResp ? voiceResp.voices.map((v) => {
|
||||
let name = `${v.name}${v.category !== 'premade' ? ` (${v.category})` : ''} -
|
||||
${v.labels.accent ? ` ${v.labels.accent},` : ''}
|
||||
${v.labels.description ? ` ${v.labels.description},` : ''}
|
||||
${v.labels.age ? ` ${v.labels.age},` : ''}
|
||||
${v.labels.gender ? ` ${v.labels.gender},` : ''}
|
||||
${v.labels['use case'] ? ` ${v.labels['use case']},` : ''}
|
||||
`;
|
||||
const lastIndex = name.lastIndexOf(',');
|
||||
if (lastIndex !== -1) {
|
||||
name = name.substring(0, lastIndex);
|
||||
}
|
||||
return {
|
||||
value: v.voice_id,
|
||||
name
|
||||
};
|
||||
}).sort((a, b) => a.name.localeCompare(b.name)) : [];
|
||||
languages[0].voices = voices;
|
||||
}
|
||||
return tranform(languages, undefined, TtsModelElevenLabs);
|
||||
} else {
|
||||
return tranform(TtsElevenlabsLanguagesVoices, undefined, TtsModelElevenLabs);
|
||||
}
|
||||
}
|
||||
|
||||
async function getLanguagesVoicesForAssemblyAI(credential) {
|
||||
return tranform(undefined, SttAssemblyaiLanguagesVoices);
|
||||
}
|
||||
|
||||
async function getLanguagesVoicesForWhisper(credential) {
|
||||
return tranform(TtsWhisperLanguagesVoices, undefined, TtsModelWhisper);
|
||||
}
|
||||
|
||||
function tranform(tts, stt, models) {
|
||||
return {
|
||||
...(tts && {tts}),
|
||||
...(stt && {stt}),
|
||||
...(models && {models})
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
testGoogleTts,
|
||||
testGoogleStt,
|
||||
@@ -610,12 +251,5 @@ module.exports = {
|
||||
testDeepgramStt,
|
||||
testIbmTts,
|
||||
testIbmStt,
|
||||
testSonioxStt,
|
||||
testElevenlabs,
|
||||
testAssemblyStt,
|
||||
testDeepgramTTS,
|
||||
getSpeechCredential,
|
||||
decryptCredential,
|
||||
testWhisper,
|
||||
getLanguagesAndVoicesForVendor
|
||||
testSonioxStt
|
||||
};
|
||||
|
||||
3307
package-lock.json
generated
3307
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
26
package.json
26
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "jambonz-api-server",
|
||||
"version": "0.8.5",
|
||||
"version": "0.8.4",
|
||||
"description": "",
|
||||
"main": "app.js",
|
||||
"scripts": {
|
||||
@@ -19,22 +19,18 @@
|
||||
"url": "https://github.com/jambonz/jambonz-api-server.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "^3.363.0",
|
||||
"@aws-sdk/client-transcribe": "^3.363.0",
|
||||
"@azure/storage-blob": "^12.15.0",
|
||||
"@aws-sdk/client-s3": "^3.363.0",
|
||||
"@deepgram/sdk": "^1.21.0",
|
||||
"@google-cloud/speech": "^5.2.0",
|
||||
"@google-cloud/storage": "^6.12.0",
|
||||
"@jambonz/db-helpers": "^0.9.1",
|
||||
"@jambonz/lamejs": "^1.2.2",
|
||||
"@jambonz/mw-registrar": "^0.2.7",
|
||||
"@jambonz/realtimedb-helpers": "^0.8.7",
|
||||
"@jambonz/speech-utils": "^0.0.33",
|
||||
"@jambonz/db-helpers": "^0.9.0",
|
||||
"@jambonz/realtimedb-helpers": "^0.8.6",
|
||||
"@jambonz/speech-utils": "^0.0.15",
|
||||
"@jambonz/time-series": "^0.2.8",
|
||||
"@jambonz/verb-specifications": "^0.0.45",
|
||||
"@jambonz/verb-specifications": "^0.0.29",
|
||||
"@jambonz/lamejs": "^1.2.2",
|
||||
"@soniox/soniox-node": "^1.1.1",
|
||||
"argon2": "^0.30.3",
|
||||
"assemblyai": "^3.0.1",
|
||||
"bent": "^7.3.12",
|
||||
"cors": "^2.8.5",
|
||||
"debug": "^4.3.4",
|
||||
@@ -45,7 +41,7 @@
|
||||
"ibm-watson": "^7.1.2",
|
||||
"jsonwebtoken": "^9.0.0",
|
||||
"mailgun.js": "^9.1.2",
|
||||
"microsoft-cognitiveservices-speech-sdk": "1.31.0",
|
||||
"microsoft-cognitiveservices-speech-sdk": "^1.24.1",
|
||||
"mysql2": "^2.3.3",
|
||||
"nocache": "3.0.4",
|
||||
"passport": "^0.6.0",
|
||||
@@ -55,9 +51,11 @@
|
||||
"stripe": "^8.222.0",
|
||||
"swagger-ui-express": "^4.4.0",
|
||||
"uuid": "^8.3.2",
|
||||
"wav": "^1.0.2",
|
||||
"yamljs": "^0.3.0",
|
||||
"ws": "^8.12.1",
|
||||
"yamljs": "^0.3.0"
|
||||
"wav": "^1.0.2",
|
||||
"@google-cloud/storage": "^6.12.0",
|
||||
"@azure/storage-blob": "^12.15.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.39.0",
|
||||
|
||||
@@ -12,7 +12,6 @@ process.on('unhandledRejection', (reason, p) => {
|
||||
|
||||
test('client test', async(t) => {
|
||||
const app = require('../app');
|
||||
const {registrar} = app.locals;
|
||||
|
||||
try {
|
||||
let result;
|
||||
@@ -36,7 +35,6 @@ test('client test', async(t) => {
|
||||
body: {
|
||||
name: 'sample_account',
|
||||
service_provider_sid: sp_sid,
|
||||
sip_realm: 'drachtio.org',
|
||||
registration_hook: {
|
||||
url: 'http://example.com/reg',
|
||||
method: 'get'
|
||||
@@ -56,53 +54,12 @@ test('client test', async(t) => {
|
||||
account_sid,
|
||||
username: 'client1',
|
||||
password: 'sdf12412',
|
||||
is_active: 1,
|
||||
allow_direct_app_calling: 0,
|
||||
allow_direct_queue_calling: 1,
|
||||
allow_direct_user_calling: 1,
|
||||
is_active: 1
|
||||
}
|
||||
});
|
||||
t.ok(result.statusCode === 201, 'successfully created Client');
|
||||
const sid = result.body.sid;
|
||||
|
||||
/* register the client */
|
||||
const r = await registrar.add(
|
||||
"dhorton@drachtio.org",
|
||||
{
|
||||
contact: "10.10.1.1",
|
||||
sbcAddress: "192.168.1.1",
|
||||
protocol: "udp",
|
||||
},
|
||||
5
|
||||
);
|
||||
t.ok(r, 'successfully registered Client');
|
||||
|
||||
/* query all registered clients */
|
||||
result = await request.get(`/Accounts/${account_sid}/RegisteredSipUsers`, {
|
||||
auth: authAdmin,
|
||||
json: true,
|
||||
});
|
||||
t.ok(result.length === 1 && result[0] === 'dhorton@drachtio.org',
|
||||
'successfully queried all registered clients');
|
||||
|
||||
result = await request.post(`/Accounts/${account_sid}/RegisteredSipUsers`, {
|
||||
resolveWithFullResponse: true,
|
||||
auth: authAdmin,
|
||||
json: true,
|
||||
body: ['dhorton']
|
||||
});
|
||||
t.ok(result.body.length === 1 && result.body[0].name === 'dhorton',
|
||||
'successfully queried all registered clients');
|
||||
|
||||
result = await request.post(`/Accounts/${account_sid}/RegisteredSipUsers`, {
|
||||
resolveWithFullResponse: true,
|
||||
auth: authAdmin,
|
||||
json: true,
|
||||
body: []
|
||||
});
|
||||
t.ok(result.body.length === 1 && result.body[0].name === 'dhorton',
|
||||
'successfully queried all registered clients');
|
||||
|
||||
/* query all entity */
|
||||
result = await request.get('/Clients', {
|
||||
auth: authAdmin,
|
||||
@@ -120,7 +77,6 @@ test('client test', async(t) => {
|
||||
t.ok(result.username === 'client1', 'successfully retrieved Client by sid');
|
||||
t.ok(result.is_active === 1 , 'successfully retrieved Client by sid');
|
||||
t.ok(result.password === 'sXXXXXXX' , 'successfully retrieved Client by sid');
|
||||
t.ok(result.allow_direct_app_calling === 0 , 'successfully retrieved Client by sid');
|
||||
|
||||
/* update the entity */
|
||||
result = await request.put(`/Clients/${sid}`, {
|
||||
|
||||
@@ -447,243 +447,6 @@ test('speech credentials tests', async(t) => {
|
||||
});
|
||||
t.ok(result.statusCode === 204, 'successfully deleted speech credential');
|
||||
|
||||
/* add a credential for cobalt */
|
||||
result = await request.post(`/Accounts/${account_sid}/SpeechCredentials`, {
|
||||
resolveWithFullResponse: true,
|
||||
auth: authUser,
|
||||
json: true,
|
||||
body: {
|
||||
vendor: 'cobalt',
|
||||
use_for_stt: true,
|
||||
use_for_tts: false,
|
||||
cobalt_server_uri: '32.32.32.32:2727',
|
||||
}
|
||||
});
|
||||
t.ok(result.statusCode === 201, 'successfully added speech credential for Cobalt');
|
||||
const cobalt_sid = result.body.sid;
|
||||
|
||||
/* delete the credential */
|
||||
result = await request.delete(`/Accounts/${account_sid}/SpeechCredentials/${cobalt_sid}`, {
|
||||
auth: authUser,
|
||||
resolveWithFullResponse: true,
|
||||
});
|
||||
t.ok(result.statusCode === 204, 'successfully deleted speech credential for Cobalt');
|
||||
|
||||
/* add a credential for elevenlabs */
|
||||
result = await request.post(`/Accounts/${account_sid}/SpeechCredentials`, {
|
||||
resolveWithFullResponse: true,
|
||||
auth: authUser,
|
||||
json: true,
|
||||
body: {
|
||||
vendor: 'elevenlabs',
|
||||
use_for_stt: true,
|
||||
use_for_tts: false,
|
||||
api_key: 'asdasdasdasddsadasda',
|
||||
model_id: 'eleven_multilingual_v2'
|
||||
}
|
||||
});
|
||||
t.ok(result.statusCode === 201, 'successfully added speech credential for Cobalt');
|
||||
const elevenlabs_sid = result.body.sid;
|
||||
|
||||
/* delete the credential */
|
||||
result = await request.delete(`/Accounts/${account_sid}/SpeechCredentials/${elevenlabs_sid}`, {
|
||||
auth: authUser,
|
||||
resolveWithFullResponse: true,
|
||||
});
|
||||
t.ok(result.statusCode === 204, 'successfully deleted speech credential for Cobalt');
|
||||
|
||||
|
||||
/* add a credential for custom voices google */
|
||||
result = await request.post(`/Accounts/${account_sid}/SpeechCredentials`, {
|
||||
resolveWithFullResponse: true,
|
||||
auth: authUser,
|
||||
json: true,
|
||||
body: {
|
||||
vendor: 'google',
|
||||
use_for_stt: true,
|
||||
use_for_tts: false,
|
||||
service_key: jsonKey
|
||||
}
|
||||
});
|
||||
t.ok(result.statusCode === 201, 'successfully added speech credential for custom voice google');
|
||||
const customvoice_google_speech_credential_sid = result.body.sid;
|
||||
|
||||
result = await request.post(`/GoogleCustomVoices`, {
|
||||
resolveWithFullResponse: true,
|
||||
auth: authUser,
|
||||
json: true,
|
||||
body: {
|
||||
speech_credential_sid: customvoice_google_speech_credential_sid,
|
||||
name: "Sally",
|
||||
reported_usage: 'REALTIME',
|
||||
model: "path/to/modelId"
|
||||
}
|
||||
});
|
||||
t.ok(result.statusCode === 201, 'successfully added custom voice google');
|
||||
const customvoice_google_sid = result.body.sid;
|
||||
|
||||
/* delete the credential */
|
||||
result = await request.delete(`/GoogleCustomVoices/${customvoice_google_sid}`, {
|
||||
auth: authUser,
|
||||
resolveWithFullResponse: true,
|
||||
});
|
||||
t.ok(result.statusCode === 204, 'successfully deleted custom voice google');
|
||||
|
||||
|
||||
/* delete the credential */
|
||||
result = await request.delete(`/Accounts/${account_sid}/SpeechCredentials/${customvoice_google_speech_credential_sid}`, {
|
||||
auth: authUser,
|
||||
resolveWithFullResponse: true,
|
||||
});
|
||||
t.ok(result.statusCode === 204, 'successfully deleted speech credential for custom voice google');
|
||||
|
||||
/* add a credential for assemblyAI */
|
||||
result = await request.post(`/Accounts/${account_sid}/SpeechCredentials`, {
|
||||
resolveWithFullResponse: true,
|
||||
auth: authUser,
|
||||
json: true,
|
||||
body: {
|
||||
vendor: 'assemblyai',
|
||||
use_for_stt: true,
|
||||
api_key: "APIKEY"
|
||||
}
|
||||
});
|
||||
t.ok(result.statusCode === 201, 'successfully added speech credential for assemblyai');
|
||||
const assemblyAiSid = result.body.sid;
|
||||
|
||||
/* delete the credential */
|
||||
result = await request.delete(`/Accounts/${account_sid}/SpeechCredentials/${assemblyAiSid}`, {
|
||||
auth: authUser,
|
||||
resolveWithFullResponse: true,
|
||||
});
|
||||
t.ok(result.statusCode === 204, 'successfully deleted speech credential');
|
||||
|
||||
/* Check google supportedLanguagesAndVoices */
|
||||
result = await request.get(`/Accounts/${account_sid}/SpeechCredentials/speech/supportedLanguagesAndVoices?vendor=google`, {
|
||||
resolveWithFullResponse: true,
|
||||
simple: false,
|
||||
auth: authAdmin,
|
||||
json: true,
|
||||
});
|
||||
t.ok(result.body.tts.length !== 0, 'successfully get google supported languages and voices');
|
||||
t.ok(result.body.stt.length !== 0, 'successfully get google supported languages and voices');
|
||||
|
||||
/* Check aws supportedLanguagesAndVoices */
|
||||
result = await request.get(`/Accounts/${account_sid}/SpeechCredentials/speech/supportedLanguagesAndVoices?vendor=aws`, {
|
||||
resolveWithFullResponse: true,
|
||||
simple: false,
|
||||
auth: authAdmin,
|
||||
json: true,
|
||||
});
|
||||
t.ok(result.body.tts.length !== 0, 'successfully get aws supported languages and voices');
|
||||
t.ok(result.body.stt.length !== 0, 'successfully get aws supported languages and voices');
|
||||
|
||||
/* Check microsoft supportedLanguagesAndVoices */
|
||||
result = await request.get(`/Accounts/${account_sid}/SpeechCredentials/speech/supportedLanguagesAndVoices?vendor=microsoft`, {
|
||||
resolveWithFullResponse: true,
|
||||
simple: false,
|
||||
auth: authAdmin,
|
||||
json: true,
|
||||
});
|
||||
t.ok(result.body.tts.length !== 0, 'successfully get microsoft supported languages and voices');
|
||||
t.ok(result.body.stt.length !== 0, 'successfully get microsoft supported languages and voices');
|
||||
|
||||
/* Check wellsaid supportedLanguagesAndVoices */
|
||||
result = await request.get(`/Accounts/${account_sid}/SpeechCredentials/speech/supportedLanguagesAndVoices?vendor=wellsaid`, {
|
||||
resolveWithFullResponse: true,
|
||||
simple: false,
|
||||
auth: authAdmin,
|
||||
json: true,
|
||||
});
|
||||
t.ok(result.body.tts.length !== 0, 'successfully get wellsaid supported languages and voices');
|
||||
|
||||
/* Check nuance supportedLanguagesAndVoices */
|
||||
result = await request.get(`/Accounts/${account_sid}/SpeechCredentials/speech/supportedLanguagesAndVoices?vendor=nuance`, {
|
||||
resolveWithFullResponse: true,
|
||||
simple: false,
|
||||
auth: authAdmin,
|
||||
json: true,
|
||||
});
|
||||
t.ok(result.body.tts.length !== 0, 'successfully get nuance supported languages and voices');
|
||||
t.ok(result.body.stt.length !== 0, 'successfully get nuance supported languages and voices');
|
||||
|
||||
/* Check deepgram supportedLanguagesAndVoices */
|
||||
result = await request.get(`/Accounts/${account_sid}/SpeechCredentials/speech/supportedLanguagesAndVoices?vendor=deepgram`, {
|
||||
resolveWithFullResponse: true,
|
||||
simple: false,
|
||||
auth: authAdmin,
|
||||
json: true,
|
||||
});
|
||||
t.ok(result.body.stt.length !== 0, 'successfully get deepgram supported languages and voices');
|
||||
t.ok(result.body.models.length !== 0, 'successfully get deepgram supported languages and voices');
|
||||
|
||||
/* Check ibm supportedLanguagesAndVoices */
|
||||
result = await request.get(`/Accounts/${account_sid}/SpeechCredentials/speech/supportedLanguagesAndVoices?vendor=ibm`, {
|
||||
resolveWithFullResponse: true,
|
||||
simple: false,
|
||||
auth: authAdmin,
|
||||
json: true,
|
||||
});
|
||||
t.ok(result.body.tts.length !== 0, 'successfully get ibm supported languages and voices');
|
||||
t.ok(result.body.stt.length !== 0, 'successfully get ibm supported languages and voices');
|
||||
|
||||
/* Check ibm supportedLanguagesAndVoices */
|
||||
result = await request.get(`/Accounts/${account_sid}/SpeechCredentials/speech/supportedLanguagesAndVoices?vendor=nvidia`, {
|
||||
resolveWithFullResponse: true,
|
||||
simple: false,
|
||||
auth: authAdmin,
|
||||
json: true,
|
||||
});
|
||||
t.ok(result.body.tts.length !== 0, 'successfully get nvidia supported languages and voices');
|
||||
t.ok(result.body.stt.length !== 0, 'successfully get nvidia supported languages and voices');
|
||||
|
||||
/* Check cobalt supportedLanguagesAndVoices */
|
||||
result = await request.get(`/Accounts/${account_sid}/SpeechCredentials/speech/supportedLanguagesAndVoices?vendor=cobalt`, {
|
||||
resolveWithFullResponse: true,
|
||||
simple: false,
|
||||
auth: authAdmin,
|
||||
json: true,
|
||||
});
|
||||
t.ok(result.body.stt.length !== 0, 'successfully get cobalt supported languages and voices');
|
||||
|
||||
/* Check soniox supportedLanguagesAndVoices */
|
||||
result = await request.get(`/Accounts/${account_sid}/SpeechCredentials/speech/supportedLanguagesAndVoices?vendor=soniox`, {
|
||||
resolveWithFullResponse: true,
|
||||
simple: false,
|
||||
auth: authAdmin,
|
||||
json: true,
|
||||
});
|
||||
t.ok(result.body.stt.length !== 0, 'successfully get soniox supported languages and voices');
|
||||
|
||||
/* Check elevenlabs supportedLanguagesAndVoices */
|
||||
result = await request.get(`/Accounts/${account_sid}/SpeechCredentials/speech/supportedLanguagesAndVoices?vendor=elevenlabs`, {
|
||||
resolveWithFullResponse: true,
|
||||
simple: false,
|
||||
auth: authAdmin,
|
||||
json: true,
|
||||
});
|
||||
t.ok(result.body.tts.length !== 0, 'successfully get elevenlabs supported languages and voices');
|
||||
t.ok(result.body.models.length !== 0, 'successfully get elevenlabs supported languages and voices');
|
||||
|
||||
/* Check assemblyai supportedLanguagesAndVoices */
|
||||
result = await request.get(`/Accounts/${account_sid}/SpeechCredentials/speech/supportedLanguagesAndVoices?vendor=assemblyai`, {
|
||||
resolveWithFullResponse: true,
|
||||
simple: false,
|
||||
auth: authAdmin,
|
||||
json: true,
|
||||
});
|
||||
t.ok(result.body.stt.length !== 0, 'successfully get assemblyai supported languages and voices');
|
||||
|
||||
/* Check whisper supportedLanguagesAndVoices */
|
||||
result = await request.get(`/Accounts/${account_sid}/SpeechCredentials/speech/supportedLanguagesAndVoices?vendor=whisper`, {
|
||||
resolveWithFullResponse: true,
|
||||
simple: false,
|
||||
auth: authAdmin,
|
||||
json: true,
|
||||
});
|
||||
t.ok(result.body.tts.length !== 0, 'successfully get whisper supported languages and voices');
|
||||
t.ok(result.body.models.length !== 0, 'successfully get whisper supported languages and voices');
|
||||
|
||||
await deleteObjectBySid(request, '/Accounts', account_sid);
|
||||
await deleteObjectBySid(request, '/ServiceProviders', service_provider_sid);
|
||||
t.end();
|
||||
|
||||
Reference in New Issue
Block a user