Shubham09 commited on
Commit
530137f
·
1 Parent(s): aa79d2d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -25,7 +25,7 @@ def load_data(input_file):
25
  speech = librosa.resample(speech, sample_rate,16000)
26
  return speech
27
  def write_to_file(input_file):
28
- scipy.io.wavfile.write("microphone-results.wav")
29
  # with open("microphone-results.wav", "wb") as f:
30
  # f.write(input_file.get_wav_data())
31
  # import base64
@@ -39,8 +39,8 @@ def write_to_file(input_file):
39
  # return (' '.join([s.replace(s[0],s[0].capitalize(),1) for s in sentences]))
40
  pipe = pipeline(model="Shubham09/whisper31filescheck") # change to "your-username/the-name-you-picked"
41
 
42
- def asr_transcript(input_file="microphone-results.wav"):
43
- text = pipe("microphone-results.wav")["text"]
44
  return text
45
 
46
  # speech = load_data(input_file)
 
25
  speech = librosa.resample(speech, sample_rate,16000)
26
  return speech
27
  def write_to_file(input_file):
28
+ scipy.io.wavfile.write("microphone-result.wav")
29
  # with open("microphone-results.wav", "wb") as f:
30
  # f.write(input_file.get_wav_data())
31
  # import base64
 
39
  # return (' '.join([s.replace(s[0],s[0].capitalize(),1) for s in sentences]))
40
  pipe = pipeline(model="Shubham09/whisper31filescheck") # change to "your-username/the-name-you-picked"
41
 
42
+ def asr_transcript(input_file="microphone-result.wav"):
43
+ text = pipe("microphone-result.wav")["text"]
44
  return text
45
 
46
  # speech = load_data(input_file)