JacobLinCool commited on
Commit
5d2a20b
·
verified ·
1 Parent(s): 8051760

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +67 -3
README.md CHANGED
@@ -1,3 +1,67 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ task_categories:
4
+ - automatic-speech-recognition
5
+ - text-to-speech
6
+ language:
7
+ - en
8
+ - zh
9
+ ---
10
+
11
+ # audio-testing
12
+
13
+ ## Overview
14
+
15
+ 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.
16
+ 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.
17
+
18
+ ## Contents
19
+
20
+ * 3 short audio samples (`.mp3`, `.wav`)
21
+ * `metadata.jsonl` file containing text transcripts and file references
22
+
23
+ | Field | Type | Description |
24
+ | ------- | ---------- | ----------------------- |
25
+ | `audio` | audio file | Raw audio data |
26
+ | `text` | string | Transcript of the audio |
27
+
28
+ ## Example Usage
29
+
30
+ ```typescript
31
+ async function fetchAudio(url: string): Promise<{
32
+ data: Buffer;
33
+ mimeType: string;
34
+ }> {
35
+ const response = await fetch(url);
36
+ if (!response.ok) {
37
+ throw new Error(`Failed to fetch audio: ${response.statusText}`);
38
+ }
39
+ const arrayBuffer = await response.arrayBuffer();
40
+ const data = Buffer.from(arrayBuffer);
41
+ const mimeType = response.headers.get("content-type") || "audio/wav";
42
+ return { data, mimeType };
43
+ }
44
+
45
+ const audioUrl = "https://huggingface.co/datasets/JacobLinCool/audio-testing/resolve/main/audio/audio-1.mp3";
46
+ const { data, mimeType } = await fetchAudio(audioUrl);
47
+ const transcription = await transcribe(data, mimeType);
48
+ const words = "this is a test audio generated by the model".split(" ");
49
+ // pass if WER < 10%
50
+ let matchCount = 0;
51
+ for (const word of words) {
52
+ if (transcription.includes(word)) {
53
+ matchCount++;
54
+ }
55
+ }
56
+ expect(matchCount / words.length).toBeGreaterThan(0.9);
57
+ ```
58
+
59
+ Ideal for verifying:
60
+
61
+ * TTS model output alignment with ground-truth text
62
+ * STT transcription accuracy and error handling
63
+ * Audio I/O integration in pipelines or apps
64
+
65
+ ## License
66
+
67
+ MIT License