Automatic Speech Recognition with Node.js

dilek

Dilek Karasoy

Posted on February 22, 2023

Automatic Speech Recognition with Node.js

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?

  1. Create a project and install the SDK:
npm install @picovoice/leopard-node
Enter fullscreen mode Exit fullscreen mode
  1. Implement transcription in JavaScript Get your AccessKey from Picovoice Console if you haven't already. Then replace the placeholder with your AccessKey before running the below:
const {Leopard} = require("@picovoice/leopard-node");

const handle = new Leopard(accessKey);
Enter fullscreen mode Exit fullscreen mode
  1. Transcribe an audio file in FLAC, MP3, MP4, m4a, Ogg, WAV, and WebM.
const result = handle.processFile(audioPath);
console.log(result.transcript);
Enter fullscreen mode Exit fullscreen mode

Voila!

If you want to explore additional features such as word confidence or timestamps, check out this tutorial.

💖 💪 🙅 🚩
dilek
Dilek Karasoy

Posted on February 22, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

Automatic Speech Recognition with Node.js
100daysofcode Automatic Speech Recognition with Node.js

February 22, 2023