Baghdad99 commited on
Commit
d9741d3
·
1 Parent(s): 5dd0786

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -11,7 +11,7 @@ translation_model = AutoModelForSeq2SeqLM.from_pretrained("Baghdad99/saad-hausa-
11
  tts_tokenizer = AutoTokenizer.from_pretrained("Baghdad99/english_voice_tts")
12
  tts_model = AutoModelForTextToWaveform.from_pretrained("Baghdad99/english_voice_tts")
13
 
14
- # Define the translation and synthesis functions
15
  def translate(audio_signal, sampling_rate):
16
  inputs = asr_processor(audio_signal, return_tensors="pt", padding=True, sampling_rate=sampling_rate)
17
  logits = asr_model(inputs.input_values).logits
 
11
  tts_tokenizer = AutoTokenizer.from_pretrained("Baghdad99/english_voice_tts")
12
  tts_model = AutoModelForTextToWaveform.from_pretrained("Baghdad99/english_voice_tts")
13
 
14
+ # Modify the translate function to accept the sampling_rate argument
15
  def translate(audio_signal, sampling_rate):
16
  inputs = asr_processor(audio_signal, return_tensors="pt", padding=True, sampling_rate=sampling_rate)
17
  logits = asr_model(inputs.input_values).logits