pveagle


Namepveagle JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/Picovoice/eagle
SummaryEagle Speaker Recognition Engine
upload_time2024-01-30 21:16:27
maintainer
docs_urlNone
authorPicovoice
requires_python>=3.7
license
keywords speaker recognition speaker identification voice recognition voice identification
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Eagle Binding for Python

## Eagle Speaker Recognition Engine


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

Eagle is an on-device speaker recognition engine. Eagle is:

- Private; All voice processing runs locally.
- Cross-Platform:
    - Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64)
    - Android and iOS
    - Chrome, Safari, Firefox, and Edge
    - Raspberry Pi (5, 4, 3) and NVIDIA Jetson Nano

## Compatibility

- Python 3.7 or higher
- Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64), Raspberry Pi (5, 4, 3), and NVIDIA Jetson Nano.

## Installation

```console
pip3 install pveagle
```

## AccessKey

Eagle requires a valid Picovoice `AccessKey` at initialization. `AccessKey` acts as your credentials when using Eagle
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

Eagle has two distinct steps: Enrollment and Recognition. In the enrollment step, Eagle analyzes a series of
utterances from a particular speaker to learn their unique voiceprint. This step produces an `EagleProfile` object,
which can be stored and utilized during inference. During the Recognition step, Eagle compares the incoming frames of
audio to the voiceprints of all enrolled speakers in real-time to determine the similarity between them.

### Speaker Enrollment

Create an instance of the profiler:

```python
import pveagle

# AccessKey obtained from Picovoice Console (https://console.picovoice.ai/)
access_key = "${ACCESS_KEY}"
eagle_profiler = pveagle.create_profiler(access_key)
```

`EagleProfiler` is responsible for processing and enrolling PCM audio data, with the valid audio sample rate determined
by `eagle_profiler.sample_rate`. The audio data must be 16-bit linearly-encoded and single-channel.

When passing samples to `eagle_profiler.enroll`, the number of samples must be at
least `eagle_profiler.min_enroll_samples` to ensure sufficient data for enrollment. The percentage value
obtained from this process indicates the progress of enrollment, while the feedback value can be utilized to determine
the status of the enrollment process.

```python
def get_next_enroll_audio_data(num_samples):
    pass


percentage = 0.0
while percentage < 100.0:
    percentage, feedback = eagle_profiler.enroll(get_next_enroll_audio_data(eagle_profiler.min_enroll_samples))
    print(feedback.name)
```

After the percentage reaches 100%, the enrollment process is considered complete. While it is possible to continue
providing additional audio data to the profiler to improve the accuracy of the voiceprint, it is not necessary to do so.
Moreover, if the audio data submitted is unsuitable for enrollment, the feedback value will indicate the reason, and the
enrollment progress will remain unchanged.

```python
speaker_profile = eagle_profiler.export()
```

The `eagle_profiler.export()` function produces an `EagleProfile` object, which can be converted into a binary form
using the `EagleProfile.to_bytes()` method. This binary representation can be saved and subsequently retrieved using
the `EagleProfile.from_bytes()` method.

To reset the profiler and enroll a new speaker, the `eagle_profiler.reset()` method can be used. This method clears all
previously stored data, making it possible to start a new enrollment session with a different speaker.

Finally, when done be sure to explicitly release the resources:

```python
eagle_profiler.delete()
```

### Speaker Recognition

Create an instance of the engine with one or more speaker profiles from the `EagleProfiler`:

```python
eagle = pveagle.create_recognizer(access_key, speaker_profile)
```

When initialized, `eagle.sample_rate` specifies the valid sample rate for Eagle. The expected length of a frame, or the
number of audio samples in an input array, is defined by `eagle.frame_length`.

Like the profiler, Eagle is designed to work with single-channel audio that is encoded using 16-bit linear PCM.

```python
def get_next_audio_frame():
    pass


while True:
    scores = eagle.process(get_next_audio_frame())
```

