Code Monkey home page Code Monkey logo

madhuragandhe / voice-assistant Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rishabhgupta03/voice-assistant

0.0 0.0 0.0 24 KB

a python based voice assistant that uses voice recognition, speech synthesis, and natural language processing (NLP) to provide a service through a particular application. This project provides an effective way to help someone with daily talks. It looks for entities to understand natural language and can help to do a variety of tasks hands-free

License: MIT License

Python 100.00%

voice-assistant's Introduction

Voice-Assistant

This is a simple virtual assistant written in Python 3.

Watch the video

Voice-Assistant Architecture

Virtual assistants are built from the following components:

  • Voice Activity Detection (VAD) - this determines when the user starts and stops speaking. Voice-Assistant uses the python SpeechRecognition module for VAD.
  • Speech to Text (STT) - This converts the audio that was recorded between when the VAD recognized that the user started speaking and when the user ended speaking. Voice-Assistant uses the default STT provider for the python SpeechRecognition module, which is currently a free online service from Google called "Google Speech Recognition". The SpeechRecognition module can also use Pocketsphinx for offline recognition.
  • Text to Intent - This takes the recognized text from the STT engine and figures out what action you want the assistant to perform. Usually the full recognized text is passed to the action to search for keywords. This is the bulk of what the digital_assistant method in the main.py script does.
  • Action - this performs some action based on the intent. It usually responds with a text message.
  • Text to Speech (TTS) - this converts text, usually returned by an action, to speech which is then played by the computer as a response.

Installation

Windows

Voice-Assistant runs well on Windows. For the easiest setup, you should probably download and install Anaconda and then use the conda command with the environment.yml file from the Anaconda prompt to create a virtual environment for yourself.

(base) C:\Projects\Voice-Assistant>conda env create -f environment.yml

To run voice assistant, activate the virtual environment from the Anaconda prompt and use python to run main.py:

(base) C:\Projects\Voice-Assistant>conda activate Voice-Assistant
(Voice-Assistant) C:\Projects\Voice-Assistant>python main.py

Linux

Voice-Assistant works well with Linux. It should run on a Raspberry Pi or other SBC or within Linux installed on a virtual machine like on VirtualBox.

Most Linux distros already have Python 3 installed.

You should always use Voice Assistant within a virtual environment, especially on Linux where system utilities are likely to be written in your system Python. Getting your system environment messed up when a required library gets changed is never fun.

On Debian derivatives like Ubuntu, Mint, Raspbian, etc. you can install a virtual environment using VirtualEnvWrapper:

~/Voice-Assistant $ sudo apt install virtualenvwrapper
~/Voice-Assistant $ echo ". /usr/share/virtualenvwrapper/virtualenvwrapper.sh" >> ~/.bashrc
~/Voice-Assistant $ . /usr/share/virtualenvwrapper/virtualenvwrapper.sh
~/Voice-Assistant $ mkvirtualenv -p /usr/bin/python3 Voice-Assistant
(Voice-Assistant) ~/Voice-Assistant $

You will probably need to install eSpeak and PortAudio. On Debian derivatives, these can be installed with:

~/Voice-Assistant $ sudo apt install portaudio19-dev libespeak-dev

then activate your virtual environment and use the requirements.txt file to load the required modules:

~/Voice-Assistant $ workon Voice-Assistant
(Voice-Assistant) ~/Voice-Assistant $ pip install -r requirements.txt

To run Voice-Assistant, you should activate the virtual environment, then use python to run the main.py script:

~/Voice-Assistant $ workon Voice-Assistant
(Voice-Assistant) ~/Voice-Assistant $ python main.py

voice-assistant's People

Contributors

rishabhgupta03 avatar aaronchantrill avatar achantrill avatar madhuragandhe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.