modscode / Gallery / deepgram-voice
deepgram-voice
Deepgram as Claude Code's voice: TTS readback of replies, overriding the system synthesizer
What it does
- Draws a band above the prompt, a pane, toasts
- Adds /dg-listen, /dg, /dg-voice
- Hooks audio.speak, prompt.submit, session.start, turn.complete and 1 more
- Keeps its own state between turns
- Starts processes
Good points
- No network calls
- Written in TypeScript
- Handles errors
- Writes no files
Code to start from
Two kinds: a starter modscode writes from the design above, and the lines of the mod's own code that draw it.
Starter (register.tsx)
import type { Register } from 'claude-code'
// Drawn like deepgram-voice by Sam Gutentag (pane, band, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/samgutentag-deepgram-deepgram-voice/
// Written by modscode from that reading, not copied from the mod: use it as you like.
// Each value below stands for one the mod works out at run time; put in your own.
export const register: Register = on => {
// the band above the prompt; what else goes there is drawn under it
on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
const { Box, Button, Text } = $.ui.resolve(e)
const circle = '…'
const word = '…'
const earsPad = '…'
const mic = '…'
const name = '…'
return (
<Box flexDirection="column">
<Box>
<Button plain label={`${circle}`} />
<Text dimColor>
{" "}
{word}
{" "}
</Text>
<Text>
{earsPad}
</Text>
<Text dimColor>
{" "}
{" "}
</Text>
<Text bold inverse color="cyan">
{" 🔊 SPEAKING "}
</Text>
<Text>
{" "}
</Text>
<Button plain label="■ stop" />
<Text dimColor>
{" · "}
</Text>
<Button plain dimColor label={`🎙 ${mic}`} />
<Text dimColor>
{" · "}
</Text>
<Button plain dimColor label="🔈 macOS output" />
<Text dimColor>
{" · "}
</Text>
<Button plain dimColor label="▤ clean view" />
</Box>
<Box>
<Text>
{"Is "}
{name}
{" headphones or speakers? "}
</Text>
<Button hotkey="h" label="Headphones" />
<Text>
{" "}
</Text>
<Button hotkey="s" label="Speakers" />
</Box>
{await next(e)}
</Box>
)
})
// the pane: open it with $.ui.open({ id: 'my-pane', title: "Mic and sound" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Button } = $.ui.resolve(e)
const i = '…'
const micRow = '…'
const MODE_TEXT = '…'
return (
<Box flexDirection="column">
<Text dimColor>
No microphones found. Is one plugged in?
</Text>
<Button hotkey={`${i}`} plain label={`${micRow}`} />
<Button hotkey={`${i}`} plain label={`${micRow}`} />
<Button hotkey={`${i}`} plain label={`${micRow}`} />
<Button hotkey="0" plain label="System default ✓ in use" />
<Text dimColor>
Press a number, or Esc to close.
</Text>
<Text>
{" "}
</Text>
<Text>
{"Sound plays on: "}
the macOS output
</Text>
<Text dimColor>
{MODE_TEXT}
</Text>
<Button hotkey="t" plain label="Switch to speakers mode" />
<Button hotkey="o" plain label="Change output (opens macOS Sound settings)" />
</Box>
)
})
on('session.start', async ($, e, next) => {
await $.ui.toast(`Stopped. Go ahead.`)
await $.ui.toast(`Stopped. Go ahead.`)
return next(e)
})
}
The mod's own code
Shown under the mod's licence (MIT); its text is below. Keep the notice if you copy these lines.
mod/deepgram-voice/hooks/register.tsx lines 694–801 · Band
on('ui.render', { component: 'AbovePrompt' }, async ($, e, next) => {
if (e.props.hasSurvey) return next(e)
const phase = await read($, earsPhase)
const speaking = await read($, isSpeaking)
if (!isStripShown({ isVoiceOn: await read($, isOn), isListening: phase !== 'off', isSpeaking: speaking })) return next(e)
const { Box, Button, Text } = $.ui.resolve(e)
const mic = micLabel(await read($, device))
const offered = await read($, newMic)
const silent = await read($, isSilent)
const out = await read($, output)
const known = modeFor(out, await read($, duplexByOutput))
const chosen = known !== undefined
const mode = known ?? 'speakers'
const level = await read($, micLevel)
const isEchoNotice = await read($, isEchoDetected)
const viewNow = await read($, view)
const choose = (picked: Duplex) => () => chooseDuplex($, picked)
// The circle is the mic switch; the word next to it says what the mic is doing
const [circle, word] =
phase === 'off'
? ['○', 'MIC OFF']
: phase === 'starting'
? ['○', 'STARTING MIC']
: silent
? ['●', 'NO SOUND']
: phase === 'hearing'
? ['◉', 'HEARING YOU']
: phase === 'echo' && speaking
? ['◎', 'HEARING ITSELF']
: ['●', 'LISTENING']
// The second row only when something needs an answer
const question = !chosen && phase !== 'off' ? (
<Box>
<Text>Is {out ? out.name : 'your sound output'} headphones or speakers? </Text>
<Button key="pick-headphones" hotkey="h" label="Headphones" onPress={choose('headphones')} />
<Text> </Text>
<Button key="pick-speakers" hotkey="s" label="Speakers" onPress={choose('speakers')} />
</Box>
) : isEchoNotice ? (
<Box>
<Text>Your mic hears the speakers, so it switched to speakers mode. </Text>
<Button key="back-to-headphones" hotkey="h" label="I'm on headphones" onPress={choose('headphones')} />
<Text> </Text>
<Button key="ok-echo" hotkey="o" label="OK" onPress={() => update($, isEchoDetected, () => false)} />
</Box>
) : offered ? (
<Box>
<Text>New mic plugged in: {offered} </Text>
<Button key="use-new-mic" hotkey="u" label={`Use ${offered}`} onPress={() => chooseMic($, offered)} />
<Text> </Text>
<Button key="dismiss-new-mic" hotkey="x" label="Dismiss" onPress={() => update($, newMic, () => null)} />
</Box>
) : null
return (
<Box flexDirection="column">
<Box>
<Button key="mic-toggle" plain label={circle} onPress={() => toggleListening($)} />
{phase === 'off' ? (
<Text dimColor> {word} </Text>
) : phase === 'starting' ? (
<Text bold color="yellow"> {word} </Text>
) : phase === 'hearing' ? (
<Text bold inverse color="green"> {word} </Text>
) : word === 'HEARING ITSELF' ? (
<Text bold color="yellow"> {word} </Text>
) : (
<Text bold color="green"> {word} </Text>
)}
<Text>{earsPad(word)}</Text>
{/* the meter's slot stays when the mic is off, so nothing after it moves */}
<Text dimColor>{phase === 'off' ? ' '.repeat(METER.length) : meter(level)} </Text>
{speaking ? (
<>
<Text bold inverse color="cyan"> 🔊 SPEAKING </Text>
<Text> </Text>
<Button key="stop-voice" plain label="■ stop" onPress={() => stop($)} />
</>
) : (
// padded to the speaking slot's width, so the mic and output don't move when it talks
<Text dimColor>{QUIET + quietPad()}</Text>
)}
<Text dimColor> · </Text>
<Button key="mic-name" plain dimColor label={`🎙 ${mic}`} onPress={() => openPicker($)} />
<Text dimColor> · </Text>
<Button
key="output-name"
plain
dimColor
label={`${mode === 'speakers' ? '🔈' : '🎧'} ${out ? out.name : 'macOS output'}`}
onPress={() => openPicker($)}
/>
<Text dimColor> · </Text>
<Button
key="view-toggle"
plain
dimColor
label={viewNow === 'clean' ? '▤ clean view' : '▦ full view'}
onPress={() => chooseView($, viewNow === 'clean' ? 'normal' : 'clean')}
/>
</Box>
{question}
</Box>
)
})mod/deepgram-voice/hooks/register.tsx lines 856–902 · Pane
on('ui.render', { component: 'Pane', requestId: PICKER }, async ($, e) => {
const { Box, Button, Text } = $.ui.resolve(e)
const listed = await read($, mics)
const current = await read($, device)
const out = await read($, output)
const mode = modeFor(out, await read($, duplexByOutput)) ?? 'speakers'
return (
<Box flexDirection="column">
{listed.length === 0 && <Text dimColor>No microphones found. Is one plugged in?</Text>}
{listed.map((m, i) => (
<Button
key={`mic-${m.index}`}
hotkey={i < 9 ? String(i + 1) : undefined}
plain
label={micRow(m, current)}
onPress={() => chooseMic($, m.name)}
/>
))}
<Button
key="mic-default"
hotkey="0"
plain
label={`System default${current === DEFAULT_MIC ? ' ✓ in use' : ''}`}
onPress={() => chooseMic($, DEFAULT_MIC)}
/>
<Text dimColor>Press a number, or Esc to close.</Text>
<Text> </Text>
<Text>Sound plays on: {out?.name ?? 'the macOS output'}</Text>
<Text dimColor>{MODE_TEXT[mode]}</Text>
<Button
key="mode-toggle"
hotkey="t"
plain
label={mode === 'headphones' ? 'Switch to speakers mode' : 'Switch to headphones mode'}
onPress={async () => chooseDuplex($, (await effectiveMode($)) === 'headphones' ? 'speakers' : 'headphones')}
/>
<Button
key="open-sound-settings"
hotkey="o"
plain
label="Change output (opens macOS Sound settings)"
onPress={() => void $.process.run(['open', 'x-apple.systempreferences:com.apple.Sound-Settings.extension'])}
/>
</Box>
)
})Licence text (MIT)
MIT License Copyright (c) 2026 Deepgram, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
What its code calls
runs programsdrives Clauderemembers
The design, read from code
Drawn from the mod's source at the commit read, not from a run: a list is drawn three times, a condition takes its first branch that draws in the desktop app, and a value only the run time knows is shown as a made-up sample (dotted underline) or left out. Colours and type are this site's.
What its code shows
Read from the source at commit da2d70413a86 on 2026-10-06. The first group decides whether a mod is listed; the rest is for you to weigh. A later commit is not read until the next crawl.
| Decides the listing: code you can check | |
|---|---|
| Entry read | Every module hooks/hooks.json names was read.mod/deepgram-voice/hooks/register.tsx |
| Parses | Every file parses as TypeScript or JavaScript.6 files parsed |
| All its code is in the mod | Every import is a file of the mod or the engine's own module; no packages, no require.all its code is in the mod |
| Readable | No minified lines, no eval or new Function, no import of a computed path, no encoded blobs.no minified code, no eval, no encoded blobs |
| Calls in the open | Network and programs are reached as $.http.fetch and $.process.run in place, never passed around.every call outside goes through $ in the open |
| For you to weigh before installing | |
| Where it draws | The terminal, the desktop app, both, or nothing (hooks only: a guard or a prompt rewriter), as its code says. Shown, never a reason to leave a mod out.draws in the terminal and the desktop app, the same in both |
| Install line | Whether its repository's own .claude-plugin/marketplace.json lists it, so it installs from that marketplace with the lines on its page.listed in its repository's .claude-plugin/marketplace.json: installs from there |
| Programs on Windows | Whether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).mod/deepgram-voice/hooks/register.tsx:172 system_profiler (not on Windows); mod/deepgram-voice/hooks/register.tsx:265 pkill (not on Windows); mod/deepgram-voice/hooks/register.tsx:898 open (not on Windows) |
| Network | Whether every fetch names its https host in the code.no network |
| Programs | Whether every program it starts is named in the code and is not a shell, an interpreter or a network tool.mod/deepgram-voice/hooks/register.tsx:88 a program named at run time; mod/deepgram-voice/hooks/register.tsx:97 python3 (a shell or interpreter); mod/deepgram-voice/hooks/register.tsx:227 python3 (a shell or interpreter); mod/deepgram-voice/hooks/register.tsx:397 node (a shell or interpreter) |
| Reads and sends | Whether it both reads files or environment variables and reaches the network.reaches the network, but reads no files and no environment variables |
| Keys in the source | Whether the source holds what looks like an API key or a private key.no keys in the source |
| Licence | An open licence (MIT, Apache-2.0, BSD, ISC, Unlicense, 0BSD, CC0) with its text lets modscode show its code; otherwise the code is linked.MIT |
This is a reading of the code text, not a security review: it does not run the mod, and it cannot see what a program the mod starts does. The check before installing is yours. How mods are chosen
Install it
Check it yourself before you install it. Mods run unsandboxed, with your permissions, and modscode does not vouch for what this code does. Read the code below (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.
Its repository is its marketplace. Add that marketplace (in the terminal with these commands, or in the desktop app's plugin settings) and install the mod from it:
/plugin marketplace add samgutentag-deepgram/claude-code-voice-mod/plugin install deepgram-voice@deepgram-voiceThis installs the marketplace's latest commit, which may not be the one read here (da2d70413a86). Compare them before you install.
Ask Claude about it
With the modscode connector added, Claude can read this design, what its code reaches and its code, and build on them. Ask it like this:
Read the modscode design "samgutentag-deepgram-deepgram-voice" with its code and make me a pane like itSearch them from Claude: the MCP connector
Similar designs
-
Ask Claude…2h 10m · █████░░░✓ build ✓ build ✓ buildJavaKotlin3 Python■ ok 3 ■ ok 3 ■ ok 3 Razor proven 3 Razor proven 3 Razor proven 3Phases ──────── 3/3build Pythonbuild Pythonbuild Python… 3 more phasesLua ──────── 3/Kotlin■ the whole upgrade Ruby■ build build Ruby■ build build Ruby■ build build Ruby … 3 moreNext ──────── PythonRuby (by hand)Podsclick a button, or ctrl+x tab then Tab, EnterAttention ──────── 3! Scala ! Scala ! Scala … 3 moreSession ──────── okJava
-
Open a file first: /crit-tui file <path>Reopen this one in the crit browser view.Ask Claude…
-
Ask Claude…TodayOct 63 left · Mar overdueRemCTL: Sep✓ All done for today.● build3● Fix login ● ⚑Jul · build✓● Fix login ● ⚑Jul · build✓● Fix login ● ⚑Jul · build✓● build3● Fix login ● ⚑Jul · build✓● Fix login ● ⚑Jul · build✓● Fix login ● ⚑Jul · build✓● build3● Fix login ● ⚑Jul · build✓● Fix login ● ⚑Jul · build✓● Fix login ● ⚑Jul · build✓Updated 14:32UndoRefresh
-
Ask Claude…TO graph› Fix login › Fix login › Fix loginScopeThis featureWhole projectHide done stepsReconnect
-
Ask Claude…Blast Radius⚠ Blast Radius · buildCommand npm testWould CancelProceed Proceed ProceedBash1 Proceed2 CancelClaude is waiting on your answer
-
Ask Claude…Agent Radar● Edit note · 2h 10m · 0 toolsnow: starting────────No messages yet.agent: (tool calls)agent: (tool calls)agent: (tool calls)Back bClose q