Client side for my project jarvis-server
This repository has been archived on 2023-06-09. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
2021-08-01 10:40:38 +02:00
.idea Initial commit 2021-07-31 10:28:34 +02:00
jarvis Added flask server to the client and /play_raw_audio request 2021-08-01 10:40:38 +02:00
.gitignore Initial commit 2021-07-31 10:28:34 +02:00
LICENSE Initial commit 2021-07-31 10:24:22 +02:00
README.md Update readme to get rid of playsound and (buggy) PyGObject lib 2021-07-31 20:35:36 +02:00
requirements.txt Added flask server to the client and /play_raw_audio request 2021-08-01 10:40:38 +02:00

jarvis-client

Jarvis is a simple voice assistant for home automation and simplifying your life with voice commands. Written in Python, it uses a lot of open-source libraries like Adapt and Padatious from the Mycroft AI project.

This is only the client-side of Jarvis, you can download the server here .

Languages

It only supports french entirely for now, english is actively developed and will soon be available as well as a lot of others languages like german, spanish and more.

Compatiblity

The client should work on any platforms from Windows to Linux on ARM devices (raspberry pi 3/4) or x86 computers.

The client handle TTS (Text to Speech) and Wake Word.
It listens for the wake word (offline of course) and then send what you said after the wake word to the server that will use Google Speech to Text API (unfortunately no other API other than Google is good enough imo.) to convert your speech to text and then try to execute your request.

Installation

If not already installed, you will need Python 3.9, you can install it with these commands.

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt install python3.9 python3.9-dev python3.9-distutils
sudo apt-get install -y python3-dev libasound2-dev # required even if python is already installed

Install requirements

Run the command python -m pip3 install -r requirements.txt to install the basic requirements for the project.

Larynx TTS

Pre-built Debian packages are available for download.

There are three different kinds of packages, so you can install exactly what you want and no more:

  • larynx-tts_<VERSION>_<ARCH>.deb
    • Base Larynx code and dependencies (always required)
    • ARCH is one of amd64 (most desktops, laptops), armhf (32-bit Raspberry Pi), arm64 (64-bit Raspberry Pi)
  • larynx-tts-lang-<LANG>_<VERSION>_all.deb
    • Language-specific data files (at least one required)
    • See above for a list of languages
  • larynx-tts-voice-<VOICE>_<VERSION>_all.deb
    • Voice-specific model files (at least one required)
    • See samples to decide which voice(s) to choose

As an example, let's say you want to use the "harvard-glow_tts" voice for English on an amd64 laptop for Larynx version 0.4.0. You would need to download these files:

  1. larynx-tts_0.4.0_amd64.deb
  2. larynx-tts-lang-en-us_0.4.0_all.deb
  3. larynx-tts-voice-en-us-harvard-glow-tts_0.4.0_all.deb

Once downloaded, you can install the packages all at once with:

sudo apt install \
  ./larynx-tts_0.4.0_amd64.deb \
  ./larynx-tts-lang-en-us_0.4.0_all.deb \
  ./larynx-tts-voice-en-us-harvard-glow-tts_0.4.0_all.deb \
  sox

You will need to install gruut aswell, follow the instructions here
(e.g to install french support do pip install gruut[fr])

Errors

Common errors than I personally encoured during this project, hope this can help you.

Error during installation of PyAudio:

Do the following command sudo apt-get install portaudio19-dev python-pyaudio
Source