File size: 1,069 Bytes
d5436e0 cab263c 1581bbf d5436e0 8685a84 d5436e0 f8dfb0f d63135e d5436e0 8685a84 d5436e0 c57fded d5436e0 42bce02 2980190 42b403c d5436e0 cd60f99 5cabd9c d5436e0 a2c9028 8685a84 4affef3 d5436e0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# version - ArcticMonkey:19.03.24:1743
import psutil
# components from other authors
from streamlit_mic_recorder import mic_recorder
# core modules
from audio_processing.A2T import A2T
from audio_processing.T2A import T2A
from command.utils import build_chain
from llm.llm_factory import LLM_Factory
llm_model = LLM_Factory()
trigger = {"lc": "small"}
def prepare_cor(input_text: str):
return build_chain.build_command_chain().handle_command(input_text)
def main():
mic = mic_recorder(start_prompt="Record", stop_prompt="Stop", just_once=True)
if mic is not None:
a2t = A2T(mic["bytes"])
text = a2t.predict()
print(text)
# prepare_cor(input_text=text)
llm = llm_model.create_llm(prompt_entity=text, prompt_id=1, trigger=trigger)
response = llm.execution() if llm is not None else "Oops occurred some error. Please try again"
t2a = T2A(response)
t2a.autoplay()
if __name__ == "__main__":
print('RAM memory % used:', psutil.virtual_memory()[2]) # ~ 94 GB full memory
main()
|