VocalStack的API允许您将Polyglot会话集成到您现有的网站或基础设施中。 您还可以使用 API 创建自定义应用程序,利用 VocalStack 强大的 AI 转录和翻译功能。.
阅读文档JavaScriptimport { Polyglot } from '@vocalstack/js-sdk'; const polyglot = new Polyglot({ apiKey: 'YOUR-API-KEY' }); const stream = await polyglot.getLiveSessionStream({ link: 'a-custom-url', password: 'password', // include only if the session has a password }); // Listen to any live transcriptions that are associated // with the polyglot session. stream.onData((response) => { const { data } = response; // The entire transcription object of the current transcription const transcription = data.activeTranscription; // An object with the transcription timeline console.log(transcription.timeline); });