pveagle 0.1.0__tar.gz → 0.2.0__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. pveagle-0.2.0/PKG-INFO +145 -0
  2. {pveagle-0.1.0 → pveagle-0.2.0}/README.md +0 -2
  3. {pveagle-0.1.0 → pveagle-0.2.0}/pveagle/_eagle.py +106 -10
  4. {pveagle-0.1.0 → pveagle-0.2.0}/pveagle/lib/common/eagle_params.pv +0 -0
  5. pveagle-0.2.0/pveagle/lib/jetson/cortex-a57-aarch64/libpv_eagle.so +0 -0
  6. pveagle-0.2.0/pveagle/lib/linux/x86_64/libpv_eagle.so +0 -0
  7. {pveagle-0.1.0 → pveagle-0.2.0}/pveagle/lib/mac/arm64/libpv_eagle.dylib +0 -0
  8. {pveagle-0.1.0 → pveagle-0.2.0}/pveagle/lib/mac/x86_64/libpv_eagle.dylib +0 -0
  9. pveagle-0.2.0/pveagle/lib/raspberry-pi/cortex-a53/libpv_eagle.so +0 -0
  10. pveagle-0.2.0/pveagle/lib/raspberry-pi/cortex-a53-aarch64/libpv_eagle.so +0 -0
  11. pveagle-0.2.0/pveagle/lib/raspberry-pi/cortex-a72/libpv_eagle.so +0 -0
  12. pveagle-0.2.0/pveagle/lib/raspberry-pi/cortex-a72-aarch64/libpv_eagle.so +0 -0
  13. {pveagle-0.1.0 → pveagle-0.2.0}/pveagle/lib/windows/amd64/libpv_eagle.dll +0 -0
  14. pveagle-0.2.0/pveagle.egg-info/PKG-INFO +145 -0
  15. {pveagle-0.1.0 → pveagle-0.2.0}/setup.py +1 -1
  16. pveagle-0.1.0/PKG-INFO +0 -145
  17. pveagle-0.1.0/pveagle/lib/jetson/cortex-a57-aarch64/libpv_eagle.so +0 -0
  18. pveagle-0.1.0/pveagle/lib/linux/x86_64/libpv_eagle.so +0 -0
  19. pveagle-0.1.0/pveagle/lib/raspberry-pi/cortex-a53/libpv_eagle.so +0 -0
  20. pveagle-0.1.0/pveagle/lib/raspberry-pi/cortex-a53-aarch64/libpv_eagle.so +0 -0
  21. pveagle-0.1.0/pveagle/lib/raspberry-pi/cortex-a72/libpv_eagle.so +0 -0
  22. pveagle-0.1.0/pveagle/lib/raspberry-pi/cortex-a72-aarch64/libpv_eagle.so +0 -0
  23. pveagle-0.1.0/pveagle.egg-info/PKG-INFO +0 -145
  24. {pveagle-0.1.0 → pveagle-0.2.0}/MANIFEST.in +0 -0
  25. {pveagle-0.1.0 → pveagle-0.2.0}/pveagle/LICENSE +0 -0
  26. {pveagle-0.1.0 → pveagle-0.2.0}/pveagle/__init__.py +0 -0
  27. {pveagle-0.1.0 → pveagle-0.2.0}/pveagle/_factory.py +0 -0
  28. {pveagle-0.1.0 → pveagle-0.2.0}/pveagle/_util.py +0 -0
  29. {pveagle-0.1.0 → pveagle-0.2.0}/pveagle.egg-info/SOURCES.txt +0 -0
  30. {pveagle-0.1.0 → pveagle-0.2.0}/pveagle.egg-info/dependency_links.txt +0 -0
  31. {pveagle-0.1.0 → pveagle-0.2.0}/pveagle.egg-info/top_level.txt +0 -0
  32. {pveagle-0.1.0 → pveagle-0.2.0}/setup.cfg +0 -0
