Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -308,8 +308,8 @@ def encode_and_generate_audio(text):
|
|
308 |
"""
|
309 |
try:
|
310 |
# Delete the input and output files if they exist
|
311 |
-
delete_file(input_file)
|
312 |
-
delete_file(output_file)
|
313 |
|
314 |
# Convert the text to a binary string
|
315 |
binary_string_to_send = text_to_binary(text)
|
@@ -318,7 +318,7 @@ def encode_and_generate_audio(text):
|
|
318 |
signal = binary_to_signal(binary_string_to_send)
|
319 |
|
320 |
# Write the signal to an audio file
|
321 |
-
write('
|
322 |
|
323 |
# Apply the bandpass filter to the audio data and write the filtered data to an output file
|
324 |
filtered()
|
|
|
308 |
"""
|
309 |
try:
|
310 |
# Delete the input and output files if they exist
|
311 |
+
#delete_file(input_file)
|
312 |
+
#delete_file(output_file)
|
313 |
|
314 |
# Convert the text to a binary string
|
315 |
binary_string_to_send = text_to_binary(text)
|
|
|
318 |
signal = binary_to_signal(binary_string_to_send)
|
319 |
|
320 |
# Write the signal to an audio file
|
321 |
+
write('input_text.wav', 44100, signal.astype(np.int16))
|
322 |
|
323 |
# Apply the bandpass filter to the audio data and write the filtered data to an output file
|
324 |
filtered()
|