JavaScript and Node.js Speech-to-Text
This tutorial guides you through creating a basic Node.js command-line interface (CLI) app that uses the AssemblyAI speech-to-text transcription API. The application first uploads an audio file URL to the API, then fetches and prints the completed transcription text on the command line. To get started, you need a free AssemblyAI account, a code editor like VS Code, Node.js, and npm installed. You will create three new files: upload.js, download.js, and .env. The upload.js file sends an HTTP POST request to the AssemblyAI API with the audio URL as JSON data. The download.js file checks if the transcription is completed by sending a GET request to the AssemblyAI endpoint for retrieving transcriptions. If the status is "completed," it prints the text on the command line; otherwise, it prompts you to try again in a few minutes.
Company
AssemblyAI
Date published
March 4, 2021
Author(s)
Andrew Galyan-Mann
Word count
1265
Language
English
Hacker News points
None found.