Baghdad99 commited on
Commit
ab7bc1a
1 Parent(s): e7d026a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -51,8 +51,8 @@ def translate_speech(audio):
51
  return
52
 
53
  # Define the max_range variable
54
- max_range = 32767 # You can adjust this value based on your requirements
55
- synthesised_speech = (synthesised_speech_data * max_range).astype(np.int16)
56
 
57
  return 16000, synthesised_speech
58
 
 
51
  return
52
 
53
  # Define the max_range variable
54
+ max_range = 1.0 # You can adjust this value based on your requirements
55
+ synthesised_speech = (synthesised_speech_data * max_range).astype(np.float32)
56
 
57
  return 16000, synthesised_speech
58