Politrees commited on
Commit
24fd9c5
1 Parent(s): 988389b

Update steganography.py

Browse files
Files changed (1) hide show
  1. steganography.py +3 -3
steganography.py CHANGED
@@ -79,9 +79,9 @@ def image_to_spectrogram_audio(image_path, sr=22050):
79
  image = Image.open(image_path).convert('L')
80
  image = np.array(image)
81
  y = spectrogram_image_to_audio(image, sr)
82
- audio_path = 'image_to_audio_output.wav'
83
- sf.write(audio_path, y, sr)
84
- return audio_path
85
 
86
  # Gradio interface
87
  with gr.Blocks(title='Audio Steganography', theme=gr.themes.Soft(primary_hue="green", secondary_hue="green", spacing_size="sm", radius_size="lg")) as iface:
 
79
  image = Image.open(image_path).convert('L')
80
  image = np.array(image)
81
  y = spectrogram_image_to_audio(image, sr)
82
+ img2audio_path = 'image_to_audio_output.wav'
83
+ sf.write(img2audio_path, y, sr)
84
+ return img2audio_path
85
 
86
  # Gradio interface
87
  with gr.Blocks(title='Audio Steganography', theme=gr.themes.Soft(primary_hue="green", secondary_hue="green", spacing_size="sm", radius_size="lg")) as iface: