Voice to notes
Set up your own speech to notes app
We’ll use Whisper, Llama 3, Cloudflare R2 storage & Supabase database to create our own Voice to Notes app. You’ll have it running in 5 minutes!
Voice to notes app using Whisper and LLaMA 3
Pre-requisites
To build your own Voice to notes app you’ll need to have Supabase, Replicate, Groq and Storage set up. If you haven’t, please start by doing that.
Supabase
Set up user authentication & PostgreSQL database using Supabase
Storage
Set up audio, pdf and image storage using Cloudflare R2
Replicate
Set up Replicate & understand how it’s used throughout the app
Groq
Set up Groq & understand how it’s used throughout the app
Once that is ready, you can go ahead and follow the steps below.
Database tables
We’ll create 3 tables: one to store our transcriptions
, one for our recordings
and one for our summaries
.
Copy paste the following into your Supabase SQL editor:
Great job! The database setup is complete, and your app is ready to go. Visit http://localhost:3000/audio
to see it in action.
App Structure
-
app/api/(apps)/audio/*
Key API routes:app/api/(apps)/audio/upload/route.ts
: Uploads audio recordings to Cloudflare R2, returns a public URL, and updates therecordings
table. It also reduces thecredits
of the user if you’ve definedpaywall === true
inapp/audio/toolConfig.ts
app/api/(apps)/audio/transcribe/route.ts
: Transcribes the audio recording usingincredibly-fast-whisper
(Replicate) and stores the data in Supabase.app/api/(apps)/audio/summarize/route.ts
: Generates a short summary and a list of action points.app/api/(apps)/audio/delete/route.ts
: Deletes data from both Supabase and Cloudflare R2.
-
/app/(apps)/audio/*
Contains all front-end logic, including paywall checks and dynamic pages per recording. -
/components/audio/*
Contains all front-end components unique to the audio app.
If you have any questions, feel free to reach out to me on Twitter or Discord!