pvleopard 1.1.4__tar.gz → 1.2.0__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- pvleopard-1.2.0/MANIFEST.in +6 -0
- {pvleopard-1.1.4 → pvleopard-1.2.0}/PKG-INFO +20 -1
- {pvleopard-1.1.4 → pvleopard-1.2.0}/README.md +15 -0
- pvleopard-1.2.0/pvleopard/__init__.py +14 -0
- pvleopard-1.1.4/pvleopard/__init__.py → pvleopard-1.2.0/pvleopard/_factory.py +8 -3
- pvleopard-1.1.4/pvleopard/leopard.py → pvleopard-1.2.0/pvleopard/_leopard.py +22 -10
- pvleopard-1.1.4/pvleopard/util.py → pvleopard-1.2.0/pvleopard/_util.py +1 -1
- {pvleopard-1.1.4 → pvleopard-1.2.0}/pvleopard/lib/common/leopard_params.pv +0 -0
- {pvleopard-1.1.4 → pvleopard-1.2.0}/pvleopard.egg-info/PKG-INFO +20 -1
- pvleopard-1.2.0/pvleopard.egg-info/SOURCES.txt +13 -0
- {pvleopard-1.1.4 → pvleopard-1.2.0}/setup.py +9 -7
- pvleopard-1.1.4/MANIFEST.in +0 -5
- pvleopard-1.1.4/pvleopard/lib/jetson/cortex-a57-aarch64/libpv_leopard.so +0 -0
- pvleopard-1.1.4/pvleopard/lib/linux/x86_64/libpv_leopard.so +0 -0
- pvleopard-1.1.4/pvleopard/lib/mac/arm64/libpv_leopard.dylib +0 -0
- pvleopard-1.1.4/pvleopard/lib/mac/x86_64/libpv_leopard.dylib +0 -0
- pvleopard-1.1.4/pvleopard/lib/raspberry-pi/cortex-a53/libpv_leopard.so +0 -0
- pvleopard-1.1.4/pvleopard/lib/raspberry-pi/cortex-a53-aarch64/libpv_leopard.so +0 -0
- pvleopard-1.1.4/pvleopard/lib/raspberry-pi/cortex-a72/libpv_leopard.so +0 -0
- pvleopard-1.1.4/pvleopard/lib/raspberry-pi/cortex-a72-aarch64/libpv_leopard.so +0 -0
- pvleopard-1.1.4/pvleopard/lib/windows/amd64/libpv_leopard.dll +0 -0
- pvleopard-1.1.4/pvleopard.egg-info/SOURCES.txt +0 -21
- {pvleopard-1.1.4 → pvleopard-1.2.0}/pvleopard/LICENSE +0 -0
- {pvleopard-1.1.4 → pvleopard-1.2.0}/pvleopard.egg-info/dependency_links.txt +0 -0
- {pvleopard-1.1.4 → pvleopard-1.2.0}/pvleopard.egg-info/top_level.txt +0 -0
- {pvleopard-1.1.4 → pvleopard-1.2.0}/setup.cfg +0 -0
@@ -1,11 +1,13 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pvleopard
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.2.0
|
4
4
|
Summary: Leopard Speech-to-Text Engine.
|
5
5
|
Home-page: https://github.com/Picovoice/leopard
|
6
6
|
Author: Picovoice
|
7
7
|
Author-email: hello@picovoice.ai
|
8
|
+
License: UNKNOWN
|
8
9
|
Keywords: Speech-to-Text,Speech Recognition,Voice Recognition,ASR,Automatic Speech Recognition
|
10
|
+
Platform: UNKNOWN
|
9
11
|
Classifier: Development Status :: 5 - Production/Stable
|
10
12
|
Classifier: Intended Audience :: Developers
|
11
13
|
Classifier: License :: OSI Approved :: Apache Software License
|
@@ -68,7 +70,24 @@ Replace `${ACCESS_KEY}` with yours obtained from [Picovoice Console](https://con
|
|
68
70
|
`${AUDIO_PATH}` to the path an audio file. Finally, when done be sure to explicitly release the resources using
|
69
71
|
`handle.delete()`.
|
70
72
|
|
73
|
+
## Language Model
|
74
|
+
|
75
|
+
The Leopard Python SDK comes preloaded with a default English language model (`.pv` file).
|
76
|
+
Default models for other supported languages can be found in [lib/common](../../lib/common).
|
77
|
+
|
78
|
+
Create custom language models using the [Picovoice Console](https://console.picovoice.ai/). Here you can train
|
79
|
+
language models with custom vocabulary and boost words in the existing vocabulary.
|
80
|
+
|
81
|
+
Pass in the `.pv` file via the `model_path` argument:
|
82
|
+
```python
|
83
|
+
handle = pvleopard.create(
|
84
|
+
access_key='${ACCESS_KEY}',
|
85
|
+
model_path='${MODEL_PATH}')
|
86
|
+
```
|
87
|
+
|
71
88
|
## Demos
|
72
89
|
|
73
90
|
[pvleoparddemo](https://pypi.org/project/pvleoparddemo/) provides command-line utilities for processing audio using
|
74
91
|
Leopard.
|
92
|
+
|
93
|
+
|
@@ -51,6 +51,21 @@ Replace `${ACCESS_KEY}` with yours obtained from [Picovoice Console](https://con
|
|
51
51
|
`${AUDIO_PATH}` to the path an audio file. Finally, when done be sure to explicitly release the resources using
|
52
52
|
`handle.delete()`.
|
53
53
|
|
54
|
+
## Language Model
|
55
|
+
|
56
|
+
The Leopard Python SDK comes preloaded with a default English language model (`.pv` file).
|
57
|
+
Default models for other supported languages can be found in [lib/common](../../lib/common).
|
58
|
+
|
59
|
+
Create custom language models using the [Picovoice Console](https://console.picovoice.ai/). Here you can train
|
60
|
+
language models with custom vocabulary and boost words in the existing vocabulary.
|
61
|
+
|
62
|
+
Pass in the `.pv` file via the `model_path` argument:
|
63
|
+
```python
|
64
|
+
handle = pvleopard.create(
|
65
|
+
access_key='${ACCESS_KEY}',
|
66
|
+
model_path='${MODEL_PATH}')
|
67
|
+
```
|
68
|
+
|
54
69
|
## Demos
|
55
70
|
|
56
71
|
[pvleoparddemo](https://pypi.org/project/pvleoparddemo/) provides command-line utilities for processing audio using
|
@@ -0,0 +1,14 @@
|
|
1
|
+
#
|
2
|
+
# Copyright 2022-2023 Picovoice Inc.
|
3
|
+
#
|
4
|
+
# You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE"
|
5
|
+
# file accompanying this source.
|
6
|
+
#
|
7
|
+
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
|
8
|
+
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
|
9
|
+
# specific language governing permissions and limitations under the License.
|
10
|
+
#
|
11
|
+
|
12
|
+
from ._factory import *
|
13
|
+
from ._leopard import *
|
14
|
+
from ._util import *
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright
|
2
|
+
# Copyright 2023 Picovoice Inc.
|
3
3
|
#
|
4
4
|
# You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE"
|
5
5
|
# file accompanying this source.
|
@@ -11,8 +11,8 @@
|
|
11
11
|
|
12
12
|
from typing import *
|
13
13
|
|
14
|
-
from .
|
15
|
-
from .
|
14
|
+
from ._leopard import Leopard
|
15
|
+
from ._util import default_library_path, default_model_path
|
16
16
|
|
17
17
|
|
18
18
|
def create(
|
@@ -42,3 +42,8 @@ def create(
|
|
42
42
|
model_path=model_path,
|
43
43
|
library_path=library_path,
|
44
44
|
enable_automatic_punctuation=enable_automatic_punctuation)
|
45
|
+
|
46
|
+
|
47
|
+
__all__ = [
|
48
|
+
'create',
|
49
|
+
]
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright 2018-
|
2
|
+
# Copyright 2018-2023 Picovoice Inc.
|
3
3
|
#
|
4
4
|
# You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE"
|
5
5
|
# file accompanying this source.
|
@@ -189,9 +189,17 @@ class Leopard(object):
|
|
189
189
|
|
190
190
|
self._sample_rate = library.pv_sample_rate()
|
191
191
|
|
192
|
-
self.
|
193
|
-
self.
|
194
|
-
|
192
|
+
self._transcript_delete_func = library.pv_leopard_transcript_delete
|
193
|
+
self._transcript_delete_func.argtypes = [
|
194
|
+
c_char_p
|
195
|
+
]
|
196
|
+
self._transcript_delete_func.restype = None
|
197
|
+
|
198
|
+
self._words_delete_func = library.pv_leopard_words_delete
|
199
|
+
self._words_delete_func.argtypes = [
|
200
|
+
POINTER(self.CWord)
|
201
|
+
]
|
202
|
+
self._words_delete_func.restype = None
|
195
203
|
|
196
204
|
Word = namedtuple('Word', ['word', 'start_sec', 'end_sec', 'confidence'])
|
197
205
|
|
@@ -221,6 +229,9 @@ class Leopard(object):
|
|
221
229
|
if status is not self.PicovoiceStatuses.SUCCESS:
|
222
230
|
raise self._PICOVOICE_STATUS_TO_EXCEPTION[status]()
|
223
231
|
|
232
|
+
transcript = c_transcript.value.decode('utf-8')
|
233
|
+
self._transcript_delete_func(c_transcript)
|
234
|
+
|
224
235
|
words = list()
|
225
236
|
for i in range(num_words.value):
|
226
237
|
word = self.Word(
|
@@ -230,10 +241,9 @@ class Leopard(object):
|
|
230
241
|
confidence=c_words[i].confidence)
|
231
242
|
words.append(word)
|
232
243
|
|
233
|
-
|
234
|
-
self._pv_free(c_words)
|
244
|
+
self._words_delete_func(c_words)
|
235
245
|
|
236
|
-
return
|
246
|
+
return transcript, words
|
237
247
|
|
238
248
|
def process_file(self, audio_path: str) -> Tuple[str, Sequence[Word]]:
|
239
249
|
"""
|
@@ -264,6 +274,9 @@ class Leopard(object):
|
|
264
274
|
)
|
265
275
|
raise self._PICOVOICE_STATUS_TO_EXCEPTION[status]()
|
266
276
|
|
277
|
+
transcript = c_transcript.value.decode('utf-8')
|
278
|
+
self._transcript_delete_func(c_transcript)
|
279
|
+
|
267
280
|
words = list()
|
268
281
|
for i in range(num_words.value):
|
269
282
|
word = self.Word(
|
@@ -273,10 +286,9 @@ class Leopard(object):
|
|
273
286
|
confidence=c_words[i].confidence)
|
274
287
|
words.append(word)
|
275
288
|
|
276
|
-
|
277
|
-
self._pv_free(c_words)
|
289
|
+
self._words_delete_func(c_words)
|
278
290
|
|
279
|
-
return
|
291
|
+
return transcript, words
|
280
292
|
|
281
293
|
def delete(self) -> None:
|
282
294
|
"""Releases resources acquired by Leopard."""
|
Binary file
|
@@ -1,11 +1,13 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pvleopard
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.2.0
|
4
4
|
Summary: Leopard Speech-to-Text Engine.
|
5
5
|
Home-page: https://github.com/Picovoice/leopard
|
6
6
|
Author: Picovoice
|
7
7
|
Author-email: hello@picovoice.ai
|
8
|
+
License: UNKNOWN
|
8
9
|
Keywords: Speech-to-Text,Speech Recognition,Voice Recognition,ASR,Automatic Speech Recognition
|
10
|
+
Platform: UNKNOWN
|
9
11
|
Classifier: Development Status :: 5 - Production/Stable
|
10
12
|
Classifier: Intended Audience :: Developers
|
11
13
|
Classifier: License :: OSI Approved :: Apache Software License
|
@@ -68,7 +70,24 @@ Replace `${ACCESS_KEY}` with yours obtained from [Picovoice Console](https://con
|
|
68
70
|
`${AUDIO_PATH}` to the path an audio file. Finally, when done be sure to explicitly release the resources using
|
69
71
|
`handle.delete()`.
|
70
72
|
|
73
|
+
## Language Model
|
74
|
+
|
75
|
+
The Leopard Python SDK comes preloaded with a default English language model (`.pv` file).
|
76
|
+
Default models for other supported languages can be found in [lib/common](../../lib/common).
|
77
|
+
|
78
|
+
Create custom language models using the [Picovoice Console](https://console.picovoice.ai/). Here you can train
|
79
|
+
language models with custom vocabulary and boost words in the existing vocabulary.
|
80
|
+
|
81
|
+
Pass in the `.pv` file via the `model_path` argument:
|
82
|
+
```python
|
83
|
+
handle = pvleopard.create(
|
84
|
+
access_key='${ACCESS_KEY}',
|
85
|
+
model_path='${MODEL_PATH}')
|
86
|
+
```
|
87
|
+
|
71
88
|
## Demos
|
72
89
|
|
73
90
|
[pvleoparddemo](https://pypi.org/project/pvleoparddemo/) provides command-line utilities for processing audio using
|
74
91
|
Leopard.
|
92
|
+
|
93
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
MANIFEST.in
|
2
|
+
README.md
|
3
|
+
setup.py
|
4
|
+
pvleopard/LICENSE
|
5
|
+
pvleopard/__init__.py
|
6
|
+
pvleopard/_factory.py
|
7
|
+
pvleopard/_leopard.py
|
8
|
+
pvleopard/_util.py
|
9
|
+
pvleopard.egg-info/PKG-INFO
|
10
|
+
pvleopard.egg-info/SOURCES.txt
|
11
|
+
pvleopard.egg-info/dependency_links.txt
|
12
|
+
pvleopard.egg-info/top_level.txt
|
13
|
+
pvleopard/lib/common/leopard_params.pv
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright 2022 Picovoice Inc.
|
2
|
+
# Copyright 2022-2023 Picovoice Inc.
|
3
3
|
#
|
4
4
|
# You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE"
|
5
5
|
# file accompanying this source.
|
@@ -22,8 +22,9 @@ os.mkdir(package_folder)
|
|
22
22
|
shutil.copy(os.path.join(os.path.dirname(__file__), '../../LICENSE'), package_folder)
|
23
23
|
|
24
24
|
shutil.copy(os.path.join(os.path.dirname(__file__), '__init__.py'), os.path.join(package_folder, '__init__.py'))
|
25
|
-
shutil.copy(os.path.join(os.path.dirname(__file__), '
|
26
|
-
shutil.copy(os.path.join(os.path.dirname(__file__), '
|
25
|
+
shutil.copy(os.path.join(os.path.dirname(__file__), '_factory.py'), os.path.join(package_folder, '_factory.py'))
|
26
|
+
shutil.copy(os.path.join(os.path.dirname(__file__), '_leopard.py'), os.path.join(package_folder, '_leopard.py'))
|
27
|
+
shutil.copy(os.path.join(os.path.dirname(__file__), '_util.py'), os.path.join(package_folder, '_util.py'))
|
27
28
|
|
28
29
|
platforms = ('jetson', 'linux', 'mac', 'raspberry-pi', 'windows')
|
29
30
|
|
@@ -36,9 +37,10 @@ for platform in ('common',) + platforms:
|
|
36
37
|
MANIFEST_IN = """
|
37
38
|
include pvleopard/LICENSE
|
38
39
|
include pvleopard/__init__.py
|
39
|
-
include pvleopard/
|
40
|
-
include pvleopard/
|
41
|
-
|
40
|
+
include pvleopard/_factory.py
|
41
|
+
include pvleopard/_leopard.py
|
42
|
+
include pvleopard/_util.py
|
43
|
+
include pvleopard/lib/common/leopard_params.pv
|
42
44
|
"""
|
43
45
|
|
44
46
|
with open(os.path.join(os.path.dirname(__file__), 'MANIFEST.in'), 'w') as f:
|
@@ -49,7 +51,7 @@ with open(os.path.join(os.path.dirname(__file__), 'README.md'), 'r') as f:
|
|
49
51
|
|
50
52
|
setuptools.setup(
|
51
53
|
name="pvleopard",
|
52
|
-
version="1.
|
54
|
+
version="1.2.0",
|
53
55
|
author="Picovoice",
|
54
56
|
author_email="hello@picovoice.ai",
|
55
57
|
description="Leopard Speech-to-Text Engine.",
|
pvleopard-1.1.4/MANIFEST.in
DELETED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,21 +0,0 @@
|
|
1
|
-
MANIFEST.in
|
2
|
-
README.md
|
3
|
-
setup.py
|
4
|
-
pvleopard/LICENSE
|
5
|
-
pvleopard/__init__.py
|
6
|
-
pvleopard/leopard.py
|
7
|
-
pvleopard/util.py
|
8
|
-
pvleopard.egg-info/PKG-INFO
|
9
|
-
pvleopard.egg-info/SOURCES.txt
|
10
|
-
pvleopard.egg-info/dependency_links.txt
|
11
|
-
pvleopard.egg-info/top_level.txt
|
12
|
-
pvleopard/lib/common/leopard_params.pv
|
13
|
-
pvleopard/lib/jetson/cortex-a57-aarch64/libpv_leopard.so
|
14
|
-
pvleopard/lib/linux/x86_64/libpv_leopard.so
|
15
|
-
pvleopard/lib/mac/arm64/libpv_leopard.dylib
|
16
|
-
pvleopard/lib/mac/x86_64/libpv_leopard.dylib
|
17
|
-
pvleopard/lib/raspberry-pi/cortex-a53/libpv_leopard.so
|
18
|
-
pvleopard/lib/raspberry-pi/cortex-a53-aarch64/libpv_leopard.so
|
19
|
-
pvleopard/lib/raspberry-pi/cortex-a72/libpv_leopard.so
|
20
|
-
pvleopard/lib/raspberry-pi/cortex-a72-aarch64/libpv_leopard.so
|
21
|
-
pvleopard/lib/windows/amd64/libpv_leopard.dll
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|