Repository navigation
v0.6.0 — Recording & transcription
Voice recording, transcription, and summarisation pipeline. GMs can record a voice session directly from Discord; the audio is automatically transcribed and summarised, and the results are uploaded to Quest Board.
Added
-
bot/cogs/recording.py— full implementation replacing the v0.1.0 stub:/record start <session_id>— validates the UUID, requires the GM to be in a voice channel, fetches session metadata from the API for the announcement embed, connects to voice and starts adiscord.sinks.WaveSink; schedules an auto-stop atMAX_RECORDING_HOURS/record stop— stops the sink, disconnects from voice, hands off to the processing pipeline as a background task- Processing pipeline: collects per-user WAV files from the sink → mixes to mono MP3 (
utils/audio) → deletes WAVs → transcribes (services/transcription) → summarises (services/summarisation) → uploads viaPOST /api/bot/sessions/{id}/transcript→ posts a summary embed; cleans up the MP3 on completion or error - Auto-stop fires after
MAX_RECORDING_HOURSwith a channel notice - One active recording per guild enforced; clear errors if already recording or if the GM is not in a voice channel
- Transcript content is never logged — only metadata (duration, word count, file sizes)
-
bot/utils/audio.py—mix_to_mp3(wav_paths, output_path)wraps an FFmpeg subprocess; single-input path skipsamixfilter; logs file size on completion; raisesRuntimeErroron non-zero FFmpeg exit -
bot/services/transcription.py—transcribe(mp3_path, settings):WHISPER_MODE=local— multipart POST to ahmetoner/whisper-asr-webservice atWHISPER_API_URL/asrWHISPER_MODE=api— OpenAIPOST /v1/audio/transcriptions(whisper-1)- 10-minute timeout; raises
RuntimeErroron failure
-
bot/services/summarisation.py—summarise(transcript, campaign_name, game_system, settings):SUMMARISER_MODE=ollama—POST /api/generateto local OllamaSUMMARISER_MODE=api— Anthropic claude-haiku-4-5-20251001 ifANTHROPIC_API_KEYset, otherwise OpenAI gpt-4o-mini- TTRPG-focused system prompt: key events, NPC introductions, player decisions, and a "What's next?" hook
- 5-minute timeout; raises
RuntimeErroron failure