Skip to content

actionpower/dagloapi-js-beta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dagloapi-js-beta

Usage

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);
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages