In this app, we grab an audio stream from the user's computer and then send that over a WebSocket to AssemblyAI for real-time transcription. Once AssemblyAI begins transcribing, we display the text in the browser.
- Before running this app, you need to upgrade your AssemblyAI account. The Streaming API is only available to upgraded accounts.
- To upgrade your account you need to add a card. You can do that in your dashboard here!
- Clone the repo to your local machine.
- Open a terminal in the main directory housing the project. In this case
streaming-api-nextjs
. - Run
npm install
to ensure all dependencies are installed. - Add your AssemblyAI key to line 8 in
src/app/api/token/route.js
. - Start the app with the command
npm run dev
. - Vist
http://localhost:3000/
in the browser and click "Record". As you speak the live transcription will appear in the webpage!