Discussions

Ask a Question
Back to All

How can I get the result after step 4

I implemented the live-streaming-demo on server side (with nodejs). https://github.com/de-id/live-streaming-demo

and everything is perfect.

GATHERING complete
ICE connected
PEER connected

When I used to create talk stream like the below:

if (
stream.status.ice === "connected" &&
stream.status.signaling === "stable"
) {
await sdk
.createTalkStream(
{
script: {
type: "text",
subtitles: "false",
provider: {
type: "microsoft",
voice_id: "en-US-JennyNeural",
},
ssml: "false",
input: "hello world",
},
session_id: stream.streamConfig.session_id,
},
{ id: stream.streamConfig.id }
)
.then(({ data }) => {
console.log(data);
})
.catch((err) => console.error(err));
}

response is:

{
status: 'started',
session_id: '<SESSION_ID>',
talkId: '<TALK_ID>'
}

also working.

so how can I get the result? I tried to get talk with talkId from talks/ but returned the not found error.