pveagle-0.2.0/PKG-INFO ADDED
@@ -0,0 +1,145 @@
1
+ Metadata-Version: 2.1
2
+ Name: pveagle
3
+ Version: 0.2.0
4
+ Summary: Eagle Speaker Recognition Engine
5
+ Home-page: https://github.com/Picovoice/eagle
6
+ Author: Picovoice
7
+ Author-email: hello@picovoice.ai
8
+ License: UNKNOWN
9
+ Description: # Eagle Speaker Recognition Engine
10
+
11
+ Made in Vancouver, Canada by [Picovoice](https://picovoice.ai)
12
+
13
+ Eagle is an on-device speaker recognition engine. Eagle is:
14
+
15
+ - Private; All voice processing runs locally.
16
+ - Cross-Platform:
17
+ - Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64)
18
+ - Android and iOS
19
+ - Chrome, Safari, Firefox, and Edge
20
+ - Raspberry Pi (4, 3) and NVIDIA Jetson Nano
21
+
22
+ ## Compatibility
23
+
24
+ - Python 3.5 or higher
25
+ - Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64), Raspberry Pi (4, 3), and NVIDIA Jetson Nano.
26
+
27
+ ## Installation
28
+
29
+ ```console
30
+ pip3 install pveagle
31
+ ```
32
+
33
+ ## AccessKey
34
+
35
+ Eagle requires a valid Picovoice `AccessKey` at initialization. `AccessKey` acts as your credentials when using Eagle
36
+ SDKs. You can get your `AccessKey` for free. Make sure to keep your `AccessKey` secret.
37
+ Signup or Login to [Picovoice Console](https://console.picovoice.ai/) to get your `AccessKey`.
38
+
39
+ ## Usage
40
+
41
+ Eagle has two distinct steps: Enrollment and Recognition. In the enrollment step, Eagle analyzes a series of
42
+ utterances from a particular speaker to learn their unique voiceprint. This step produces an `EagleProfile` object,
43
+ which can be stored and utilized during inference. During the Recognition step, Eagle compares the incoming frames of
44
+ audio to the voiceprints of all enrolled speakers in real-time to determine the similarity between them.
45
+
46
+ ### Speaker Enrollment
47
+
48
+ Create an instance of the profiler:
49
+
50
+ ```python
51
+ import pveagle
52
+
53
+ # AccessKey obtained from Picovoice Console (https://console.picovoice.ai/)
54
+ access_key = "${ACCESS_KEY}"
55
+ eagle_profiler = pveagle.create_profiler(access_key)
56
+ ```
57
+
58
+ `EagleProfiler` is responsible for processing and enrolling PCM audio data, with the valid audio sample rate determined
59
+ by `eagle_profiler.sample_rate`. The audio data must be 16-bit linearly-encoded and single-channel.
60
+
61
+ When passing samples to `eagle_profiler.enroll`, the number of samples must be at
62
+ least `eagle_profiler.min_enroll_samples` to ensure sufficient data for enrollment. The percentage value
63
+ obtained from this process indicates the progress of enrollment, while the feedback value can be utilized to determine
64
+ the status of the enrollment process.
65
+
66
+ ```python
67
+ def get_next_enroll_audio_data(num_samples):
68
+ pass
69
+
70
+
71
+ percentage = 0.0
72
+ while percentage < 100.0:
73
+ percentage, feedback = eagle_profiler.enroll(get_next_enroll_audio_data(eagle_profiler.min_enroll_samples))
74
+ print(feedback.name)
75
+ ```
76
+
77
+ After the percentage reaches 100%, the enrollment process is considered complete. While it is possible to continue
78
+ providing additional audio data to the profiler to improve the accuracy of the voiceprint, it is not necessary to do so.
79
+ Moreover, if the audio data submitted is unsuitable for enrollment, the feedback value will indicate the reason, and the
80
+ enrollment progress will remain unchanged.
81
+
82
+ ```python
83
+ speaker_profile = eagle_profiler.export()
84
+ ```
85
+
86
+ The `eagle_profiler.export()` function produces an `EagleProfile` object, which can be converted into a binary form
87
+ using the `EagleProfile.to_bytes()` method. This binary representation can be saved and subsequently retrieved using
88
+ the `EagleProfile.from_bytes()` method.
89
+
90
+ To reset the profiler and enroll a new speaker, the `eagle_profiler.reset()` method can be used. This method clears all
91
+ previously stored data, making it possible to start a new enrollment session with a different speaker.
92
+
93
+ Finally, when done be sure to explicitly release the resources:
94
+
95
+ ```python
96
+ eagle_profiler.delete()
97
+ ```
98
+
99
+ ### Speaker Recognition
100
+
101
+ Create an instance of the engine with one or more speaker profiles from the `EagleProfiler`:
102
+
103
+ ```python
104
+ eagle = pveagle.create_recognizer(access_key, speaker_profile)
105
+ ```
106
+
107
+ When initialized, `eagle.sample_rate` specifies the valid sample rate for Eagle. The expected length of a frame, or the
108
+ number of audio samples in an input array, is defined by `eagle.frame_length`.
109
+
110
+ Like the profiler, Eagle is designed to work with single-channel audio that is encoded using 16-bit linear PCM.
111
+
112
+ ```python
113
+ def get_next_audio_frame():
114
+ pass
115
+
116
+
117
+ while True:
118
+ scores = eagle.process(get_next_audio_frame())
119
+ ```
120
+
121
+ The `scores` array contains floating-point numbers that indicate the similarity between the input audio frame and the
122
+ enrolled speakers. Each value in the array corresponds to a specific enrolled speaker, maintaining the same order as the
123
+ speaker profiles provided during initialization. The values in the array range from 0.0 to 1.0, where higher values
124
+ indicate a stronger degree of similarity.
125
+
126
+ Finally, when done be sure to explicitly release the resources:
127
+
128
+ ```python
129
+ eagle.delete()
130
+ ```
131
+
132
+ ## Demos
133
+ [pveagledemo](https://pypi.org/project/pveagledemo/) provides command-line utilities for processing real-time
134
+ audio (i.e. microphone) and files using Eagle.
135
+
136
+ Keywords: Speaker Recognition,Speaker Identification,Voice Recognition,Voice Identification
137
+ Platform: UNKNOWN
138
+ Classifier: Development Status :: 4 - Beta
139
+ Classifier: Intended Audience :: Developers
140
+ Classifier: License :: OSI Approved :: Apache Software License
141
+ Classifier: Operating System :: OS Independent
142
+ Classifier: Programming Language :: Python :: 3
143
+ Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
144
+ Requires-Python: >=3.5
145
+ Description-Content-Type: text/markdown
@@ -122,7 +122,5 @@ eagle.delete()
122
122
  ```
123
123
 
124
124
  ## Demos
125
- <!-- markdown-link-check-disable -->
126
125
  [pveagledemo](https://pypi.org/project/pveagledemo/) provides command-line utilities for processing real-time
127
126
  audio (i.e. microphone) and files using Eagle.
128
- <!-- markdown-link-check-enable -->
@@ -16,7 +16,27 @@ from typing import Sequence, Tuple
16
16
 
17
17
 
18
18
  class EagleError(Exception):
19
- pass
19
+ def __init__(self, message: str = '', message_stack: Sequence[str] = None):
20
+ super().__init__(message)
21
+
22
+ self._message = message
23
+ self._message_stack = list() if message_stack is None else message_stack
24
+
25
+ def __str__(self):
26
+ message = self._message
27
+ if len(self._message_stack) > 0:
28
+ message += ':'
29
+ for i in range(len(self._message_stack)):
30
+ message += '\n [%d] %s' % (i, self._message_stack[i])
31
+ return message
32
+
33
+ @property
34
+ def message(self) -> str:
35
+ return self._message
36
+
37
+ @property
38
+ def message_stack(self) -> Sequence[str]:
39
+ return self._message_stack
20
40
 
21
41
 
22
42
  class EagleMemoryError(EagleError):
@@ -183,6 +203,20 @@ class EagleProfiler(object):
183
203
 
184
204
  library = cdll.LoadLibrary(library_path)
185
205
 
206
+ set_sdk_func = library.pv_set_sdk
207
+ set_sdk_func.argtypes = [c_char_p]
208
+ set_sdk_func.restype = None
209
+
210
+ set_sdk_func('python'.encode('utf-8'))
211
+
212
+ self._get_error_stack_func = library.pv_get_error_stack
213
+ self._get_error_stack_func.argtypes = [POINTER(POINTER(c_char_p)), POINTER(c_int)]
214
+ self._get_error_stack_func.restype = PicovoiceStatuses
215
+
216
+ self._free_error_stack_func = library.pv_free_error_stack
217
+ self._free_error_stack_func.argtypes = [POINTER(c_char_p)]
218
+ self._free_error_stack_func.restype = None
219
+
186
220
  # noinspection PyArgumentList
187
221
  self._eagle_profiler = POINTER(self.CEagleProfiler)()
188
222
 
@@ -198,7 +232,9 @@ class EagleProfiler(object):
198
232
  model_path.encode('utf-8'),
199
233
  byref(self._eagle_profiler))
200
234
  if status is not PicovoiceStatuses.SUCCESS:
201
- raise _PICOVOICE_STATUS_TO_EXCEPTION[status]()
235
+ raise _PICOVOICE_STATUS_TO_EXCEPTION[status](
236
+ message='Profile initialization failed',
237
+ message_stack=self._get_error_stack())
202
238
 
203
239
  speaker_profile_size_func = library.pv_eagle_profiler_export_size
204
240
  speaker_profile_size_func.argtypes = [
@@ -209,7 +245,9 @@ class EagleProfiler(object):
209
245
  profile_size = c_int32()
210
246
  status = speaker_profile_size_func(self._eagle_profiler, byref(profile_size))
211
247
  if status is not PicovoiceStatuses.SUCCESS:
212
- raise _PICOVOICE_STATUS_TO_EXCEPTION[status]()
248
+ raise _PICOVOICE_STATUS_TO_EXCEPTION[status](
249
+ message='Failed to get profile size',
250
+ message_stack=self._get_error_stack())
213
251
  self._profile_size = profile_size.value
214
252
 
215
253
  enroll_min_audio_length_sample_func = \
@@ -224,7 +262,9 @@ class EagleProfiler(object):
224
262
  self._eagle_profiler,
225
263
  byref(min_enroll_samples))
226
264
  if status is not PicovoiceStatuses.SUCCESS:
227
- raise _PICOVOICE_STATUS_TO_EXCEPTION[status]()
265
+ raise _PICOVOICE_STATUS_TO_EXCEPTION[status](
266
+ message='Failed to get min audio length sample',
267
+ message_stack=self._get_error_stack())
228
268
  self._min_enroll_samples = min_enroll_samples.value
229
269
 
230
270
  self._delete_func = library.pv_eagle_profiler_delete
@@ -298,7 +338,9 @@ class EagleProfiler(object):
298
338
  byref(percentage))
299
339
  feedback = EagleProfilerEnrollFeedback(feedback_code.value)
300
340
  if status is not PicovoiceStatuses.SUCCESS:
301
- raise _PICOVOICE_STATUS_TO_EXCEPTION[status]()
341
+ raise _PICOVOICE_STATUS_TO_EXCEPTION[status](
342
+ message='Enrollment failed',
343
+ message_stack=self._get_error_stack())
302
344
 
303
345
  return percentage.value, feedback
304
346
 
@@ -316,7 +358,9 @@ class EagleProfiler(object):
316
358
  byref(profile)
317
359
  )
318
360
  if status is not PicovoiceStatuses.SUCCESS:
319
- raise _PICOVOICE_STATUS_TO_EXCEPTION[status]()
361
+ raise _PICOVOICE_STATUS_TO_EXCEPTION[status](
362
+ message='Export failed',
363
+ message_stack=self._get_error_stack())
320
364
 
321
365
  return EagleProfile(cast(profile, c_void_p), self._profile_size)
322
366
 
@@ -328,7 +372,9 @@ class EagleProfiler(object):
328
372
 
329
373
  status = self._reset_func(self._eagle_profiler)
330
374
  if status is not PicovoiceStatuses.SUCCESS:
331
- raise _PICOVOICE_STATUS_TO_EXCEPTION[status]()
375
+ raise _PICOVOICE_STATUS_TO_EXCEPTION[status](
376
+ message='Profile reset failed',
377
+ message_stack=self._get_error_stack())
332
378
 
333
379
  def delete(self) -> None:
334
380
  """
@@ -361,6 +407,21 @@ class EagleProfiler(object):
361
407
 
362
408
  return self._version
363
409
 
410
+ def _get_error_stack(self) -> Sequence[str]:
411
+ message_stack_ref = POINTER(c_char_p)()
412
+ message_stack_depth = c_int()
413
+ status = self._get_error_stack_func(byref(message_stack_ref), byref(message_stack_depth))
414
+ if status is not PicovoiceStatuses.SUCCESS:
415
+ raise _PICOVOICE_STATUS_TO_EXCEPTION[status](message='Unable to get Eagle error state')
416
+
417
+ message_stack = list()
418
+ for i in range(message_stack_depth.value):
419
+ message_stack.append(message_stack_ref[i].decode('utf-8'))
420
+
421
+ self._free_error_stack_func(message_stack_ref)
422
+
423
+ return message_stack
424
+
364
425
 
365
426
  class Eagle(object):
366
427
  """
@@ -400,6 +461,20 @@ class Eagle(object):
400
461
 
401
462
  library = cdll.LoadLibrary(library_path)
402
463
 
464
+ set_sdk_func = library.pv_set_sdk
465
+ set_sdk_func.argtypes = [c_char_p]
466
+ set_sdk_func.restype = None
467
+
468
+ set_sdk_func('python'.encode('utf-8'))
469
+
470
+ self._get_error_stack_func = library.pv_get_error_stack
471
+ self._get_error_stack_func.argtypes = [POINTER(POINTER(c_char_p)), POINTER(c_int)]
472
+ self._get_error_stack_func.restype = PicovoiceStatuses
473
+
474
+ self._free_error_stack_func = library.pv_free_error_stack
475
+ self._free_error_stack_func.argtypes = [POINTER(c_char_p)]
476
+ self._free_error_stack_func.restype = None
477
+
403
478
  # noinspection PyArgumentList
404
479
  self._eagle = POINTER(self.CEagle)()
405
480
 
@@ -423,7 +498,9 @@ class Eagle(object):
423
498
  profile_bytes,
424
499
  byref(self._eagle))
425
500
  if status is not PicovoiceStatuses.SUCCESS:
426
- raise _PICOVOICE_STATUS_TO_EXCEPTION[status]()
501
+ raise _PICOVOICE_STATUS_TO_EXCEPTION[status](
502
+ message='Initialization failed',
503
+ message_stack=self._get_error_stack())
427
504
 
428
505
  self._delete_func = library.pv_eagle_delete
429
506
  self._delete_func.argtypes = [POINTER(self.CEagle)]
@@ -471,7 +548,9 @@ class Eagle(object):
471
548
 
472
549
  status = self._process_func(self._eagle, pcm, self._scores)
473
550
  if status is not PicovoiceStatuses.SUCCESS:
474
- raise _PICOVOICE_STATUS_TO_EXCEPTION[status]()
551
+ raise _PICOVOICE_STATUS_TO_EXCEPTION[status](
552
+ message='Process failed',
553
+ message_stack=self._get_error_stack())
475
554
 
476
555
  # noinspection PyTypeChecker
477
556
  return [float(score) for score in self._scores]
@@ -485,7 +564,9 @@ class Eagle(object):
485
564
 
486
565
  status = self._reset_func(self._eagle)
487
566
  if status is not PicovoiceStatuses.SUCCESS:
488
- raise _PICOVOICE_STATUS_TO_EXCEPTION[status]()
567
+ raise _PICOVOICE_STATUS_TO_EXCEPTION[status](
568
+ message='Reset failed',
569
+ message_stack=self._get_error_stack())
489
570
 
490
571
  def delete(self) -> None:
491
572
  """
@@ -518,6 +599,21 @@ class Eagle(object):
518
599
 
519
600
  return self._version
520
601
 
602
+ def _get_error_stack(self) -> Sequence[str]:
603
+ message_stack_ref = POINTER(c_char_p)()
604
+ message_stack_depth = c_int()
605
+ status = self._get_error_stack_func(byref(message_stack_ref), byref(message_stack_depth))
606
+ if status is not PicovoiceStatuses.SUCCESS:
607
+ raise _PICOVOICE_STATUS_TO_EXCEPTION[status](message='Unable to get Eagle error state')
608
+
609
+ message_stack = list()
610
+ for i in range(message_stack_depth.value):
611
+ message_stack.append(message_stack_ref[i].decode('utf-8'))
612
+
613
+ self._free_error_stack_func(message_stack_ref)
614
+
615
+ return message_stack
616
+
521
617
 
522
618
  __all__ = [
523
619
  'Eagle',
@@ -0,0 +1,145 @@
1
+ Metadata-Version: 2.1
2
+ Name: pveagle
3
+ Version: 0.2.0
4
+ Summary: Eagle Speaker Recognition Engine
5
+ Home-page: https://github.com/Picovoice/eagle
6
+ Author: Picovoice
7
+ Author-email: hello@picovoice.ai
8
+ License: UNKNOWN
9
+ Description: # Eagle Speaker Recognition Engine
10
+
11
+ Made in Vancouver, Canada by [Picovoice](https://picovoice.ai)
12
+
13
+ Eagle is an on-device speaker recognition engine. Eagle is:
14
+
15
+ - Private; All voice processing runs locally.
16
+ - Cross-Platform:
17
+ - Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64)
18
+ - Android and iOS
19
+ - Chrome, Safari, Firefox, and Edge
20
+ - Raspberry Pi (4, 3) and NVIDIA Jetson Nano
21
+
22
+ ## Compatibility
23
+
24
+ - Python 3.5 or higher
25
+ - Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64), Raspberry Pi (4, 3), and NVIDIA Jetson Nano.
26
+
27
+ ## Installation
28
+
29
+ ```console
30
+ pip3 install pveagle
31
+ ```
32
+
33
+ ## AccessKey
34
+
35
+ Eagle requires a valid Picovoice `AccessKey` at initialization. `AccessKey` acts as your credentials when using Eagle
36
+ SDKs. You can get your `AccessKey` for free. Make sure to keep your `AccessKey` secret.
37
+ Signup or Login to [Picovoice Console](https://console.picovoice.ai/) to get your `AccessKey`.
38
+
39
+ ## Usage
40
+
41
+ Eagle has two distinct steps: Enrollment and Recognition. In the enrollment step, Eagle analyzes a series of
42
+ utterances from a particular speaker to learn their unique voiceprint. This step produces an `EagleProfile` object,
43
+ which can be stored and utilized during inference. During the Recognition step, Eagle compares the incoming frames of
44
+ audio to the voiceprints of all enrolled speakers in real-time to determine the similarity between them.
45
+
46
+ ### Speaker Enrollment
47
+
48
+ Create an instance of the profiler:
49
+
50
+ ```python
51
+ import pveagle
52
+
53
+ # AccessKey obtained from Picovoice Console (https://console.picovoice.ai/)
54
+ access_key = "${ACCESS_KEY}"
55
+ eagle_profiler = pveagle.create_profiler(access_key)
56
+ ```
57
+
58
+ `EagleProfiler` is responsible for processing and enrolling PCM audio data, with the valid audio sample rate determined
59
+ by `eagle_profiler.sample_rate`. The audio data must be 16-bit linearly-encoded and single-channel.
60
+
61
+ When passing samples to `eagle_profiler.enroll`, the number of samples must be at
62
+ least `eagle_profiler.min_enroll_samples` to ensure sufficient data for enrollment. The percentage value
63
+ obtained from this process indicates the progress of enrollment, while the feedback value can be utilized to determine
64
+ the status of the enrollment process.
65
+
66
+ ```python
67
+ def get_next_enroll_audio_data(num_samples):
68
+ pass
69
+
70
+
71
+ percentage = 0.0
72
+ while percentage < 100.0:
73
+ percentage, feedback = eagle_profiler.enroll(get_next_enroll_audio_data(eagle_profiler.min_enroll_samples))
74
+ print(feedback.name)
75
+ ```
76
+
77
+ After the percentage reaches 100%, the enrollment process is considered complete. While it is possible to continue
78
+ providing additional audio data to the profiler to improve the accuracy of the voiceprint, it is not necessary to do so.
79
+ Moreover, if the audio data submitted is unsuitable for enrollment, the feedback value will indicate the reason, and the
80
+ enrollment progress will remain unchanged.
81
+
82
+ ```python
83
+ speaker_profile = eagle_profiler.export()
84
+ ```
85
+
86
+ The `eagle_profiler.export()` function produces an `EagleProfile` object, which can be converted into a binary form
87
+ using the `EagleProfile.to_bytes()` method. This binary representation can be saved and subsequently retrieved using
88
+ the `EagleProfile.from_bytes()` method.
89
+
90
+ To reset the profiler and enroll a new speaker, the `eagle_profiler.reset()` method can be used. This method clears all
91
+ previously stored data, making it possible to start a new enrollment session with a different speaker.
92
+
93
+ Finally, when done be sure to explicitly release the resources:
94
+
95
+ ```python
96
+ eagle_profiler.delete()
97
+ ```
98
+
99
+ ### Speaker Recognition
100
+
101
+ Create an instance of the engine with one or more speaker profiles from the `EagleProfiler`:
102
+
103
+ ```python
104
+ eagle = pveagle.create_recognizer(access_key, speaker_profile)
105
+ ```
106
+
107
+ When initialized, `eagle.sample_rate` specifies the valid sample rate for Eagle. The expected length of a frame, or the
108
+ number of audio samples in an input array, is defined by `eagle.frame_length`.
109
+
110
+ Like the profiler, Eagle is designed to work with single-channel audio that is encoded using 16-bit linear PCM.
111
+
112
+ ```python
113
+ def get_next_audio_frame():
114
+ pass
115
+
116
+
117
+ while True:
118
+ scores = eagle.process(get_next_audio_frame())
119
+ ```
120
+
121
+ The `scores` array contains floating-point numbers that indicate the similarity between the input audio frame and the
122
+ enrolled speakers. Each value in the array corresponds to a specific enrolled speaker, maintaining the same order as the
123
+ speaker profiles provided during initialization. The values in the array range from 0.0 to 1.0, where higher values
124
+ indicate a stronger degree of similarity.
125
+
126
+ Finally, when done be sure to explicitly release the resources:
127
+
128
+ ```python
129
+ eagle.delete()
130
+ ```
131
+
132
+ ## Demos
133
+ [pveagledemo](https://pypi.org/project/pveagledemo/) provides command-line utilities for processing real-time
134
+ audio (i.e. microphone) and files using Eagle.
135
+
136
+ Keywords: Speaker Recognition,Speaker Identification,Voice Recognition,Voice Identification
137
+ Platform: UNKNOWN
138
+ Classifier: Development Status :: 4 - Beta
139
+ Classifier: Intended Audience :: Developers
140
+ Classifier: License :: OSI Approved :: Apache Software License
141
+ Classifier: Operating System :: OS Independent
142
+ Classifier: Programming Language :: Python :: 3
143
+ Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
144
+ Requires-Python: >=3.5
145
+ Description-Content-Type: text/markdown
@@ -42,7 +42,7 @@ with open(os.path.join(os.path.dirname(__file__), 'README.md'), 'r') as f:
42
42
 
43
43
  setuptools.setup(
44
44
  name="pveagle",
45
- version="0.1.0",
45
+ version="0.2.0",
46
46
  author="Picovoice",
47
47
  author_email="hello@picovoice.ai",
48
48
  description="Eagle Speaker Recognition Engine",
pveagle-0.1.0/PKG-INFO DELETED
@@ -1,145 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: pveagle
3
- Version: 0.1.0
4
- Summary: Eagle Speaker Recognition Engine
5
- Home-page: https://github.com/Picovoice/eagle
6
- Author: Picovoice
7
- Author-email: hello@picovoice.ai
8
- Keywords: Speaker Recognition,Speaker Identification,Voice Recognition,Voice Identification
9
- Classifier: Development Status :: 4 - Beta
10
- Classifier: Intended Audience :: Developers
11
- Classifier: License :: OSI Approved :: Apache Software License
12
- Classifier: Operating System :: OS Independent
13
- Classifier: Programming Language :: Python :: 3
14
- Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
15
- Requires-Python: >=3.5
16
- Description-Content-Type: text/markdown
17
-
18
- # Eagle Speaker Recognition Engine
19
-
20
- Made in Vancouver, Canada by [Picovoice](https://picovoice.ai)
21
-
22
- Eagle is an on-device speaker recognition engine. Eagle is:
23
-
24
- - Private; All voice processing runs locally.
25
- - Cross-Platform:
26
- - Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64)
27
- - Android and iOS
28
- - Chrome, Safari, Firefox, and Edge
29
- - Raspberry Pi (4, 3) and NVIDIA Jetson Nano
30
-
31
- ## Compatibility
32
-
33
- - Python 3.5 or higher
34
- - Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64), Raspberry Pi (4, 3), and NVIDIA Jetson Nano.
35
-
36
- ## Installation
37
-
38
- ```console
39
- pip3 install pveagle
40
- ```
41
-
42
- ## AccessKey
43
-
44
- Eagle requires a valid Picovoice `AccessKey` at initialization. `AccessKey` acts as your credentials when using Eagle
45
- SDKs. You can get your `AccessKey` for free. Make sure to keep your `AccessKey` secret.
46
- Signup or Login to [Picovoice Console](https://console.picovoice.ai/) to get your `AccessKey`.
47
-
48
- ## Usage
49
-
50
- Eagle has two distinct steps: Enrollment and Recognition. In the enrollment step, Eagle analyzes a series of
51
- utterances from a particular speaker to learn their unique voiceprint. This step produces an `EagleProfile` object,
52
- which can be stored and utilized during inference. During the Recognition step, Eagle compares the incoming frames of
53
- audio to the voiceprints of all enrolled speakers in real-time to determine the similarity between them.
54
-
55
- ### Speaker Enrollment
56
-
57
- Create an instance of the profiler:
58
-
59
- ```python
60
- import pveagle
61
-
62
- # AccessKey obtained from Picovoice Console (https://console.picovoice.ai/)
63
- access_key = "${ACCESS_KEY}"
64
- eagle_profiler = pveagle.create_profiler(access_key)
65
- ```
66
-
67
- `EagleProfiler` is responsible for processing and enrolling PCM audio data, with the valid audio sample rate determined
68
- by `eagle_profiler.sample_rate`. The audio data must be 16-bit linearly-encoded and single-channel.
69
-
70
- When passing samples to `eagle_profiler.enroll`, the number of samples must be at
71
- least `eagle_profiler.min_enroll_samples` to ensure sufficient data for enrollment. The percentage value
72
- obtained from this process indicates the progress of enrollment, while the feedback value can be utilized to determine
73
- the status of the enrollment process.
74
-
75
- ```python
76
- def get_next_enroll_audio_data(num_samples):
77
- pass
78
-
79
-
80
- percentage = 0.0
81
- while percentage < 100.0:
82
- percentage, feedback = eagle_profiler.enroll(get_next_enroll_audio_data(eagle_profiler.min_enroll_samples))
83
- print(feedback.name)
84
- ```
85
-
86
- After the percentage reaches 100%, the enrollment process is considered complete. While it is possible to continue
87
- providing additional audio data to the profiler to improve the accuracy of the voiceprint, it is not necessary to do so.
88
- Moreover, if the audio data submitted is unsuitable for enrollment, the feedback value will indicate the reason, and the
89
- enrollment progress will remain unchanged.
90
-
91
- ```python
92
- speaker_profile = eagle_profiler.export()
93
- ```
94
-
95
- The `eagle_profiler.export()` function produces an `EagleProfile` object, which can be converted into a binary form
96
- using the `EagleProfile.to_bytes()` method. This binary representation can be saved and subsequently retrieved using
97
- the `EagleProfile.from_bytes()` method.
98
-
99
- To reset the profiler and enroll a new speaker, the `eagle_profiler.reset()` method can be used. This method clears all
100
- previously stored data, making it possible to start a new enrollment session with a different speaker.
101
-
102
- Finally, when done be sure to explicitly release the resources:
103
-
104
- ```python
105
- eagle_profiler.delete()
106
- ```
107
-
108
- ### Speaker Recognition
109
-
110
- Create an instance of the engine with one or more speaker profiles from the `EagleProfiler`:
111
-
112
- ```python
113
- eagle = pveagle.create_recognizer(access_key, speaker_profile)
114
- ```
115
-
116
- When initialized, `eagle.sample_rate` specifies the valid sample rate for Eagle. The expected length of a frame, or the
117
- number of audio samples in an input array, is defined by `eagle.frame_length`.
118
-
119
- Like the profiler, Eagle is designed to work with single-channel audio that is encoded using 16-bit linear PCM.
120
-
121
- ```python
122
- def get_next_audio_frame():
123
- pass
124
-
125
-
126
- while True:
127
- scores = eagle.process(get_next_audio_frame())
128
- ```
129
-
130
- The `scores` array contains floating-point numbers that indicate the similarity between the input audio frame and the
131
- enrolled speakers. Each value in the array corresponds to a specific enrolled speaker, maintaining the same order as the
132
- speaker profiles provided during initialization. The values in the array range from 0.0 to 1.0, where higher values
133
- indicate a stronger degree of similarity.
134
-
135
- Finally, when done be sure to explicitly release the resources:
136
-
137
- ```python
138
- eagle.delete()
139
- ```
140
-
141
- ## Demos
142
- <!-- markdown-link-check-disable -->
143
- [pveagledemo](https://pypi.org/project/pveagledemo/) provides command-line utilities for processing real-time
144
- audio (i.e. microphone) and files using Eagle.
145
- <!-- markdown-link-check-enable -->
@@ -1,145 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: pveagle
3
- Version: 0.1.0
4
- Summary: Eagle Speaker Recognition Engine
5
- Home-page: https://github.com/Picovoice/eagle
6
- Author: Picovoice
7
- Author-email: hello@picovoice.ai
8
- Keywords: Speaker Recognition,Speaker Identification,Voice Recognition,Voice Identification
9
- Classifier: Development Status :: 4 - Beta
10
- Classifier: Intended Audience :: Developers
11
- Classifier: License :: OSI Approved :: Apache Software License
12
- Classifier: Operating System :: OS Independent
13
- Classifier: Programming Language :: Python :: 3
14
- Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
15
- Requires-Python: >=3.5
16
- Description-Content-Type: text/markdown
17
-
18
- # Eagle Speaker Recognition Engine
19
-
20
- Made in Vancouver, Canada by [Picovoice](https://picovoice.ai)
21
-
22
- Eagle is an on-device speaker recognition engine. Eagle is:
23
-
24
- - Private; All voice processing runs locally.
25
- - Cross-Platform:
26
- - Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64)
27
- - Android and iOS
28
- - Chrome, Safari, Firefox, and Edge
29
- - Raspberry Pi (4, 3) and NVIDIA Jetson Nano
30
-
31
- ## Compatibility
32
-
33
- - Python 3.5 or higher
34
- - Runs on Linux (x86_64), macOS (x86_64, arm64), Windows (x86_64), Raspberry Pi (4, 3), and NVIDIA Jetson Nano.
35
-
36
- ## Installation
37
-
38
- ```console
39
- pip3 install pveagle
40
- ```
41
-
42
- ## AccessKey
43
-
44
- Eagle requires a valid Picovoice `AccessKey` at initialization. `AccessKey` acts as your credentials when using Eagle
45
- SDKs. You can get your `AccessKey` for free. Make sure to keep your `AccessKey` secret.
46
- Signup or Login to [Picovoice Console](https://console.picovoice.ai/) to get your `AccessKey`.
47
-
48
- ## Usage
49
-
50
- Eagle has two distinct steps: Enrollment and Recognition. In the enrollment step, Eagle analyzes a series of
51
- utterances from a particular speaker to learn their unique voiceprint. This step produces an `EagleProfile` object,
52
- which can be stored and utilized during inference. During the Recognition step, Eagle compares the incoming frames of
53
- audio to the voiceprints of all enrolled speakers in real-time to determine the similarity between them.
54
-
55
- ### Speaker Enrollment
56
-
57
- Create an instance of the profiler:
58
-
59
- ```python
60
- import pveagle
61
-
62
- # AccessKey obtained from Picovoice Console (https://console.picovoice.ai/)
63
- access_key = "${ACCESS_KEY}"
64
- eagle_profiler = pveagle.create_profiler(access_key)
65
- ```
66
-
67
- `EagleProfiler` is responsible for processing and enrolling PCM audio data, with the valid audio sample rate determined
68
- by `eagle_profiler.sample_rate`. The audio data must be 16-bit linearly-encoded and single-channel.
69
-
70
- When passing samples to `eagle_profiler.enroll`, the number of samples must be at
71
- least `eagle_profiler.min_enroll_samples` to ensure sufficient data for enrollment. The percentage value
72
- obtained from this process indicates the progress of enrollment, while the feedback value can be utilized to determine
73
- the status of the enrollment process.
74
-
75
- ```python
76
- def get_next_enroll_audio_data(num_samples):
77
- pass
78
-
79
-
80
- percentage = 0.0
81
- while percentage < 100.0:
82
- percentage, feedback = eagle_profiler.enroll(get_next_enroll_audio_data(eagle_profiler.min_enroll_samples))
83
- print(feedback.name)
84
- ```
85
-
86
- After the percentage reaches 100%, the enrollment process is considered complete. While it is possible to continue
87
- providing additional audio data to the profiler to improve the accuracy of the voiceprint, it is not necessary to do so.
88
- Moreover, if the audio data submitted is unsuitable for enrollment, the feedback value will indicate the reason, and the
89
- enrollment progress will remain unchanged.
90
-
91
- ```python
92
- speaker_profile = eagle_profiler.export()
93
- ```
94
-
95
- The `eagle_profiler.export()` function produces an `EagleProfile` object, which can be converted into a binary form
96
- using the `EagleProfile.to_bytes()` method. This binary representation can be saved and subsequently retrieved using
97
- the `EagleProfile.from_bytes()` method.
98
-
99
- To reset the profiler and enroll a new speaker, the `eagle_profiler.reset()` method can be used. This method clears all
100
- previously stored data, making it possible to start a new enrollment session with a different speaker.
101
-
102
- Finally, when done be sure to explicitly release the resources:
103
-
104
- ```python
105
- eagle_profiler.delete()
106
- ```
107
-
108
- ### Speaker Recognition
109
-
110
- Create an instance of the engine with one or more speaker profiles from the `EagleProfiler`:
111
-
112
- ```python
113
- eagle = pveagle.create_recognizer(access_key, speaker_profile)
114
- ```
115
-
116
- When initialized, `eagle.sample_rate` specifies the valid sample rate for Eagle. The expected length of a frame, or the
117
- number of audio samples in an input array, is defined by `eagle.frame_length`.
118
-
119
- Like the profiler, Eagle is designed to work with single-channel audio that is encoded using 16-bit linear PCM.
120
-
121
- ```python
122
- def get_next_audio_frame():
123
- pass
124
-
125
-
126
- while True:
127
- scores = eagle.process(get_next_audio_frame())
128
- ```
129
-
130
- The `scores` array contains floating-point numbers that indicate the similarity between the input audio frame and the
131
- enrolled speakers. Each value in the array corresponds to a specific enrolled speaker, maintaining the same order as the
132
- speaker profiles provided during initialization. The values in the array range from 0.0 to 1.0, where higher values
133
- indicate a stronger degree of similarity.
134
-
135
- Finally, when done be sure to explicitly release the resources:
136
-
137
- ```python
138
- eagle.delete()
139
- ```
140
-
141
- ## Demos
142
- <!-- markdown-link-check-disable -->
143
- [pveagledemo](https://pypi.org/project/pveagledemo/) provides command-line utilities for processing real-time
144
- audio (i.e. microphone) and files using Eagle.
145
- <!-- markdown-link-check-enable -->
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes