Logo Lanfrica

Jonnysol/Amharic-AI-Voice-Chatbot

Domaine:

natural language processing

Type de record:

software
Créateur:
Jon
Hôte:
Amharic voice AI assistant for Raspberry Pi, speech-to-text, LLM reasoning, and Ge'ez-script language access. Made with 💓 for the people of Ethiopia, my homeland 🕺 # Amharic AI Voice Chatbot on Raspberry Pi This project demonstrates how to create an Amharic AI chatbot that runs on a Raspberry Pi. It leverages Google Speech-to-Text for transcribing Amharic speech, Anthropic's Claude API for generating Amharic responses, and Google Text-to-Speech for synthesizing the responses into speech. ## Features - Real-time Amharic speech recognition and transcription - AI-generated Amharic responses using Anthropic's Claude API - Text-to-speech synthesis of Amharic responses - Continuous conversation loop with start/stop controls - Incremental output file naming for each conversation ## Requirements - Raspberry Pi 4 (8GB RAM recommended) - USB microphone - Speaker - Python 3.7+ - Google Cloud SDK - Anthropic API key - PyAudio - Pygame ## Installation 1. Clone this repository to your Raspberry Pi: ``` git clone github.com ``` 2. Install the required dependencies: ``` pip install google-cloud-speech google-cloud-texttospeech anthropic pyaudio pygame ``` 3. Set up your Google Cloud credentials: - Create a new project in the Google Cloud Console - Enable the Speech-to-Text and Text-to-Speech APIs - Download the service account key JSON file - Set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable to the path of the JSON file 4. Set up your Anthropic API key: - Sign up for an Anthropic API key - Replace `"your_anthropic_api_key"` in the code with your actual API key ## Usage 1. Connect your USB microphone and speaker to the Raspberry Pi. 2. Run the chatbot script: ``` python chatbot.py ``` 3. Press 'r' to start recording your Amharic speech. The chatbot will transcribe your speech, generate an Amharic response, and synthesize it into speech. 4. Press 'q' to stop the recording and trigger the response generation process. 5. Press 'e' to exit the chatbot. The generated audio files will be saved as `output_1.mp3`, `output_2.m …