pwenker commited on
Commit
2304e59
·
1 Parent(s): 058ef51

chore: Fix HF space

Browse files
src/pronunciation_trainer/transcription.py CHANGED
@@ -24,7 +24,7 @@ def transcribe(
24
  The transcribe function takes a single parameter, audio, which is a numpy array of the audio the user recorded.
25
  The pipeline object expects this in float32 format,so we convert it first to float32, and then extract the transcribed text.
26
  """
27
- transcriber = pipeline("automatic-speech-recognition", model=transcriber_choice)
28
  try:
29
  sr, y = audio
30
  except TypeError:
 
24
  The transcribe function takes a single parameter, audio, which is a numpy array of the audio the user recorded.
25
  The pipeline object expects this in float32 format,so we convert it first to float32, and then extract the transcribed text.
26
  """
27
+ transcriber = pipeline("automatic-speech-recognition", model=transcriber_choice.value)
28
  try:
29
  sr, y = audio
30
  except TypeError: