Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ from streamlit_mic_recorder import mic_recorder
|
|
13 |
|
14 |
llmchain = LLM_chain()
|
15 |
|
16 |
-
def autoplay(audio: bytes, duration: float, wait: bool=True
|
17 |
if audio:
|
18 |
audio_bytes = audio
|
19 |
duration = duration
|
@@ -28,11 +28,12 @@ def main():
|
|
28 |
a2t = A2T(mic["bytes"])
|
29 |
text = a2t.predict()
|
30 |
response = llmchain(entity=text, id=0)
|
31 |
-
print(sys.getsizeof(
|
32 |
audio, _, duration = T2A(response).get_audio()
|
33 |
-
autoplay(audio=audio, duration=duration)
|
34 |
-
print(sys.getsizeof(audio)
|
35 |
del response
|
|
|
36 |
|
37 |
|
38 |
|
|
|
13 |
|
14 |
llmchain = LLM_chain()
|
15 |
|
16 |
+
def autoplay(audio: bytes, duration: float, wait: bool=True):
|
17 |
if audio:
|
18 |
audio_bytes = audio
|
19 |
duration = duration
|
|
|
28 |
a2t = A2T(mic["bytes"])
|
29 |
text = a2t.predict()
|
30 |
response = llmchain(entity=text, id=0)
|
31 |
+
print(sys.getsizeof(response))
|
32 |
audio, _, duration = T2A(response).get_audio()
|
33 |
+
autoplay(audio=audio, duration=duration, wait=False)
|
34 |
+
print(sys.getsizeof(audio))
|
35 |
del response
|
36 |
+
del audio
|
37 |
|
38 |
|
39 |
|