A fully localized, GPU-accelerated acoustic pipeline for clinical and enterprise workloads. Whisper STT, a local extraction model, and Piper TTS — all running on hardware you control. 100% HIPAA compliant. Zero third-party API leakage.
Every call rides a single round trip through hardware you own — no hop ever touches a third-party API.
Twilio connects over a bidirectional WebSocket and starts sending audio frames.
event: start20ms G.711 µ-law frames are decoded to PCM16 and handed to CUDA-Whisper.
160B / 20msWhisper.cpp transcribes in real time on local GPU — nothing leaves the node.
whisper.cpp + CUDAThe transcript is extracted to structured JSON, then Piper TTS speaks the reply.
/v1/extractMulaw frames return over the same socket. A mid-sentence interruption flushes the queue instantly.
event: clearwss://explorer-api.exergynet.org/media-stream
Establish a bidirectional Twilio <Connect><Stream>
over WebSocket. The server ingests mulaw audio frames, transcribes via CUDA-Whisper,
extracts structured intent, synthesizes TTS, and streams mulaw frames back — all within 1.24s average.
Authorization: Bearer <key> Upgrade: websocket Connection: Upgrade
wscat -c "wss://explorer-api.exergynet.org/media-stream" \
-H "Authorization: Bearer $EXERGYNET_API_KEY"
# Then send start event:
# { "event": "start", "streamSid": "MZ...",
# "mediaFormat": { "encoding": "audio/x-mulaw",
# "sampleRate": 8000, "channels": 1 } }
import WebSocket from 'ws';
const ws = new WebSocket(
'wss://explorer-api.exergynet.org/media-stream',
{ headers: { Authorization: `Bearer ${process.env.EXERGYNET_API_KEY}` } }
);
ws.on('open', () => {
ws.send(JSON.stringify({
event: 'start',
streamSid: 'MZ_your_sid',
mediaFormat: { encoding: 'audio/x-mulaw', sampleRate: 8000, channels: 1 },
}));
});
ws.on('message', (data) => {
const frame = JSON.parse(data.toString());
if (frame.event === 'media') {
const audio = Buffer.from(frame.media.payload, 'base64');
// pipe audio → speaker
}
});
import asyncio, websockets, json, base64
API_KEY = "sk-exergy-..."
async def stream():
uri = "wss://explorer-api.exergynet.org/media-stream"
headers = {"Authorization": f"Bearer {API_KEY}"}
async with websockets.connect(uri, extra_headers=headers) as ws:
await ws.send(json.dumps({
"event": "start", "streamSid": "MZ_your_sid",
"mediaFormat": {"encoding": "audio/x-mulaw",
"sampleRate": 8000, "channels": 1},
}))
async for message in ws:
frame = json.loads(message)
if frame["event"] == "media":
audio = base64.b64decode(frame["media"]["payload"])
asyncio.run(stream())
POST https://explorer-api.exergynet.org/v1/extract
Pass raw clinical text and a typed schema. The extractor returns structured JSON with per-field confidence scores and clarification flags. No conversational prose leaks. Bypasses chat mode entirely.
Authorization: Bearer <key> Content-Type: application/json
curl -X POST https://explorer-api.exergynet.org/v1/extract \
-H "Authorization: Bearer $EXERGYNET_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "Patient denies smoking. BP 150/95.",
"schema": {
"smoking_status": "boolean",
"blood_pressure": "string"
},
"domain": "clinical"
}'
const res = await fetch(
'https://explorer-api.exergynet.org/v1/extract',
{
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.EXERGYNET_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
text: 'Patient denies smoking. BP 150/95.',
schema: { smoking_status: 'boolean', blood_pressure: 'string' },
domain: 'clinical',
}),
}
);
const { extraction } = await res.json();
// extraction.smoking_status === false
// extraction.blood_pressure === "150/95"
import requests
resp = requests.post(
"https://explorer-api.exergynet.org/v1/extract",
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json",
},
json={
"text": "Patient denies smoking. BP 150/95.",
"schema": {"smoking_status": "boolean", "blood_pressure": "string"},
"domain": "clinical",
},
)
data = resp.json()
# {'smoking_status': False, 'blood_pressure': '150/95'}