I created this ros package for voice recognition to use in a personal project. It uses VGGVOX keras model for creating speaker embeddings. For analysing the speech and providing the speaker intent, bot developed on wit.ai is used.
This package contains contains the following python scripts to add, enroll or delete users:
- create_user_dataset.py: to record or delete the datasets.
- enroll_speaker: to create the speaker embedding from dataset and save as pickle file
- listener.py: a ros node to continously listen for voices
- speaker_verification.py: a ros node to verify the speaker and connect to wit.ai for voice analysis and getting the response.
- Tensorflow
- Keras
- librosa
- Pyaudio
- wit
- scipy
Run the following line of code and follow the instruction
foo@bar:~$ python /path/to/create_user_dataset.py
To enroll(create embeddings) the new user run the following command with 'new' or to enroll all the speaker present in the dataset use 'full'
foo@bar:~$ python /path/to/enroll_speakers.py --add new/full
To delete the speaker embeddings and dataset run follow command in terminal. Replace speaker_name with the speaker name to delete.
foo@bar:~$ python /path/to/enroll_speakers.py --delete speaker_name
Do following modifications and run the launch file voice_launch.launch file.
- Add the users name in config/users_list.yaml for which the application has to accessed.
- Add the wit.ai access token in src/speaker_verification.py.
This package contains code and data from other github users and Stackoverflow answers which are mentioned below
- The voice recorder used in this project is taken from a Stackeoverflow answer written by user Primusa.
- Noice removal: the denoise.py script used in this package for noise removal has been written by Tim Sainburg.
- The VGGVOX keras model used for creating speaker embedding is trained by Linh Vu and used here.