goctests0 commited on
Commit
83c99ca
·
verified ·
1 Parent(s): 9f4261a

Upload stt.py

Browse files
Files changed (1) hide show
  1. stt.py +5 -4
stt.py CHANGED
@@ -9,14 +9,15 @@ import whisper
9
  _model = None
10
 
11
  # Maps the app's language selection to Whisper's language codes.
12
- # Whisper has no dedicated Nigerian Pidgin code, so Pidgin is passed as
13
- # English, since Pidgin is close enough to English that this gives Whisper
14
- # the best chance of an accurate transcription.
 
15
  LANGUAGE_MAP = {
16
  "english": "en",
17
  "yoruba": "yo",
18
  "hausa": "ha",
19
- "igbo": "ig",
20
  "pidgin": "en",
21
  }
22
 
 
9
  _model = None
10
 
11
  # Maps the app's language selection to Whisper's language codes.
12
+ # Whisper supports Yoruba ("yo") and Hausa ("ha") natively.
13
+ # Igbo has no Whisper language code, so it falls back to English,
14
+ # same as Pidgin. Both are close enough to romanized Latin script
15
+ # that Whisper can still produce a usable transcription.
16
  LANGUAGE_MAP = {
17
  "english": "en",
18
  "yoruba": "yo",
19
  "hausa": "ha",
20
+ "igbo": "en",
21
  "pidgin": "en",
22
  }
23