Λήψη δεδομένων από εκκρεμείς ή ολοκληρωμένες μεταγραφές
Μεταγράψτε ζωντανή ομιλία από ένα μικρόφωνο ή ζωντανή ροή
Παρακολούθηση και διαχείριση της κατάστασης μεταγραφής με συνεδρίες
Μετάφραση μεταγραφικού κειμένου σε άλλη γλώσσα
Μεταγράψτε ομιλία από προ-ηχογραφημένο ήχο σε μια διεύθυνση URL σε απλό κείμενο
Δημιουργία προσωρινού διακριτικού ελέγχου ταυτότητας για αιτήματα από την πλευρά του πελάτη
Κοινές επιλογές αιτήματος και απαντήσεις για όλες τις λειτουργίες μεταγραφής Χρησιμοποιήστε τις επιλογές για να ρυθμίσετε τις παραμέτρους των ρυθμίσεων μεταγραφής
Πολύγλωσσο
, το οποίο όταν παρέχεται σε ζωντανά αιτήματα μεταγραφής δίνει τα ακόλουθα οφέλη:JavaScriptimport { Polyglot } from '@vocalstack/js-sdk';
const polyglot = new Polyglot({ apiKey: 'YOUR-API-KEY' });
const session = {
// the name of the session
name: 'My Presentation',
// specifies the custom link for the session: https://polyglot.vocalstack.com/a-custom-url
link: 'a-custom-url',
// Optional: language of the speech spoken
// (this can be used to improve the transcription accuracy)
language: 'en',
// Optional: must be a valid HLS streaming protocol
livestream_url: 'https://.../stream.m3u8',
// Optional: Stop the stream after this many seconds of inactivity
timeout_period_s: 60,
// Optional: Hard stop the stream after this many seconds
max_duration_s: 300,
// Optional: a custom password for the session if you want to restrict access to the public shareable link
password: 'password',
};
// CREATE
const response = await polyglot.createSession(session);
const polyglot_id = response.data?.id;
// READ
await polyglot.getSession({ id: polyglot_id });
// UPDATE
await polyglot.updateSession({ id: polyglot_id, ...session });
// DELETE
await polyglot.deleteSession({ id: polyglot_id });
// LIST ALL SESSIONS
await polyglot.getAllSessions();
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);
});