| name | stt-integration |
| description | Add or modify speech-to-text providers in assistant-api with transport-aware ingestion (WS/SDK/HTTP), transcript packet correctness, and UI/provider wiring. |
STT Integration Skill
Mission
Integrate STT providers that emit consistent interim/final transcripts, word interruption packets, and stt_latency_ms metrics.
Inputs expected from user
- Ingestion transport: WS, SDK callbacks, or HTTP chunks.
- Interim transcript requirements.
- Language/model constraints.
If missing:
- Use nearest transport baseline and preserve packet semantics.
Hard boundaries
In scope:
api/assistant-api/internal/transformer/<provider>/stt.go (+ helpers)
api/assistant-api/internal/transformer/transformer.go
- optional contract updates:
api/assistant-api/internal/type/stt_transformer.go, packet.go
- provider STT metadata and UI components
Out of scope:
- TTS-only internals
- telephony internals
- EOS/VAD algorithms
Packet contract
Input:
Required outputs:
SpeechToTextPacket interim/final
InterruptionPacket{Source:"word"} when available
ConversationEventPacket{Name:"stt", ...}
MessageMetricPacket{Name:"stt_latency_ms"} once per utterance
Implementation workflow
- Pick baseline (
deepgram, assembly-ai, azure, google, aws, sarvam).
- Implement provider package under transformer.
- Register in STT factory switch.
- Wire UI provider model/language config.
- Validate transcript ordering and context consistency.
- Add provider + integration tests.
Validation commands
go test ./api/assistant-api/internal/transformer/... -run TestSTT
go test ./api/assistant-api/internal/transformer/<provider>/...
cd ui && yarn test providers
./skills/stt-integration/scripts/validate.sh --check-diff --provider <provider>
References
references/checklist.md
references/stt-checklist.md
examples/sample.md