import gradio as gr from asr_openai import AutomaticSpeechRecognition from tts_elevenlabs import ElevenLabsTTS from falcon_7b_llm import Falcon_7b_llm import logging import os logging.basicConfig(level=logging.INFO) def delete_files_in_folder(folder_path): for filename in os.listdir(folder_path): file_path = os.path.join(folder_path, filename) # Check if it's a file (and not a directory) if os.path.isfile(file_path): os.remove(file_path) def generate_response(input_audio): sentence = asr.run_transcription(input_audio) # sentence = 'how are you?' print(sentence) llm_response = llm.get_llm_response(sentence['text']) output_audio = tts.tts_generate_audio(llm_response) # output_audio = tts.tts_generate_audio(sentence) chatbot_history.append(((input_audio,), (output_audio,))) return chatbot_history delete_files_in_folder('data//tts_responses') title = "