Mae API VocalStack yn gadael i chi integreiddio sesiynau Polyglot i'ch gwefan neu strwythur cyfredol. Gallwch hefyd ddefnyddio'r API i greu cymhwysiadau addasiedig sy'n defnyddio galluoedd trawsgrifio a chyfieithu AI pwerus VocalStack.
Darllen dogfennaethJavaScriptimport { 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); });