"Transcribe Meeting Audio in Python with Gemini AI"

"Here's the fastest way to transcribe meeting audio in Python with Gemini — upload the recording, ask for speaker labels, and you're done."

Upload the recording with the Files API, call generate_content on gemini-2.5-flash with a prompt that asks for a transcript with speaker labels, and print response.text . One dependency ( google-genai ), about 25 lines, no local GPU, and speaker diarization that actually holds labels across long recordings. Minimal working example: transcribe meeting audio in Python with Gemini import os from google import genai # pip install "google-genai==2.28.0", then export GEMINI_API_KEY client = genai.Client(api_key=os.environ["GEMINI_API_KEY"]) # Files API handles any size up to 2 GB; supports mp3, m4a, wav, … audio = client.files.upload(file="meeting.mp3") response = client.models.generate_content( model="gemini-2.5-flash", contents=[ audio, "Transcribe this meeting recording. Label each speaker as " "**Speaker 1:**, **Speaker 2:** and so on, keeping each person's " "label consistent for the whole recording. Output the transcript only.", ], ) print(response.text) with open("meeting-transcript.md", "w") as f: f.write(response.text) client.files.delete(name=audio.name) # uploads auto-expire after 48h anyway That's the whole thing. The diarization is prompt-driven — there is no separate "diarize" endpoint. Gemini's audio understanding keeps speaker labels consistent across the recording far better than most local pipelines, which is exactly why one-file transcribers like this one keep popping up on GitHub. If you're putting this behind an app, keep the key server-side — the same discipline as securing your Gemini API key in Flutter apps . 3 variations worth knowing Files API vs inline audio (the 20 MB rule). Requests under 20 MB total can skip the upload and pass bytes inline: from google.genai import types data = open("clip.mp3", "rb").read() # small clip only…

Explore