feat: speech-to-text for pi via NVIDIA Speech NIM realtime ASR

- asr_transcribe / asr_health tools + the /asr command, with live partials,
  per-word timings, transcript export and TUI rendering
- zero-dependency realtime client (https + Node 22 global WebSocket):
  mint transcription session -> subprotocol handshake -> event loop -> quiescence
- decodes anything ffmpeg supports (and native 16k mono/stereo pcm16/pcm_f32le wav)
  to the 16 kHz mono PCM16 the NIM mandates
- credentials via ASR_API_KEY / ASR_NIM_URL or ~/.pi/agent/asr.json; never in source
- README documents the six places the published API reference diverges from the
  deployed protocol (commit vs done, cumulative deltas, double .completed,
  HTTP 403 at upgrade, ?token= not rejected, model reset on session.update)
This commit is contained in:
iulianp committed 2026-09-09 18:05:31 +03:00
commit 19faa8b088
5 files changed
+893

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
{
"name": "pi-asr",
"version": "0.1.0",
"description": "Speech-to-text for the pi coding agent: asr_transcribe / asr_health tools and the /asr command, backed by an NVIDIA Speech NIM realtime streaming ASR endpoint (Parakeet/Nemotron).",
"keywords": [
"pi-package",
"pi-extension",
"asr",
"speech-to-text",
"transcription",
"nvidia-nim",
"streaming-asr"
],
"type": "module",
"peerDependencies": {
"@mariozechner/pi-ai": "*",
"@mariozechner/pi-coding-agent": "*",
"@mariozechner/pi-tui": "*",
"@sinclair/typebox": "*"
},
"pi": {
"extensions": [
"./extensions"
]
},
"engines": {
"node": ">=22"
}
}