import { DagloAPI } from './lib/index.js';
const dagloToken = 'YOUR_TOKEN'; // REPLACE TO YOUR TOKEN
const baseURL = 'https://apis.daglo.ai'
let client = new DagloAPI({
host: baseURL,
apiToken: dagloToken
});
let transcriber = client.realtime.transcriber();
transcriber.on('transcript', (data) => {
// when Transcript success,
// data.text: string; transcript result
})
let stream = null;
try {
// capture the microphone
stream = await navigator.mediaDevices.getUserMedia({ audio: true });
}
catch (err) {
console.log("The following error occured: " + err);
return alert("getUserMedia not supported on your browser");
}
if(stream) {
transcriber.stream(stream);
}
-
Notifications
You must be signed in to change notification settings - Fork 0
License
actionpower/dagloapi-js-beta
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published