npm install franc-audio-to-text
import TranscribeAudioToText from "franc-audio-to-text";
- An Assembly AI account - Sign up for free!
- An API key
- An audio file to upload
import TranscribeAudioToText from "franc-audio-to-text";
import * as dotenv from 'dotenv';
dotenv.config();
const apiKey = process.env.ASSEMBLY_API_KEY!; // User provides their API key
const audioUrl = 'https://storage.googleapis.com/aai-web-samples/5_common_sports_injuries.mp3';
const customAI = new TranscribeAudioToText(apiKey);
(async () => {
try {
const transcript = await customAI.createTranscript(audioUrl);
console.log(transcript);
} catch (error: any) {
console.error(error.message);
}
})();
- Removed 'natural' package: Due to persistent bugs causing issues with language detection, the 'natural' package dependency has been removed from the project.
this wrapper supports only typescript
That's it! You're ready to go!
Having trouble with this wrapper? please contact me at E-mail me