Skip to main content
In this guide, we’re going to go over how we built UseWhisper.io, an open source speech-to-text app that transcribes audio almost instantly & can transform it into summaries. It’s built using the Whisper Large v3 API on Together AI and supports both live recording and file uploads. usewhisper.io In this post, you’ll learn how to build the core parts of UseWhisper.io. The app is open-source and built with Next.js, tRPC for type safety, and Together AI’s API, but the concepts can be applied to any language or framework.

Building the audio recording interface

Recording modal UI Whisper’s core interaction is a recording modal where users can capture audio directly in the browser:
The magic happens in our custom useAudioRecording hook, which handles all the browser audio recording logic.

Recording audio in the browser

To capture audio, we use the MediaRecorder API with a simple hook:
This simplified version focuses on the core functionality: start recording, stop recording, and get the audio blob.

Uploading and transcribing audio

Once we have our audio blob (from recording) or file (from upload), we need to send it to Together AI’s Whisper model. We use S3 for temporary storage and tRPC for type-safe API calls:

Creating the transcription API with tRPC

Our backend uses tRPC to provide end-to-end type safety. Here’s our transcription endpoint:
The beauty of tRPC is that our frontend gets full TypeScript intellisense and type checking for this API call.

Supporting file uploads

Upload modal UI For users who want to upload existing audio files, we use react-dropzone and next-s3-upload. Next-s3-upload handles the S3 upload in the backend and fully integrates with Next.js API routes in a simple 5 minute setup. You can read more here: https://next-s3-upload.codingvalue.com/

Adding audio transformations

Once we have a transcription, users can transform it using LLMs. We support summarization, extraction, and custom transformations:

Type safety with tRPC

One of the key benefits of using tRPC is the end-to-end type safety. When we call our API from the frontend:
This eliminates runtime errors and provides excellent developer experience with autocomplete and type checking.

Going beyond basic transcription

Whisper is open-source, so check out the full code to learn more and get inspired to build your own audio transcription apps. When you’re ready to start transcribing audio in your own apps, sign up for Together AI today and make your first API call in minutes!