Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Vonage/vonage-node-sdk
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: @vonage/server-sdk@3.14.0
Choose a base ref
...
head repository: Vonage/vonage-node-sdk
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: @vonage/server-sdk@3.14.1
Choose a head ref
  • 3 commits
  • 8 files changed
  • 4 contributors

Commits on May 21, 2024

  1. feat: add tss languages generate file from voice.json (#926)

    Co-authored-by: Martin Buriánek <martin.burianek@jablotron.cz>
    ThingUroboros and Martin Buriánek authored May 21, 2024
    Copy the full SHA
    a34e4dc View commit details
  2. refactor: allowing strings for voice tts languages (#929)

    manchuck authored May 21, 2024
    Copy the full SHA
    a3d4ef8 View commit details
  3. Publish

     - @vonage/conversations@1.2.1
     - @Vonage/server-sdk@3.14.1
     - @vonage/voice@1.12.1
    manchuck committed May 21, 2024
    Copy the full SHA
    f20e7f7 View commit details
4 changes: 2 additions & 2 deletions packages/conversations/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@vonage/conversations",
"version": "1.2.0",
"version": "1.2.1",
"description": "The Vonage Conversation API enables you to build conversation features where communication can take place across multiple mediums including IP Messaging, PSTN Voice, SMS and WebRTC Audio and Video. The context of the conversations is maintained though each communication event taking place within a conversation, no matter the medium.",
"homepage": "https://github.com/vonage/vonage-node-sdk/tree/main/packages/conversations#readme",
"bugs": {
@@ -37,7 +37,7 @@
"@vonage/messages": "^1.13.0",
"@vonage/server-client": "^1.12.0",
"@vonage/users": "^1.6.0",
"@vonage/voice": "^1.12.0"
"@vonage/voice": "^1.12.1"
},
"devDependencies": {
"@vonage/auth": "^1.10.0",
6 changes: 3 additions & 3 deletions packages/server-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@vonage/server-sdk",
"version": "3.14.0",
"version": "3.14.1",
"description": "Node.js Client for the Vonage API Platform",
"homepage": "https://developer.vonage.com",
"bugs": {
@@ -41,7 +41,7 @@
"@vonage/accounts": "^1.12.0",
"@vonage/applications": "^1.12.0",
"@vonage/auth": "^1.10.0",
"@vonage/conversations": "^1.2.0",
"@vonage/conversations": "^1.2.1",
"@vonage/messages": "^1.13.0",
"@vonage/number-insights": "^1.12.0",
"@vonage/numbers": "^1.12.0",
@@ -53,7 +53,7 @@
"@vonage/verify": "^1.12.0",
"@vonage/verify2": "^1.11.0",
"@vonage/video": "^1.16.0",
"@vonage/voice": "^1.12.0"
"@vonage/voice": "^1.12.1"
},
"publishConfig": {
"directory": "dist"
2 changes: 1 addition & 1 deletion packages/voice/__tests__/__dataSets__/update.ts
Original file line number Diff line number Diff line change
@@ -214,7 +214,7 @@ export default [
{
action: NCCOActions.TALK,
text: "I'll always dial the K for you",
language: TTSLanguages.EN_US,
language: 'en-US',
style: '0',
premium: true,
loop: 1,
6 changes: 3 additions & 3 deletions packages/voice/lib/classes/NCCO/Talk.ts
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@ export class Talk implements TalkAction, Serializable {
/**
* The language for the text-to-speech synthesis (optional).
*/
language?: TTSLanguages;
language?: TTSLanguages | string;

/**
* The speech style (optional).
@@ -55,7 +55,7 @@ export class Talk implements TalkAction, Serializable {
* @param {boolean} [bargeIn] - Indicates whether the talk action allows barge-in (optional).
* @param {number} [loop] - The number of times to loop the speech (optional).
* @param {string} [level] - The audio level at which to play the speech (optional).
* @param {TTSLanguages} [language] - The language for the text-to-speech synthesis (optional).
* @param {TTSLanguages | string} [language] - The language for the text-to-speech synthesis (optional).
* @param {string} [style] - The speech style (optional).
* @param {boolean} [premium] - Indicates whether to use premium text-to-speech (optional).
*/
@@ -64,7 +64,7 @@ export class Talk implements TalkAction, Serializable {
bargeIn?: boolean,
loop?: number,
level?: string,
language?: TTSLanguages,
language?: TTSLanguages | string,
style?: string,
premium?: boolean,
) {
133 changes: 114 additions & 19 deletions packages/voice/lib/enums/TTSLanguages.ts
Original file line number Diff line number Diff line change
@@ -2,23 +2,38 @@
* Enum representing the supported Text-to-Speech (TTS) languages for Nexmo's voice calls.
*/
export enum TTSLanguages {
/**
* Afrikaans (af-ZA) - Supported Text-to-Speech (TTS) language.
*/
AF_ZA = 'af-ZA',

/**
* Arabic (ar) - Supported Text-to-Speech (TTS) language.
*/
AR = 'ar',

/**
* Catalan (ca-ES) - Supported Text-to-Speech (TTS) language.
* Bulgarian (bg-BG) - Supported Text-to-Speech (TTS) language.
*/
BG_BG = 'bg-BG',

/**
* Bengali (bn-IN) - Supported Text-to-Speech (TTS) language.
*/
BN_IN = 'bn-IN',

/**
* Catalan, Valencian (ca-ES) - Supported Text-to-Speech (TTS) language.
*/
CA_ES = 'ca-ES',

/**
* Mandarin Chinese (cmn-CN) - Supported Text-to-Speech (TTS) language.
* China Chinese, Mandarin (cmn-CN) - Supported Text-to-Speech (TTS) language.
*/
CMN_CN = 'cmn-CN',

/**
* Mandarin Chinese (cmn-TW) - Supported Text-to-Speech (TTS) language.
* Taiwan Chinese, Mandarin (cmn-TW) - Supported Text-to-Speech (TTS) language.
*/
CMN_TW = 'cmn-TW',

@@ -37,6 +52,11 @@ export enum TTSLanguages {
*/
DA_DK = 'da-DK',

/**
* Austria German (de-AT) - Supported Text-to-Speech (TTS) language.
*/
DE_AT = 'de-AT',

/**
* German (de-DE) - Supported Text-to-Speech (TTS) language.
*/
@@ -48,47 +68,67 @@ export enum TTSLanguages {
EL_GR = 'el-GR',

/**
* Australian English (en-AU) - Supported Text-to-Speech (TTS) language.
* Australia English (en-AU) - Supported Text-to-Speech (TTS) language.
*/
EN_AU = 'en-AU',

/**
* British English (en-GB) - Supported Text-to-Speech (TTS) language.
* United Kingdom English (en-GB) - Supported Text-to-Speech (TTS) language.
*/
EN_GB = 'en-GB',

/**
* British English (en-GB-WLS) - Supported Text-to-Speech (TTS) language.
* Scotland English (en-GB-SCT) - Supported Text-to-Speech (TTS) language.
*/
EN_GB_SCT = 'en-GB-SCT',

/**
* Wales English (en-GB-WLS) - Supported Text-to-Speech (TTS) language.
*/
EN_GB_WLS = 'en-GB-WLS',

/**
* Indian English (en-IN) - Supported Text-to-Speech (TTS) language.
* Ireland English (en-IE) - Supported Text-to-Speech (TTS) language.
*/
EN_IE = 'en-IE',

/**
* India English (en-IN) - Supported Text-to-Speech (TTS) language.
*/
EN_IN = 'en-IN',

/**
* US English (en-US) - Supported Text-to-Speech (TTS) language.
* New Zealand English (en-NZ) - Supported Text-to-Speech (TTS) language.
*/
EN_NZ = 'en-NZ',

/**
* United States English (en-US) - Supported Text-to-Speech (TTS) language.
*/
EN_US = 'en-US',

/**
* South African English (en-ZA) - Supported Text-to-Speech (TTS) language.
* South Africa English (en-ZA) - Supported Text-to-Speech (TTS) language.
*/
EN_ZA = 'en-ZA',

/**
* Spanish (es-ES) - Supported Text-to-Speech (TTS) language.
* Colombia Spanish (es-CO) - Supported Text-to-Speech (TTS) language.
*/
ES_CO = 'es-CO',

/**
* Spain Spanish (es-ES) - Supported Text-to-Speech (TTS) language.
*/
ES_ES = 'es-ES',

/**
* Mexican Spanish (es-MX) - Supported Text-to-Speech (TTS) language.
* Mexico Spanish (es-MX) - Supported Text-to-Speech (TTS) language.
*/
ES_MX = 'es-MX',

/**
* US Spanish (es-US) - Supported Text-to-Speech (TTS) language.
* United States Spanish (es-US) - Supported Text-to-Speech (TTS) language.
*/
ES_US = 'es-US',

@@ -108,15 +148,25 @@ export enum TTSLanguages {
FIL_PH = 'fil-PH',

/**
* Canadian French (fr-CA) - Supported Text-to-Speech (TTS) language.
* Canada French (fr-CA) - Supported Text-to-Speech (TTS) language.
*/
FR_CA = 'fr-CA',

/**
* French (fr-FR) - Supported Text-to-Speech (TTS) language.
* France French (fr-FR) - Supported Text-to-Speech (TTS) language.
*/
FR_FR = 'fr-FR',

/**
* Spain Galician (gl-ES) - Supported Text-to-Speech (TTS) language.
*/
GL_ES = 'gl-ES',

/**
* Gujarati (gu-IN) - Supported Text-to-Speech (TTS) language.
*/
GU_IN = 'gu-IN',

/**
* Hebrew (he-IL) - Supported Text-to-Speech (TTS) language.
*/
@@ -152,18 +202,43 @@ export enum TTSLanguages {
*/
JA_JP = 'ja-JP',

/**
* Kannada (kn-IN) - Supported Text-to-Speech (TTS) language.
*/
KN_IN = 'kn-IN',

/**
* Korean (ko-KR) - Supported Text-to-Speech (TTS) language.
*/
KO_KR = 'ko-KR',

/**
* Norwegian Bokmål (nb-NO) - Supported Text-to-Speech (TTS) language.
* Latvian (lv-LV) - Supported Text-to-Speech (TTS) language.
*/
LV_LV = 'lv-LV',

/**
* Malayalam (ml-IN) - Supported Text-to-Speech (TTS) language.
*/
ML_IN = 'ml-IN',

/**
* Malay (ms-MY) - Supported Text-to-Speech (TTS) language.
*/
MS_MY = 'ms-MY',

/**
* Norwegian (nb-NO) - Supported Text-to-Speech (TTS) language.
*/
NB_NO = 'nb-NO',

/**
* Dutch (nl-NL) - Supported Text-to-Speech (TTS) language.
* Belgium Dutch (nl-BE) - Supported Text-to-Speech (TTS) language.
*/
NL_BE = 'nl-BE',

/**
* Netherlands Dutch (nl-NL) - Supported Text-to-Speech (TTS) language.
*/
NL_NL = 'nl-NL',

@@ -172,18 +247,23 @@ export enum TTSLanguages {
*/
NO_NO = 'no-NO',

/**
* Punjabi (pa-IN) - Supported Text-to-Speech (TTS) language.
*/
PA_IN = 'pa-IN',

/**
* Polish (pl-PL) - Supported Text-to-Speech (TTS) language.
*/
PL_PL = 'pl-PL',

/**
* Brazilian Portuguese (pt-BR) - Supported Text-to-Speech (TTS) language.
* Brazil Portuguese (pt-BR) - Supported Text-to-Speech (TTS) language.
*/
PT_BR = 'pt-BR',

/**
* Portuguese (pt-PT) - Supported Text-to-Speech (TTS) language.
* Portugal Portuguese (pt-PT) - Supported Text-to-Speech (TTS) language.
*/
PT_PT = 'pt-PT',

@@ -202,11 +282,26 @@ export enum TTSLanguages {
*/
SK_SK = 'sk-SK',

/**
* Serbian (sr-RS) - Supported Text-to-Speech (TTS) language.
*/
SR_RS = 'sr-RS',

/**
* Swedish (sv-SE) - Supported Text-to-Speech (TTS) language.
*/
SV_SE = 'sv-SE',

/**
* Tamil (ta-IN) - Supported Text-to-Speech (TTS) language.
*/
TA_IN = 'ta-IN',

/**
* Telugu (te-IN) - Supported Text-to-Speech (TTS) language.
*/
TE_IN = 'te-IN',

/**
* Thai (th-TH) - Supported Text-to-Speech (TTS) language.
*/
@@ -228,7 +323,7 @@ export enum TTSLanguages {
VI_VN = 'vi-VN',

/**
* Cantonese Chinese (yue-CN) - Supported Text-to-Speech (TTS) language.
* China Chinese, Cantonese (yue-CN) - Supported Text-to-Speech (TTS) language.
*/
YUE_CN = 'yue-CN',
}
2 changes: 1 addition & 1 deletion packages/voice/lib/types/NCCO/TalkAction.ts
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@ export type TalkAction = {
/**
* (Optional) The language in which the TTS speech should be spoken. Use one of the supported TTS language codes.
*/
language?: TTSLanguages;
language?: TTSLanguages | string;

/**
* (Optional) The style or type of voice to use for TTS speech. This can be a string representing the voice style.
2 changes: 1 addition & 1 deletion packages/voice/lib/types/Parameters/PlayTTSParameters.ts
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ export type PlayTTSParameters = {
/**
* The language in which the text should be spoken. Optional.
*/
language?: TTSLanguages;
language?: TTSLanguages | string;

/**
* The style or voice variant for the TTS. Optional.
2 changes: 1 addition & 1 deletion packages/voice/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@vonage/voice",
"version": "1.12.0",
"version": "1.12.1",
"description": "The Voice API lets you create outbound calls, control in-progress calls and get information about historical calls.",
"keywords": [
"vonage",