pwenker commited on
Commit
95fa1b9
·
1 Parent(s): 3eef870

chore: Fix HF space

Browse files
src/pronunciation_trainer/transcription.py CHANGED
@@ -18,7 +18,7 @@ class TranscriberChoice(str, Enum):
18
 
19
 
20
  def transcribe(
21
- audio, transcriber_choice: TranscriberChoice = TranscriberChoice.grapheme
22
  ):
23
  """
24
  The transcribe function takes a single parameter, audio, which is a numpy array of the audio the user recorded.
@@ -36,8 +36,8 @@ def transcribe(
36
 
37
 
38
  transcribe_to_phonemes = partial(
39
- transcribe, transcriber_choice=TranscriberChoice.phoneme
40
  )
41
  transcribe_to_graphemes = partial(
42
- transcribe, transcriber_choice=TranscriberChoice.grapheme
43
  )
 
18
 
19
 
20
  def transcribe(
21
+ audio, transcriber_choice: str,
22
  ):
23
  """
24
  The transcribe function takes a single parameter, audio, which is a numpy array of the audio the user recorded.
 
36
 
37
 
38
  transcribe_to_phonemes = partial(
39
+ transcribe, transcriber_choice="facebook/wav2vec2-lv-60-espeak-cv-ft"
40
  )
41
  transcribe_to_graphemes = partial(
42
+ transcribe, transcriber_choice= "openai/whisper-base.en"
43
  )