| | --- |
| | license: mit |
| | task_categories: |
| | - automatic-speech-recognition |
| | - text-to-speech |
| | language: |
| | - en |
| | - zh |
| | --- |
| | |
| | # audio-testing |
| |
|
| | ## Overview |
| |
|
| | This is a small, open dataset designed for quick validation of audio-related pipelines and applications, especially for **Text-to-Speech (TTS)** and **Speech-to-Text (STT)** systems. |
| | It provides a few short, diverse audio clips and corresponding text transcripts, allowing developers to verify input/output handling, audio processing, and transcription logic without downloading large datasets. |
| |
|
| | ## Contents |
| |
|
| | * 3 short audio samples (`.mp3`, `.wav`) |
| | * `metadata.jsonl` file containing text transcripts and file references |
| |
|
| | | Field | Type | Description | |
| | | ------- | ---------- | ----------------------- | |
| | | `audio` | audio file | Raw audio data | |
| | | `text` | string | Transcript of the audio | |
| |
|
| | ## Example Usage |
| |
|
| | ```typescript |
| | async function fetchAudio(url: string): Promise<{ |
| | data: Buffer; |
| | mimeType: string; |
| | }> { |
| | const response = await fetch(url); |
| | if (!response.ok) { |
| | throw new Error(`Failed to fetch audio: ${response.statusText}`); |
| | } |
| | const arrayBuffer = await response.arrayBuffer(); |
| | const data = Buffer.from(arrayBuffer); |
| | const mimeType = response.headers.get("content-type") || "audio/wav"; |
| | return { data, mimeType }; |
| | } |
| | |
| | const audioUrl = "https://huggingface.co/datasets/JacobLinCool/audio-testing/resolve/main/audio/audio-1.mp3"; |
| | const { data, mimeType } = await fetchAudio(audioUrl); |
| | const transcription = await transcribe(data, mimeType); |
| | const words = "this is a test audio generated by the model".split(" "); |
| | // pass if WER < 10% |
| | let matchCount = 0; |
| | for (const word of words) { |
| | if (transcription.includes(word)) { |
| | matchCount++; |
| | } |
| | } |
| | expect(matchCount / words.length).toBeGreaterThan(0.9); |
| | ``` |
| |
|
| | Ideal for verifying: |
| |
|
| | * TTS model output alignment with ground-truth text |
| | * STT transcription accuracy and error handling |
| | * Audio I/O integration in pipelines or apps |
| |
|
| | ## License |
| |
|
| | MIT License |