Batch and speaker-labeled transcription using AssemblyAI.
- Install dependencies:
pip install -r requirements.txt- Set your API key in a
.envfile (recommended):
ASSEMBLYAI_API_KEY=your_key_here
If the key is missing when you launch the GUI, a box at the top of the main window asks for it (with a text area to paste the key). You can optionally save it to .env from there.
- Place audio files in the
audio/directory (created automatically if missing when using the GUI).
python3 gui.pyThe app has two tabs:
- Batch — Scans
audio/for supported files, shows Pending/Done status, and transcribes files that do not yet have a matchingtranscripts/<name>.json. - Speaker-labeled — Transcribes one file (from
audio/or via Browse) with speaker diarization and savesconversation.json.
At the top of the window, choose how AssemblyAI should handle language:
- Auto (detect language) (default) — Uses
language_detection=True(same as the CLI scripts). - A specific language — Sets
language_codemanually. The dropdown lists all 103 languages from AssemblyAI supported languages (e.g.en,es,et,en_us).
With a manual language code, some features (such as speaker labels) may not be available for every language; the API returns an error in that case.
python3 audio2txt.py- Looks in
audio/for audio files. - Checks
transcripts/for matching<same-name>.jsonfiles. - Transcribes only files that do not yet have a matching transcript.
- Saves transcripts to
transcripts/with the same base filename and.jsonextension. - Uses automatic language detection by default.
python3 audio2txtSpeakerLabeled.py ./audio/your_file.m4aTranscribes one file with speaker labels and writes conversation.json. Audio files live in ./audio/ by default; you can pass a filename (e.g. recording.m4a), a path under ./audio/, a full path, or a URL.