Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,9 +16,9 @@ model = None
|
|
| 16 |
|
| 17 |
# Load access code from HuggingFace Secrets or environment variable
|
| 18 |
# In HuggingFace Spaces, add a secret named "ACCESS_CODE" with value "sensei"
|
| 19 |
-
ACCESS_CODE = os.environ.get("ACCESS_CODE"
|
| 20 |
|
| 21 |
-
def load_model():
|
| 22 |
"""Load the Wav2Vec2 phoneme model and processor."""
|
| 23 |
global processor, model
|
| 24 |
|
|
@@ -159,11 +159,11 @@ with gr.Blocks(title="Phoneme Transcription App", theme=gr.themes.Soft()) as dem
|
|
| 159 |
with gr.Column(visible=False) as main_app:
|
| 160 |
gr.Markdown(
|
| 161 |
"""
|
| 162 |
-
#
|
|
|
|
| 163 |
|
| 164 |
Upload or record audio to get phoneme transcription in IPA (International Phonetic Alphabet) format.
|
| 165 |
-
|
| 166 |
-
**Model:** `facebook/wav2vec2-lv-60-espeak-cv-ft` (Multilingual - supports Spanish, English, and more)
|
| 167 |
"""
|
| 168 |
)
|
| 169 |
|
|
@@ -182,7 +182,7 @@ with gr.Blocks(title="Phoneme Transcription App", theme=gr.themes.Soft()) as dem
|
|
| 182 |
### 💡 Tips:
|
| 183 |
- Supports WAV, MP3, OGG, and other audio formats
|
| 184 |
- Audio will be automatically resampled to 16kHz
|
| 185 |
-
- Works best with clear speech
|
| 186 |
- Supports multiple languages including Spanish
|
| 187 |
"""
|
| 188 |
)
|
|
|
|
| 16 |
|
| 17 |
# Load access code from HuggingFace Secrets or environment variable
|
| 18 |
# In HuggingFace Spaces, add a secret named "ACCESS_CODE" with value "sensei"
|
| 19 |
+
ACCESS_CODE = os.environ.get("ACCESS_CODE")
|
| 20 |
|
| 21 |
+
def load_model():
|
| 22 |
"""Load the Wav2Vec2 phoneme model and processor."""
|
| 23 |
global processor, model
|
| 24 |
|
|
|
|
| 159 |
with gr.Column(visible=False) as main_app:
|
| 160 |
gr.Markdown(
|
| 161 |
"""
|
| 162 |
+
# Keywords Spotting (KWS)
|
| 163 |
+
## 🎙️ Phoneme Transcription with Wav2Vec2
|
| 164 |
|
| 165 |
Upload or record audio to get phoneme transcription in IPA (International Phonetic Alphabet) format.
|
| 166 |
+
The first use could be slower than subsequent uses.
|
|
|
|
| 167 |
"""
|
| 168 |
)
|
| 169 |
|
|
|
|
| 182 |
### 💡 Tips:
|
| 183 |
- Supports WAV, MP3, OGG, and other audio formats
|
| 184 |
- Audio will be automatically resampled to 16kHz
|
| 185 |
+
- Works best with clear speech (ideally)
|
| 186 |
- Supports multiple languages including Spanish
|
| 187 |
"""
|
| 188 |
)
|