Skip to main content

alwakeupword explicitly request the attention of a computer using a wake up word and also allows user to make dataset and train a model of their own wake up word.

Project description

alwakeupword

alwakeupword explicitly request the attention of a computer using a wake up word and also allows user to train model of their own wake up word.

Installation

You can install alwakeupword from PyPI: pip install alwakeupword.

The alwakeupword supports Python 3.6 and above.

Usage

Step 1: AlWakeUpWordDataPreparation.py

Following query on command line will help you to create a dataset for your own wake up word:

For recording wake up word

alwakeupword -c makeData -r recordAudio -rad "./audio" -n 200

Note: Here, -rad and -n are set to default values of ./audio in alwakeupword package path and 200 respectively.

For recording background audio

alwakeupword -c makeData -r recordBackgroundAudio -rbad "./backgroundAudio" -n 200

Note: Here, -rbad and -n are set to default values of ./backgroundAudio in alwakeupword package path and 200 respectively.

Step 2: AlWakeUpWordDataPreprocessing.py

Following query on command line will help you to preprocess the dataset you have created:

alwakeupword -c processData -rad "./audio" -rbad "./backgroundAudio"

Note: Here, -rad and -rbad are set to default values of ./audio and ./backgroundAudio in alwakeupword package path respectively.

Step 3: AlWakeUpWordTrainer.py

Following query on command line will help you to train the preprocess data and to create a model:

alwakeupword -c trainData -mp "./savedModel/model.h5"

Note: Here, -mp is set to default value of ./savedModel/model.h5 in alwakeupword package path.

Step 4: AlWakeUpWordPrediction.py

Following query on command line will help you to predict the accuracy of model and to detect if word is wake up word or not:

alwakeupword -c predictWord -mp "./savedModel/model.h5"

Note: Here, -mp is set to default value of ./savedModel/model.h5 in alwakeupword package path.

Step 5: AlWakeUpWord.py

Following example.py will show you how to use wakeUpWord() function from AlWakeUpWord.py file to your scripts:

"""
# example.py
from alwakeupword.AlWakeUpWord import wakeUpWord

modelPath = '{Path of your wake up  word model}'
while True:
    wakeUpWord(modelPath)
    print('Wake up word detected')
"""
"""
Output: When you run the file it will wait for your response. When you utter the wake up word then only 'Wake up word detected' will be printed in the console. 
"""

Note: Here, if you saved your model in the default path while training data then you don't have to give modelPath parameter to wakeUpWord() function as it is already set to default path.

License

© 2022 Alankar Singh

This repository is licensed under the MIT license. See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

alwakeupword-1.0.0.tar.gz (37.6 MB view details)

Uploaded Source

Built Distribution

alwakeupword-1.0.0-py3-none-any.whl (44.6 MB view details)

Uploaded Python 3

File details

Details for the file alwakeupword-1.0.0.tar.gz.

File metadata

  • Download URL: alwakeupword-1.0.0.tar.gz
  • Upload date:
  • Size: 37.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.2

File hashes

Hashes for alwakeupword-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c1b03e84a2a9a5230cb3d33abb3e18bf2ef343d3f25f690ac76cf2c39a6142ed
MD5 cbaa7c4c07a68fcbdce29d8ee675bf26
BLAKE2b-256 14f2639fdf292c6fcdb8cb5de7853ab03a23abe7e0689e40728de51996c8fd42

See more details on using hashes here.

File details

Details for the file alwakeupword-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: alwakeupword-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 44.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.2

File hashes

Hashes for alwakeupword-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cf16124f3fb2018b58696339d81d5cc9caaaf177dcf6ae8735adf7113b8fdf1f
MD5 7a8f53cc2aea81f711d1c88f226e8731
BLAKE2b-256 c685c98bdc5875b5259df000e7465accfeea59220ef7dc2e5dccaac309adcd8a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page