CineAI commited on
Commit
05fa486
·
verified ·
1 Parent(s): 367c5c0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
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(a2t), " ", sys.getsizeof(text), " ", sys.getsizeof(response), " ", sys.getsizeof(llmchain))
32
  audio, _, duration = T2A(response).get_audio()
33
- autoplay(audio=audio, duration=duration)
34
- print(sys.getsizeof(audio), " ", sys.getsizeof(duration))
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