client
client ¶
AudioEval facade — main fixture interface.
AudioEval ¶
Pytest fixture facade: audioeval.stt / audioeval.tts / audioeval.samples.
create_sample
async
¶
create_sample(
text: str,
*,
lang: SampleLang = SampleLang.EN,
name: str | None = None,
target_rate: int = 16000,
tts_json: dict[str, Any] | None = None,
) -> AudioSample
Generate an AudioSample on-the-fly using the TTS service.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
text
|
str
|
Text to synthesize. |
required |
lang
|
SampleLang
|
Language tag for the sample. |
EN
|
name
|
str | None
|
Sample name (auto-generated from text if omitted). |
None
|
target_rate
|
int
|
Target sample rate in Hz (resampled from TTS output). |
16000
|
tts_json
|
dict[str, Any] | None
|
Full TTS payload override. If omitted, uses sensible defaults. |
None
|
Returns:
| Type | Description |
|---|---|
AudioSample
|
AudioSample ready for STT testing, auto-registered in the catalog. |