Skip to main content

A python library for wake-word detection on low end devices.

Project description

vbsoundinference is based of an algorithm i invented called VSI for wake work detection on CPUs.

To use vbsoundinference, first collect your custom wake word data using vsi.recorder.

from vsi.recorder import Recorder # import the Recorder class

recorder = Recorder() # create the Recorder object

recorder.record_class(n_recordings=10, class_number=0, duration=1, num_samples=512, # record class 0
                      dataset_file="test_dataset.txt", append=False)

vbsoundinference will store all the training data in one file. e.g-dataset.txt.

The append argument will append the recorded data to the dataset instead of deleting the previous data.

To train the model, use vsi.trainer.

from vsi.trainer import Trainer # import the Trainer class

trainer = Trainer(dataset_file_path="test_dataset.txt") # create the Trainer object

trainer.load_dataset() # load the dataset
trainer.train(epochs=100, save_path="model.pth") # train and save the model

To use the model, use vsi.vsi.

from vsi.vsi import VSI # import the VSI class
from vsi.recorder import Recorder # import the Recorder class

vsi = VSI() # create the VSI object
recorder = Recorder() # create the Recorder object

while True: # infinite loop
    recording = recorder.record_sample() # record a sample
    
    prediction = vsi.predict(recording.recording) # get the model's prediction
    
    print(prediction)

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

vbsoundinference-1.0.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vbsoundinference-1.0.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vbsoundinference-1.0.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for vbsoundinference-1.0.0.tar.gz
Algorithm Hash digest
SHA256 cc1e0d4858db49e4ab1f24d2b52f32efbe48994689983ae85b3a79c2746ccefa
MD5 33c3622867e9e3b788d30178798510ce
BLAKE2b-256 d8b8f2627d996e490d1250bb71e4d6238e4dca28249d5695a90a423ed41828c2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vbsoundinference-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 35a229c4e0c07d6fbbdbaedbcff3e720a252769d66f71331ec6b3dce09b34bb1
MD5 0fd5835f9e498e702220ee7f74efd128
BLAKE2b-256 08b0c71f40009213134c2ef54dffc0c09ce236ec6b4e19024d7fe9fc543b89c2

See more details on using hashes here.

Supported by

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