this project provides a fully local language assistant called berto. berto can listen to your audio, transcribe it using whisper, and then interact with you in spanish using an ai model served locally via ollama. it also has text-to-speech capabilities to provide audio responses. π£οΈ
- local transcription of spoken language using whisper. π€
- interaction with an ai model (llama 2 uncensored) served locally via ollama. π¦
- conversation options, including following up on questions related to science, history, and politics. β
- text-to-speech responses using edge tts. π
- audio playback of berto's responses. π§
first, you need to install the required packages. you can do this by running the following command to install all dependencies from the requirements.txt
file:
pip install -r requirements.txt
this project requires ollama to serve the ai model (llama2-uncensored
). you can download ollama from the Ollama website and install it on your local machine.
once installed, you need to download the model:
ollama run llama2-uncensored
make sure ollama is running on localhost:11434
to handle the requests.
to run the assistant, execute the following script:
python bertosito_chat.py
this will start a conversation with berto, who will transcribe your spoken audio and respond based on the conversation using the ai model hosted on ollama.
- recording audio: berto listens to your voice and transcribes it using whisper. π€
- generating responses: it sends your transcribed text to the ai model and generates a response. π¬
- text-to-speech: berto will convert the generated response to speech and play it back. π
- conversation options: the assistant presents multiple conversation options, including asking questions and following up on prior responses. π€
bertosito_chat.py
: the main script to run berto. π₯οΈresponse.mp3
andresponse.wav
: audio files generated during interaction. πΆrequirements.txt
: file containing all the necessary dependencies. πdemo.mp4
: demo video showcasing the app. π₯
- ensure that you have ollama running locally and the required models downloaded before starting the script. π οΈ
- the assistant only responds in spanish and expects interactions in the same language. πͺπΈ
- make sure to run ollama using the exact model name
llama2-uncensored
. π¦
enjoy interacting with berto! π