We'll cover how to run Automatic Speech Recognition (ASR) software with Node.js. Do you want to guess how many lines of code you need for it when you work with Leopard Node.js SDK?
- Create a project and install the SDK:
npm install @picovoice/leopard-node
- Implement transcription in JavaScript
Get your
AccessKey
from Picovoice Console if you haven't already. Then replace the placeholder with yourAccessKey
before running the below:
const {Leopard} = require("@picovoice/leopard-node");
const handle = new Leopard(accessKey);
- Transcribe an audio file in FLAC, MP3, MP4, m4a, Ogg, WAV, and WebM.
const result = handle.processFile(audioPath);
console.log(result.transcript);
Voila!
If you want to explore additional features such as word confidence or timestamps, check out this tutorial.
Top comments (0)