pvporcupinedemo


Namepvporcupinedemo JSON
Version 3.0.2 PyPI version JSON
download
home_pagehttps://github.com/Picovoice/porcupine
SummaryPorcupine wake word engine demos
upload_time2024-01-30 21:39:32
maintainer
docs_urlNone
authorPicovoice
requires_python>=3.5
license
keywords wake word engine hotword detection keyword spotting wake word detection voice commands
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Porcupine Wake Word Engine Demos

Made in Vancouver, Canada by [Picovoice](https://picovoice.ai)

This package contains demos and commandline utilities for processing real-time audio (i.e. microphone) and audio files
using Porcupine wake word engine.

## Porcupine

Porcupine is a highly-accurate and lightweight wake word engine. It enables building always-listening voice-enabled
applications. It is

- using deep neural networks trained in real-world environments.
- compact and computationally-efficient making it perfect for IoT.
- scalable. It can detect multiple always-listening voice commands with no added CPU/memory footprint.
- self-service. Developers can train custom wake phrases using [Picovoice Console](https://console.picovoice.ai/).

## Compatibility

- Python 3.5+
- Runs on Linux (x86_64), Mac (x86_64 and arm64), Windows (x86_64), Raspberry Pi (all variants), NVIDIA Jetson (Nano), and BeagleBone.

## Installation

```console
sudo pip3 install pvporcupinedemo
```

## AccessKey

Porcupine requires a valid Picovoice `AccessKey` at initialization. `AccessKey` acts as your credentials when using Porcupine SDKs.
You can get your `AccessKey` for free. Make sure to keep your `AccessKey` secret.
Signup or Login to [Picovoice Console](https://console.picovoice.ai/) to get your `AccessKey`.

## Usage

### Microphone Demo

It opens an audio stream from a microphone and detects utterances of a given wake word. The following opens the default
microphone and detects occurrences of "Picovoice".

```console
porcupine_demo_mic --access_key ${ACCESS_KEY} --keywords picovoice
```

`keywords` is a shorthand for using default keyword files shipped with the package. The list of default keyword files
can be seen in the usage string

```console
porcupine_demo_mic --help
```

To detect multiple phrases concurrently provide them as separate arguments

```console
porcupine_demo_mic --access_key ${ACCESS_KEY} --keywords picovoice porcupine
```

To detect non-default keywords (e.g. models created using [Picovoice Console](https://console.picovoice.ai/))
use `keyword_paths` argument

```console
porcupine_demo_mic --access_key ${ACCESS_KEY} --keyword_paths ${KEYWORD_PATH_ONE} ${KEYWORD_PATH_TWO}
```

To detect non-English keywords provide the respective model path:

```console
porcupine_demo_mic --access_key ${ACCESS_KEY} --model_path ${NON_ENGLISH_MODEL_PATH} --keyword_paths ${NON_ENGLISH_KEYWORD_PATH}
```

The model files for all supported languages are available 
[here](https://github.com/Picovoice/porcupine/tree/master/lib/common) on Porcupine's GitHub repository.

It is possible that the default audio input device recognized by the demo is not the one being used. There are a couple of
debugging facilities baked into the demo application to solve this. First, type the following into the console:

```console
porcupine_demo_mic --show_audio_devices
```

It provides information about various audio input devices on the box. On a Linux box, this is the console output

```
index: 0, device name: USB Audio Device
index: 1, device name: MacBook Air Microphone
``` 

You can use the device index to specify which microphone to use for the demo. For instance, if you want to use the USB Audio Device 
in the above example, you can invoke the demo application as below:

```console
porcupine_demo_mic --access_key ${ACCESS_KEY} --keywords picovoice --audio_device_index 0
```

If the problem persists we suggest storing the recorded audio into a file for inspection. This can be achieved by

```console
porcupine_demo_mic --access_key ${ACCESS_KEY} --keywords picovoice --audio_device_index 0 --output_path ~/test.wav
```

If after listening to stored file there is no apparent problem detected please open an issue.

### File Demo

It allows testing Porcupine on a corpus of audio files. The demo is mainly useful for quantitative performance
benchmarking. It accepts 16kHz audio files. Porcupine processes a single-channel audio stream if a stereo file is
provided it only processes the first (left) channel. The following processes a file looking for instances of the phrase
"Picovoice"

```console
porcupine_demo_file --access_key ${ACCESS_KEY} --wav_path ${AUDIO_PATH} --keywords picovoice
```

`keywords` is a shorthand for using default keyword files shipped with the package. The list of default keyword files
can be seen in the usage string

```console
porcupine_demo_file --help
```

To detect multiple phrases concurrently provide them as separate arguments

```console
porcupine_demo_file --access_key ${ACCESS_KEY} --wav_path ${AUDIO_PATH} --keywords grasshopper porcupine
```

To detect non-default keywords (e.g. models created using [Picovoice Console](https://console.picovoice.ai/))
use `keyword_paths` argument

```console
porcupine_demo_file --access_key ${ACCESS_KEY} \
--wav_path ${AUDIO_PATH} \
--keyword_paths ${KEYWORD_PATH_ONE} ${KEYWORD_PATH_TWO}
```

To detect non-English keywords provide the respective model path:

```console
porcupine_demo_mic --access_key ${ACCESS_KEY} \
--wav_path ${AUDIO_PATH} \
--model_path ${NON_ENGLISH_MODEL_PATH} \
--keyword_paths ${NON_ENGLISH_KEYWORD_PATH} 
```

The model files for all supported languages are available 
[here](https://github.com/Picovoice/porcupine/tree/master/lib/common) on Porcupine's GitHub repository.

The sensitivity of the engine can be tuned per keyword using the `sensitivities` input argument

```console
porcupine_demo_file --access_key ${ACCESS_KEY} \
--wav_path ${AUDIO_PATH} \
--keywords grasshopper porcupine --sensitivities 0.3 0.6
```

Sensitivity is the parameter that enables trading miss rate for the false alarm rate. It is a floating point number within
`[0, 1]`. A higher sensitivity reduces the miss rate at the cost of increased false alarm rate.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Picovoice/porcupine",
    "name": "pvporcupinedemo",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.5",
    "maintainer_email": "",
    "keywords": "wake word engine,hotword detection,keyword spotting,wake word detection,voice commands",
    "author": "Picovoice",
    "author_email": "hello@picovoice.ai",
    "download_url": "https://files.pythonhosted.org/packages/58/9d/623be71bc8adbafde111a5f4c923ad76934d6feaa8dfa86ae662095efeae/pvporcupinedemo-3.0.2.tar.gz",
    "platform": null,
    "description": "# Porcupine Wake Word Engine Demos\n\nMade in Vancouver, Canada by [Picovoice](https://picovoice.ai)\n\nThis package contains demos and commandline utilities for processing real-time audio (i.e. microphone) and audio files\nusing Porcupine wake word engine.\n\n## Porcupine\n\nPorcupine is a highly-accurate and lightweight wake word engine. It enables building always-listening voice-enabled\napplications. It is\n\n- using deep neural networks trained in real-world environments.\n- compact and computationally-efficient making it perfect for IoT.\n- scalable. It can detect multiple always-listening voice commands with no added CPU/memory footprint.\n- self-service. Developers can train custom wake phrases using [Picovoice Console](https://console.picovoice.ai/).\n\n## Compatibility\n\n- Python 3.5+\n- Runs on Linux (x86_64), Mac (x86_64 and arm64), Windows (x86_64), Raspberry Pi (all variants), NVIDIA Jetson (Nano), and BeagleBone.\n\n## Installation\n\n```console\nsudo pip3 install pvporcupinedemo\n```\n\n## AccessKey\n\nPorcupine requires a valid Picovoice `AccessKey` at initialization. `AccessKey` acts as your credentials when using Porcupine SDKs.\nYou can get your `AccessKey` for free. Make sure to keep your `AccessKey` secret.\nSignup or Login to [Picovoice Console](https://console.picovoice.ai/) to get your `AccessKey`.\n\n## Usage\n\n### Microphone Demo\n\nIt opens an audio stream from a microphone and detects utterances of a given wake word. The following opens the default\nmicrophone and detects occurrences of \"Picovoice\".\n\n```console\nporcupine_demo_mic --access_key ${ACCESS_KEY} --keywords picovoice\n```\n\n`keywords` is a shorthand for using default keyword files shipped with the package. The list of default keyword files\ncan be seen in the usage string\n\n```console\nporcupine_demo_mic --help\n```\n\nTo detect multiple phrases concurrently provide them as separate arguments\n\n```console\nporcupine_demo_mic --access_key ${ACCESS_KEY} --keywords picovoice porcupine\n```\n\nTo detect non-default keywords (e.g. models created using [Picovoice Console](https://console.picovoice.ai/))\nuse `keyword_paths` argument\n\n```console\nporcupine_demo_mic --access_key ${ACCESS_KEY} --keyword_paths ${KEYWORD_PATH_ONE} ${KEYWORD_PATH_TWO}\n```\n\nTo detect non-English keywords provide the respective model path:\n\n```console\nporcupine_demo_mic --access_key ${ACCESS_KEY} --model_path ${NON_ENGLISH_MODEL_PATH} --keyword_paths ${NON_ENGLISH_KEYWORD_PATH}\n```\n\nThe model files for all supported languages are available \n[here](https://github.com/Picovoice/porcupine/tree/master/lib/common) on Porcupine's GitHub repository.\n\nIt is possible that the default audio input device recognized by the demo is not the one being used. There are a couple of\ndebugging facilities baked into the demo application to solve this. First, type the following into the console:\n\n```console\nporcupine_demo_mic --show_audio_devices\n```\n\nIt provides information about various audio input devices on the box. On a Linux box, this is the console output\n\n```\nindex: 0, device name: USB Audio Device\nindex: 1, device name: MacBook Air Microphone\n``` \n\nYou can use the device index to specify which microphone to use for the demo. For instance, if you want to use the USB Audio Device \nin the above example, you can invoke the demo application as below:\n\n```console\nporcupine_demo_mic --access_key ${ACCESS_KEY} --keywords picovoice --audio_device_index 0\n```\n\nIf the problem persists we suggest storing the recorded audio into a file for inspection. This can be achieved by\n\n```console\nporcupine_demo_mic --access_key ${ACCESS_KEY} --keywords picovoice --audio_device_index 0 --output_path ~/test.wav\n```\n\nIf after listening to stored file there is no apparent problem detected please open an issue.\n\n### File Demo\n\nIt allows testing Porcupine on a corpus of audio files. The demo is mainly useful for quantitative performance\nbenchmarking. It accepts 16kHz audio files. Porcupine processes a single-channel audio stream if a stereo file is\nprovided it only processes the first (left) channel. The following processes a file looking for instances of the phrase\n\"Picovoice\"\n\n```console\nporcupine_demo_file --access_key ${ACCESS_KEY} --wav_path ${AUDIO_PATH} --keywords picovoice\n```\n\n`keywords` is a shorthand for using default keyword files shipped with the package. The list of default keyword files\ncan be seen in the usage string\n\n```console\nporcupine_demo_file --help\n```\n\nTo detect multiple phrases concurrently provide them as separate arguments\n\n```console\nporcupine_demo_file --access_key ${ACCESS_KEY} --wav_path ${AUDIO_PATH} --keywords grasshopper porcupine\n```\n\nTo detect non-default keywords (e.g. models created using [Picovoice Console](https://console.picovoice.ai/))\nuse `keyword_paths` argument\n\n```console\nporcupine_demo_file --access_key ${ACCESS_KEY} \\\n--wav_path ${AUDIO_PATH} \\\n--keyword_paths ${KEYWORD_PATH_ONE} ${KEYWORD_PATH_TWO}\n```\n\nTo detect non-English keywords provide the respective model path:\n\n```console\nporcupine_demo_mic --access_key ${ACCESS_KEY} \\\n--wav_path ${AUDIO_PATH} \\\n--model_path ${NON_ENGLISH_MODEL_PATH} \\\n--keyword_paths ${NON_ENGLISH_KEYWORD_PATH} \n```\n\nThe model files for all supported languages are available \n[here](https://github.com/Picovoice/porcupine/tree/master/lib/common) on Porcupine's GitHub repository.\n\nThe sensitivity of the engine can be tuned per keyword using the `sensitivities` input argument\n\n```console\nporcupine_demo_file --access_key ${ACCESS_KEY} \\\n--wav_path ${AUDIO_PATH} \\\n--keywords grasshopper porcupine --sensitivities 0.3 0.6\n```\n\nSensitivity is the parameter that enables trading miss rate for the false alarm rate. It is a floating point number within\n`[0, 1]`. A higher sensitivity reduces the miss rate at the cost of increased false alarm rate.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Porcupine wake word engine demos",
    "version": "3.0.2",
    "project_urls": {
        "Homepage": "https://github.com/Picovoice/porcupine"
    },
    "split_keywords": [
        "wake word engine",
        "hotword detection",
        "keyword spotting",
        "wake word detection",
        "voice commands"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0db7207e74eeb516423df863ef287c14794ffc8fd4f45c7f09da518395962d2a",
                "md5": "7bafca7a5e0ed38ed4e4c38e3098517d",
                "sha256": "dfe2a8fa214690f0aa3042966c476d98201de65fbcd0253ffd1ae175b46d6f15"
            },
            "downloads": -1,
            "filename": "pvporcupinedemo-3.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7bafca7a5e0ed38ed4e4c38e3098517d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.5",
            "size": 11832,
            "upload_time": "2024-01-30T21:39:30",
            "upload_time_iso_8601": "2024-01-30T21:39:30.887158Z",
            "url": "https://files.pythonhosted.org/packages/0d/b7/207e74eeb516423df863ef287c14794ffc8fd4f45c7f09da518395962d2a/pvporcupinedemo-3.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "589d623be71bc8adbafde111a5f4c923ad76934d6feaa8dfa86ae662095efeae",
                "md5": "0d29d56fba8eb483b311dfab7f59cbf4",
                "sha256": "ef3e5294f037461528fbe18f72c152cdbf7a5bba8cb84f30418d3f8f525bc979"
            },
            "downloads": -1,
            "filename": "pvporcupinedemo-3.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "0d29d56fba8eb483b311dfab7f59cbf4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.5",
            "size": 11798,
            "upload_time": "2024-01-30T21:39:32",
            "upload_time_iso_8601": "2024-01-30T21:39:32.823186Z",
            "url": "https://files.pythonhosted.org/packages/58/9d/623be71bc8adbafde111a5f4c923ad76934d6feaa8dfa86ae662095efeae/pvporcupinedemo-3.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-30 21:39:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Picovoice",
    "github_project": "porcupine",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pvporcupinedemo"
}
        
Elapsed time: 0.19044s