TenzinGayche commited on
Commit
5f5648d
1 Parent(s): 4f18e92

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +1 -1
handler.py CHANGED
@@ -87,7 +87,7 @@ class EndpointHandler():
87
  # Create a unique temporary WAV file
88
  with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as temp_wav_file:
89
  temp_wav_path = temp_wav_file.name
90
- sf.write(temp_wav_path, speech.numpy(), 16000, 'PCM_24') # Use sf.write to write the WAV file
91
 
92
  # Read the WAV file and encode it as base64
93
  with open(temp_wav_path, "rb") as wav_file:
 
87
  # Create a unique temporary WAV file
88
  with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as temp_wav_file:
89
  temp_wav_path = temp_wav_file.name
90
+ sf.write(temp_wav_path, speech, 16000, 'PCM_24') # Use sf.write to write the WAV file
91
 
92
  # Read the WAV file and encode it as base64
93
  with open(temp_wav_path, "rb") as wav_file: