Commit
·
60e163b
1
Parent(s):
a0ee47f
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,14 @@ def calculate(image_in, audio_in):
|
|
36 |
|
37 |
def one_shot(image_in,audio_in,gender):
|
38 |
if gender == "Female":
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
def run():
|
42 |
with block:
|
|
|
36 |
|
37 |
def one_shot(image_in,audio_in,gender):
|
38 |
if gender == "Female":
|
39 |
+
tts = gTTS("Hello i am john")
|
40 |
+
with tempfile.NamedTemporaryFile(suffix='.mp3', delete=False) as f:
|
41 |
+
tts.write_to_fp(f)
|
42 |
+
f.seek(0)
|
43 |
+
sound = AudioSegment.from_file(f.name, format="mp3")
|
44 |
+
sound.export("/content/audio.wav", format="wav")
|
45 |
+
|
46 |
+
return calculate(image_in,"/content/audio.wav")
|
47 |
|
48 |
def run():
|
49 |
with block:
|