The `scores` array contains floating-point numbers that indicate the similarity between the input audio frame and the
enrolled speakers. Each value in the array corresponds to a specific enrolled speaker, maintaining the same order as the
speaker profiles provided during initialization. The values in the array range from 0.0 to 1.0, where higher values
indicate a stronger degree of similarity.

Finally, when done be sure to explicitly release the resources:

```python
eagle.delete()
```

## Demos
[pveagledemo](https://pypi.org/project/pveagledemo/) provides command-line utilities for processing real-time
audio (i.e. microphone) and files using Eagle.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Picovoice/eagle",
    "name": "pveagle",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "Speaker Recognition,Speaker Identification,Voice Recognition,Voice Identification",
    "author": "Picovoice",
    "author_email": "hello@picovoice.ai",
    "download_url": "https://files.pythonhosted.org/packages/dc/f9/4053977d883639301c5a0ea88d329004fe76a9ddb23f0deabe30077ad53c/pveagle-1.0.1.tar.gz",
    "platform": null,
    "description": "# Eagle Binding for Python\n\n## Eagle Speaker Recognition Engine\n\n\nMade in Vancouver, Canada by [Picovoice](https://picovoice.ai)\n\nEagle is an on-device speaker recognition engine. Eagle is:\n\n- Private; All voice processing runs locally.\n- Cross-Platform:\n    - Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64)\n    - Android and iOS\n    - Chrome, Safari, Firefox, and Edge\n    - Raspberry Pi (5, 4, 3) and NVIDIA Jetson Nano\n\n## Compatibility\n\n- Python 3.7 or higher\n- Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64), Raspberry Pi (5, 4, 3), and NVIDIA Jetson Nano.\n\n## Installation\n\n```console\npip3 install pveagle\n```\n\n## AccessKey\n\nEagle requires a valid Picovoice `AccessKey` at initialization. `AccessKey` acts as your credentials when using Eagle\nSDKs. You 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\nEagle has two distinct steps: Enrollment and Recognition. In the enrollment step, Eagle analyzes a series of\nutterances from a particular speaker to learn their unique voiceprint. This step produces an `EagleProfile` object,\nwhich can be stored and utilized during inference. During the Recognition step, Eagle compares the incoming frames of\naudio to the voiceprints of all enrolled speakers in real-time to determine the similarity between them.\n\n### Speaker Enrollment\n\nCreate an instance of the profiler:\n\n```python\nimport pveagle\n\n# AccessKey obtained from Picovoice Console (https://console.picovoice.ai/)\naccess_key = \"${ACCESS_KEY}\"\neagle_profiler = pveagle.create_profiler(access_key)\n```\n\n`EagleProfiler` is responsible for processing and enrolling PCM audio data, with the valid audio sample rate determined\nby `eagle_profiler.sample_rate`. The audio data must be 16-bit linearly-encoded and single-channel.\n\nWhen passing samples to `eagle_profiler.enroll`, the number of samples must be at\nleast `eagle_profiler.min_enroll_samples` to ensure sufficient data for enrollment. The percentage value\nobtained from this process indicates the progress of enrollment, while the feedback value can be utilized to determine\nthe status of the enrollment process.\n\n```python\ndef get_next_enroll_audio_data(num_samples):\n    pass\n\n\npercentage = 0.0\nwhile percentage < 100.0:\n    percentage, feedback = eagle_profiler.enroll(get_next_enroll_audio_data(eagle_profiler.min_enroll_samples))\n    print(feedback.name)\n```\n\nAfter the percentage reaches 100%, the enrollment process is considered complete. While it is possible to continue\nproviding additional audio data to the profiler to improve the accuracy of the voiceprint, it is not necessary to do so.\nMoreover, if the audio data submitted is unsuitable for enrollment, the feedback value will indicate the reason, and the\nenrollment progress will remain unchanged.\n\n```python\nspeaker_profile = eagle_profiler.export()\n```\n\nThe `eagle_profiler.export()` function produces an `EagleProfile` object, which can be converted into a binary form\nusing the `EagleProfile.to_bytes()` method. This binary representation can be saved and subsequently retrieved using\nthe `EagleProfile.from_bytes()` method.\n\nTo reset the profiler and enroll a new speaker, the `eagle_profiler.reset()` method can be used. This method clears all\npreviously stored data, making it possible to start a new enrollment session with a different speaker.\n\nFinally, when done be sure to explicitly release the resources:\n\n```python\neagle_profiler.delete()\n```\n\n### Speaker Recognition\n\nCreate an instance of the engine with one or more speaker profiles from the `EagleProfiler`:\n\n```python\neagle = pveagle.create_recognizer(access_key, speaker_profile)\n```\n\nWhen initialized, `eagle.sample_rate` specifies the valid sample rate for Eagle. The expected length of a frame, or the\nnumber of audio samples in an input array, is defined by `eagle.frame_length`.\n\nLike the profiler, Eagle is designed to work with single-channel audio that is encoded using 16-bit linear PCM.\n\n```python\ndef get_next_audio_frame():\n    pass\n\n\nwhile True:\n    scores = eagle.process(get_next_audio_frame())\n```\n\nThe `scores` array contains floating-point numbers that indicate the similarity between the input audio frame and the\nenrolled speakers. Each value in the array corresponds to a specific enrolled speaker, maintaining the same order as the\nspeaker profiles provided during initialization. The values in the array range from 0.0 to 1.0, where higher values\nindicate a stronger degree of similarity.\n\nFinally, when done be sure to explicitly release the resources:\n\n```python\neagle.delete()\n```\n\n## Demos\n[pveagledemo](https://pypi.org/project/pveagledemo/) provides command-line utilities for processing real-time\naudio (i.e. microphone) and files using Eagle.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Eagle Speaker Recognition Engine",
    "version": "1.0.1",
    "project_urls": {
        "Homepage": "https://github.com/Picovoice/eagle"
    },
    "split_keywords": [
        "speaker recognition",
        "speaker identification",
        "voice recognition",
        "voice identification"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1e1751a84381a7c37f796d75681fbf99917ba961edf1d7fc6e30f89ea4ea9ae5",
                "md5": "28b04418abd3dcbcbb0cb5f504efdeda",
                "sha256": "cf57fdf6d9d5482bd43e5ae2aaf782304b90f32ad722971cbbb54a3d030886ed"
            },
            "downloads": -1,
            "filename": "pveagle-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "28b04418abd3dcbcbb0cb5f504efdeda",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 7099569,
            "upload_time": "2024-01-30T21:16:22",
            "upload_time_iso_8601": "2024-01-30T21:16:22.554941Z",
            "url": "https://files.pythonhosted.org/packages/1e/17/51a84381a7c37f796d75681fbf99917ba961edf1d7fc6e30f89ea4ea9ae5/pveagle-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dcf94053977d883639301c5a0ea88d329004fe76a9ddb23f0deabe30077ad53c",
                "md5": "2c322920b1b3d07fc78fb5d4c56270cb",
                "sha256": "efd0fdbef42ce296110fdccde7c085ce62bdb6a50730f76c66014957f10c18b2"
            },
            "downloads": -1,
            "filename": "pveagle-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "2c322920b1b3d07fc78fb5d4c56270cb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 7102655,
            "upload_time": "2024-01-30T21:16:27",
            "upload_time_iso_8601": "2024-01-30T21:16:27.809482Z",
            "url": "https://files.pythonhosted.org/packages/dc/f9/4053977d883639301c5a0ea88d329004fe76a9ddb23f0deabe30077ad53c/pveagle-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-30 21:16:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Picovoice",
    "github_project": "eagle",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pveagle"
}
        
Elapsed time: 0.22306s