File size: 2,024 Bytes
5d2a20b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
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