valstorm-plugin-deepgram — Deepgram Nova-3 Speech-to-Text & Diarization Plugin (FI-473)
Python plugin for Open Valstorm, mounted at platform.deepgram (VALSTORM_PLUGINS=deepgram or *).
Provides:
- Ephemeral 10-Minute STT Token Minting: Issues scoped temporary keys (
GET /v1/deepgram/token&/v1/ai/speech/deepgram/token) so browser/desktop clients can open live Deepgram WebSockets without exposing the master API key. - Speaker-Diarized Nova-3 Transcription: Transcribes audio uploads, URLs, or Valstorm VFS
file_idrecordings (POST /v1/deepgram/transcribe&/v1/ai/recording/transcribe) into structured utterances and[MM:SS] Speaker N:transcripts.
🤖 Agent-Assisted Quick Setup (Let the Valstorm Agent Set It Up)
You only need a Deepgram API Key from console.deepgram.com. Your Valstorm AI Agent can auto-discover your Deepgram project_id, save your encrypted credentials in platform.credentials, and verify live Nova-3 transcription and token minting.
1. Quick Human Prerequisite (60 Seconds in Deepgram Console)
- Log in to console.deepgram.com.
- Create an API Key with Member or Admin scope (so it can mint 10-minute ephemeral keys) and copy it.
2. Copy-Paste Prompt for Your Valstorm Agent
Drop this prompt into Valstorm Chat:
"Set up
valstorm-plugin-deepgramusing my Deepgram API Key<YOUR_DEEPGRAM_KEY>. Followplugins/valstorm-plugin-deepgram/README.mdto auto-discover my Deepgramproject_id, save the encrypted credentials viaplatform.deepgram.save_credentials(...), and rundeepgram_verify_connection."
3. Agent Execution Runbook (Instructions for the AI Agent)
- Save Credentials & Auto-Discover
project_id:
- Call
await platform.deepgram.save_credentials(api_key=..., model="nova-3", discover_project=True)(orPOST /v1/deepgram/credentials).
- Verify Live Connection:
- Call
deepgram_verify_connectionand report the discoveredproject_idand active STT model (nova-3).
🛠️ End-to-End DIY Setup Guide (Manual)
python
await platform.deepgram.save_credentials(
api_key="dg_xxxxxxxxxxxxxxxxxxxxxxxx",
model="nova-3",
)
# Mint a 10-minute scoped browser/desktop WebSocket token
token_info = await platform.deepgram.mint_ephemeral_token()
# Transcribe a recording stored in Valstorm VFS
result = await platform.deepgram.transcribe_vfs_file(file_id="file_01HXYZ", diarize=True)Running Tests
bash
cd apps/open-api
.venv/bin/pytest tests/test_plugin_deepgram.py -v