Commit
·
0a6a0a7
1
Parent(s):
b0155f6
Update app.py
Browse files
app.py
CHANGED
@@ -33,13 +33,13 @@ 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 |
-
|
37 |
waveform, sample_rate = torchaudio.load("/content/audio.wav")
|
38 |
torchaudio.save("/content/audio.wav", waveform, sample_rate, encoding="PCM_S", bits_per_sample=16)
|
39 |
image = Image.open(image_in)
|
40 |
image = pad_image(image)
|
41 |
image.save("/content/image_pre.png")
|
42 |
-
print("
|
43 |
return "/content/audio.wav"
|
44 |
exit()
|
45 |
pocketsphinx_run = subprocess.run(['pocketsphinx', '-phone_align', 'yes', 'single', '/content/audio.wav'], check=True, capture_output=True)
|
|
|
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 |
waveform, sample_rate = torchaudio.load("/content/audio.wav")
|
38 |
torchaudio.save("/content/audio.wav", waveform, sample_rate, encoding="PCM_S", bits_per_sample=16)
|
39 |
image = Image.open(image_in)
|
40 |
image = pad_image(image)
|
41 |
image.save("/content/image_pre.png")
|
42 |
+
print("Print 2")
|
43 |
return "/content/audio.wav"
|
44 |
exit()
|
45 |
pocketsphinx_run = subprocess.run(['pocketsphinx', '-phone_align', 'yes', 'single', '/content/audio.wav'], check=True, capture_output=True)
|