zanesmit29 commited on
Commit
b94ad4d
Β·
1 Parent(s): 18ec8eb

Initial commit

Browse files
Files changed (3) hide show
  1. README.md +47 -13
  2. app.py +22 -0
  3. requirements.txt +6 -0
README.md CHANGED
@@ -1,13 +1,47 @@
1
- ---
2
- title: Basic ASR
3
- emoji: πŸ“ˆ
4
- colorFrom: purple
5
- colorTo: green
6
- sdk: gradio
7
- sdk_version: 5.49.1
8
- app_file: app.py
9
- pinned: false
10
- short_description: Basic ASR application
11
- ---
12
-
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ASR Application
2
+
3
+ ## Overview
4
+ This is an Automatic Speech Recognition (ASR) application.
5
+
6
+ ## Features
7
+ - Speech-to-text conversion
8
+ - Audio file processing
9
+ - Real-time transcription support
10
+
11
+ ## Installation
12
+ ```bash
13
+ # Clone the repository
14
+ git clone <repository-url>
15
+ cd "ASR Application"
16
+
17
+ # Install dependencies
18
+ pip install -r requirements.txt
19
+ ```
20
+
21
+ ## Usage
22
+ ```bash
23
+ # Run the application
24
+ python app.py
25
+ ```
26
+
27
+ ## Requirements
28
+ - Python 3.x
29
+ - Required libraries (see `requirements.txt`)
30
+
31
+ ## Project Structure
32
+ ```
33
+ ASR Application/
34
+ β”œβ”€β”€ README.md
35
+ β”œβ”€β”€ requirements.txt
36
+ β”œβ”€β”€ app.py
37
+ └── ...
38
+ ```
39
+
40
+ ## License
41
+ [Specify your license]
42
+
43
+ ## Contributing
44
+ Contributions are welcome! Please open an issue or submit a pull request.
45
+
46
+ ## Contact
47
+ [Your contact information]
app.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+
3
+
4
+ import gradio as gr
5
+ from transformers import pipeline
6
+
7
+ asr = pipeline("automatic-speech-recognition", model="facebook/wav2vec2-base-100h")
8
+
9
+ def transcribe_audio(audio):
10
+ text = asr(audio)["text"]
11
+ return text
12
+
13
+ demo = gr.Interface(
14
+ fn=transcribe_audio,
15
+ inputs=gr.Audio(sources=["microphone"], type="filepath"),
16
+ outputs="text",
17
+ title="Speech-to-Text Transcription",
18
+ description="Record your voice and get the transcribed text using a pre-trained Wav2Vec2 model."
19
+ )
20
+
21
+ demo.launch(share=True)
22
+
requirements.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ gradio
2
+ transformers
3
+ torch
4
+ torchaudio
5
+
6
+