vonage-node-sdk
vonage-node-sdk copied to clipboard
[Bug]: Differences between documentation and implementation
Node Version
20.x
Platform
Docker Container
SDK Version
@vonage/[email protected]
Code Sample
...
'af', // missing https://github.com/Vonage/vonage-node-sdk/blob/%40vonage/voice%401.11.1/packages/voice/lib/enums/TTSLanguages.ts
'ar', //
'bg', // missing https://github.com/Vonage/vonage-node-sdk/blob/%40vonage/voice%401.11.1/packages/voice/lib/enums/TTSLanguages.ts
'bn', // missing https://github.com/Vonage/vonage-node-sdk/blob/%40vonage/voice%401.11.1/packages/voice/lib/enums/TTSLanguages.ts
'ca', //
'cmn', //
'cs', //
'cy', //
'da', //
'de', //
'el', //
'en', //
'es', //
'eu', //
'fi', //
'fil', //
'fr', //
'gl', // missing https://github.com/Vonage/vonage-node-sdk/blob/%40vonage/voice%401.11.1/packages/voice/lib/enums/TTSLanguages.ts
'gu', // missing https://github.com/Vonage/vonage-node-sdk/blob/%40vonage/voice%401.11.1/packages/voice/lib/enums/TTSLanguages.ts
'he', //
'hi', //
'hu', //
'id', //
'is', //
'it', //
'ja', //
'kn', // missing https://github.com/Vonage/vonage-node-sdk/blob/%40vonage/voice%401.11.1/packages/voice/lib/enums/TTSLanguages.ts
'ko', //
'lv', // missing https://github.com/Vonage/vonage-node-sdk/blob/%40vonage/voice%401.11.1/packages/voice/lib/enums/TTSLanguages.ts
'ml', // missing https://github.com/Vonage/vonage-node-sdk/blob/%40vonage/voice%401.11.1/packages/voice/lib/enums/TTSLanguages.ts
'ms', // missing https://github.com/Vonage/vonage-node-sdk/blob/%40vonage/voice%401.11.1/packages/voice/lib/enums/TTSLanguages.ts
'nb', //
'nl', //
'no', //
'pa', // missing https://github.com/Vonage/vonage-node-sdk/blob/%40vonage/voice%401.11.1/packages/voice/lib/enums/TTSLanguages.ts
'pl', //
'pt', //
'ro', //
'ru', //
'sk', //
'sr', // missing https://github.com/Vonage/vonage-node-sdk/blob/%40vonage/voice%401.11.1/packages/voice/lib/enums/TTSLanguages.ts
'sv', //
'ta', // missing https://github.com/Vonage/vonage-node-sdk/blob/%40vonage/voice%401.11.1/packages/voice/lib/enums/TTSLanguages.ts
'te', // missing https://github.com/Vonage/vonage-node-sdk/blob/%40vonage/voice%401.11.1/packages/voice/lib/enums/TTSLanguages.ts
'th', //
'tr', //
'uk', //
'vi', //
'yue', //
Expected Behavior
I have come across discrepancies in the documentation regarding language support in the library's. What should I base it on?
https://developer.vonage.com/en/voice/voice-api/concepts/text-to-speech#supported-languages https://github.com/nexmo-community/vapi-tts-voices/blob/main/voices.json https://github.com/Vonage/vonage-node-sdk/blob/3.x/packages/voice/lib/enums/TTSLanguages.ts
Actual Behavior
I don't know.
@ThingUroboros We continue to keep adding new TTS voices. The enum to help ensure the correct voice/language is passed in. You should be able to pass in any string you like with out any issues. Are you having a hard time compiling? If not, then the next time we do work on the voice package, we will update the list.
@manchuck The error lies in the type of the 'language' parameter.
NCCOAction
...
language?: TTSLanguages | undefined
...
export type TalkAction = {
action: NCCOActions.TALK;
text: string;
bargeIn?: boolean;
loop?: number;
level?: string;
language?: TTSLanguages;
style?: string;
premium?: boolean;
};
@ThingUroboros I will update the type to accept either the enum or a string to avoid this problem. We are constantly adding languages faster than we can deploy new updates to this list.
@ThingUroboros v3.14.1 of the @vonage/server-sdk (v1.12.1 of @vonage/voice) has been released with these languages update