Commit
·
5eb04d0
1
Parent(s):
9c19d54
Update app.py
Browse files
app.py
CHANGED
@@ -33,10 +33,9 @@ def one_shot(image,input_text,gender):
|
|
33 |
f.seek(0)
|
34 |
sound = AudioSegment.from_file(f.name, format="mp3")
|
35 |
sound.export("/content/audio.wav", format="wav")
|
36 |
-
print("Print 1")
|
37 |
-
return "/content/audio.wav"
|
38 |
waveform, sample_rate = torchaudio.load("/content/audio.wav")
|
39 |
torchaudio.save("/content/audio.wav", waveform, sample_rate, encoding="PCM_S", bits_per_sample=16)
|
|
|
40 |
image = Image.open(image_in)
|
41 |
image = pad_image(image)
|
42 |
image.save("/content/image_pre.png")
|
|
|
33 |
f.seek(0)
|
34 |
sound = AudioSegment.from_file(f.name, format="mp3")
|
35 |
sound.export("/content/audio.wav", format="wav")
|
|
|
|
|
36 |
waveform, sample_rate = torchaudio.load("/content/audio.wav")
|
37 |
torchaudio.save("/content/audio.wav", waveform, sample_rate, encoding="PCM_S", bits_per_sample=16)
|
38 |
+
return "/content/audio.wav"
|
39 |
image = Image.open(image_in)
|
40 |
image = pad_image(image)
|
41 |
image.save("/content/image_pre.png")
|