Giter Site home page Giter Site logo

speech_module_client's Introduction

#Research Project on Implementation of Speech Module on Ohmni Telepresence Robot

This documents serves as a complete description to setup and start a speech module on ohmni robot

Maintainer: Sharath Nataraj Email id: [email protected]

Filetree

src

Robot Setup

  • pull this repo into robot by using linux shell follow instructions from : https://docs.ohmnilabs.com/

  • cd speech_module

  • pip install -r src/requirements.txt

A google mail id has been created to manage multiple services for the robot

email id: [email protected]

password: Ohmni@123@iaas

This module allows you to choose between two wake word recognition models 1 and 2

1.Procupine Wake word Recognition Setup

launcing the Porcupine wake word

  • working with pre-trained models: rosrun porcupine_wake_word kai_wake_word.py --access_key 7segjTjkamk6oOQb/SLE8OBex4vHMdGxW+Z2cxX1EthTIJ13wNPnqg== --keyword_path path_to_extracted file/Hello-Kai_en_linux_v2_1_0.ppn
  • Custom trained model: rosrun porcupine_wake_word kai_wake_word.py --access_key access_key_generated_from the previous steps --keyword_path path_to_extracted file/Hello-Kai_en_linux_v2_1_0.ppn

2.Efficient Net Wake Word Recognition Setup

  • some extra requirements, pip install librosa && pip install ffmpeg
  • This repo also contains a pre-trained efficent-net model sample_refs/,
  • remember to change the directorty path of the pre-trained model in line 12 of effnet_word.py
  • it is also possible to train a new wake word using the instructions https://github.com/Ant-Brain/EfficientWord-Net#generating-custom-wakewords
  • simply replace json modle inside the sample_refs directory and change the directory path of newly trained model at line 12 of effnet_word.py
  • remember to run the wake word node before starting other nodes.
  • node can be started by rosrun efficient_wakeword effnet_word.py
  • rostopic pub -1 /eff_wake_word_status std_msgs/String "data: 'on'"

Next is the speech recognition models

by default this branch contains only vosk as STT model, switch to devel branch to find more models

Vosk Speech Recognition Engine

  • Vosk STT is pre-compiled with models and can be started easily with a simle command
  • rosrun vosk_ros vosk_node.py

Choosing Different NLU models

  • This repository provides two differet NLU models which can be choosen by choosing different launch files in launch/

1.Dialogflow Launch

2.RASA Launch

  • navigate to cogrob_chatbot/ and start the rasa server
  • rasa run -m models --endpoints endpoints.yml --port 5002 --credentials credentials.yml --enable-api
  • roslaunch vosk_ros start_rasa_service.lauch
  • this node is currently under development this can be used to get replies on the frontend but some features like apointment scheduling system and controlling IOT systems may not work, refer rasa docs to change intents and rules inside cogrob_chatbot/

Quick start

Robot Setup

  • contact [email protected] for dialogflow service key.
  • clone this repository onto the robo
  • add the service key to evironment using export GOOGLE_APPLICATION_CREDENTIALS='/path_to_doownloaded_file/service_key.json'
  • catkin_make
  • rosrun rosrun porcupine_wake_word kai_wake_word.py --access_key 7segjTjkamk6oOQb/SLE8OBex4vHMdGxW+Z2cxX1EthTIJ13wNPnqg== --keyword_path path_to_porcupine_model/Hello-Kai_en_linux_v2_1_0.ppn &
  • roslaunch vosk_ros start_dialogflow_service.launch
  • this starts all the required nodes for the operation

Local Setup

Configuring Dialogflow service

  • this configuration can be made from a host computer and not on ohmni robot
  • login to google dialogflow with the given credentials at the start of the readme file
  • install ngrok: https://ngrok.com/download
  • start ngrok service ngrok http 8000 this connects dialogflow with webhook.py application
  • copy the url generated and paste it in fullfilment section of dialogflow console with a route /webhook, the url looks like : www.example_url.com/webhook
  • save the changes
  • the console can be used to add changes to intents

Conecting to Home Assistant

  • Use the SD card provided with the deliverables, and insert it to Raspberry pi 4 with atleast 2GB of RAM, the SD card is configured to automatically connect to Service lab's WiFi. and boot Home Assistant.
  • Check the IP adddress of Raspberry pi and make a note of it
  • add the IP address of Raspberry pi in line 20 of webbhook.py and line 17 of mailer.py, mailer.py provides an example schema of how the employee database can be structured, more customization and development can be made to suite the needs.
  • start both the applications python3 webook.py and python3 mailer.py
  • setup of mailer.py is rather simple nacvigate to app passwords in google account setup and create a password with other application. copy and paste the password at line 15 of mailer.py
  • This ensures mails can be sent through this python script.

speech_module_client's People

Contributors

sharathbhushan avatar

Watchers

 avatar

Forkers

shillin123

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.