feat: establish voice assistant V1 baseline

This commit is contained in:
2026-10-09 18:31:21 +00:00
commit cebcb3fd61
57 changed files with 9501 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
"""
Tests for the canonical Voice Assistant audio contract.
Purpose:
Verify that the Voice Core exposes the expected provider-independent
canonical audio format.
"""
import pytest
from pydantic import ValidationError
from voice_assistant.audio.models import (
AudioFormat,
CANONICAL_AUDIO_FORMAT,
)
def test_canonical_audio_format():
assert CANONICAL_AUDIO_FORMAT.encoding == "pcm_s16le"
assert CANONICAL_AUDIO_FORMAT.sample_rate == 16000
assert CANONICAL_AUDIO_FORMAT.channels == 1
def test_audio_format_rejects_unsupported_encoding():
with pytest.raises(ValidationError):
AudioFormat(
encoding="mp3",
sample_rate=16000,
channels=1,
)