[Bug]: voice.playTTS: TypeError: instanceof called on an object with an invalid prototype property.
tapz opened this issue · 6 comments
tapz commented
Node Version
20.x
Platform
Docker Container
SDK Version
3.13.0
Code Sample
await vonage.voice.playTTS(
callId,
{
action: 'talk',
'Hello',
'fi-FI',
style: 0,
loop: 1,
premium: true
}
);
Expected Behavior
Talks to the call
Actual Behavior
TypeError: instanceof called on an object with an invalid prototype property.
at <anonymous> (/home/node_modules/@vonage/server-client/dist/client.js:225:20)
at processTicksAndRejections (:12:39)
manchuck commented
@tapz I bet there was a bad build of this version While I was out. v3.14 should have this resolved
tapz commented
TypeError: instanceof called on an object with an invalid prototype property.
at <anonymous> (/home/bun/node_modules/@vonage/server-client/dist/client.js:225:34)
at processTicksAndRejections (:12:39)
manchuck commented
@tapz You are missing the properties for the text and language. The call should look like:
await vonage.voice.playTTS(
callId,
{
action: 'talk',
text: 'Hello',
language: 'fi-FI',
style: 0,
loop: 1,
premium: true
}
);
tapz commented
@manchuck Actually my sample is incorrect. I give the values like this:
{
action: 'talk',
text,
language,
style: 0,
loop: 1,
premium: true
}
tapz commented
But I'll change it to send a request directly to the api without the library. Maybe get some error code.