This project enables hands-free voice interactions through a local installation of the Llama2 language model. Users can provide voice commands, which are then processed by Llama2 for natural language understanding. The textual responses are converted into speech using the "edge-tts" tool, and the generated audio is played back sequentially.
Ensure you have the following Python libraries and tools installed:
- ollama
- gtts:
pip install gtts
- pygame:
pip install pygame
- langchain:
pip install langchain
- speech_recognition:
pip install SpeechRecognition
-
Clone the Repository:
git clone https://github.com/Marvin-VW/python-ollama-local/blob/main/main.py cd voice-interaction-project
-
Install Dependencies:
pip install -r requirements.txt
-
Run the Script:
python voice_interaction.py
- Captures voice commands from the microphone.
- Utilizes local Llama2 for natural language processing.
- Converts textual responses to speech using "edge-tts."
- Sequential playback of generated audio files.
Feel free to contribute to the project by opening issues or submitting pull requests.
This project is licensed under the MIT License.