libspeech 0.2.0__cp312-abi3-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- libspeech/__init__.py +114 -0
- libspeech/__main__.py +33 -0
- libspeech/_about.pyd +0 -0
- libspeech/core.py +15 -0
- libspeech/onnxruntime.dll +0 -0
- libspeech/onnxruntime_providers_shared.dll +0 -0
- libspeech/speech.dll +0 -0
- libspeech/speech_audio_py.pyd +0 -0
- libspeech/speech_dsp_py.pyd +0 -0
- libspeech/speech_io_py.pyd +0 -0
- libspeech/speech_models_py.pyd +0 -0
- libspeech-0.2.0.dist-info/METADATA +221 -0
- libspeech-0.2.0.dist-info/RECORD +15 -0
- libspeech-0.2.0.dist-info/WHEEL +5 -0
- libspeech-0.2.0.dist-info/licenses/LICENSE +36 -0
libspeech/__init__.py
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import sys
|
|
5
|
+
from ctypes import *
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
_here = Path(__file__).parent
|
|
9
|
+
|
|
10
|
+
# On Windows, loading one DLL (e.g. speech.dll) that itself implicitly
|
|
11
|
+
# needs another (httpp_core.dll, onnxruntime.dll) only searches a fixed
|
|
12
|
+
# set of directories for that dependency -- the loading DLL's own
|
|
13
|
+
# directory, System32, PATH, etc -- which does NOT include wherever we
|
|
14
|
+
# explicitly cdll.LoadLibrary() a dependency FROM if that happens to be
|
|
15
|
+
# some other, unrelated directory (httpp's own install dir is nowhere
|
|
16
|
+
# near libspeech's). os.add_dll_directory() (the mechanism Python 3.8+
|
|
17
|
+
# itself introduced to replace the old implicit-PATH/CWD search it
|
|
18
|
+
# removed for security reasons) adds a directory to that search list for
|
|
19
|
+
# the rest of the process, so speech.dll's own implicit dependency
|
|
20
|
+
# resolution can actually find libhttpp_core.so/httpp_core.dll wherever
|
|
21
|
+
# httpp really lives, not just next to speech.dll itself.
|
|
22
|
+
if sys.platform == "win32":
|
|
23
|
+
os.add_dll_directory(str(_here))
|
|
24
|
+
|
|
25
|
+
# ONNXRuntime and speech itself each ship as a separate shared library we
|
|
26
|
+
# load explicitly before importing the compiled extensions (they dlopen
|
|
27
|
+
# symbols from these at import time). Both get bundled right next to this
|
|
28
|
+
# __init__.py by CMakeLists.txt (see the SKBUILD install() rule / the
|
|
29
|
+
# local dev build's LIBRARY_OUTPUT_DIRECTORY) rather than found via
|
|
30
|
+
# RPATH: an RPATH baked in at build time would only point back at
|
|
31
|
+
# wherever the ONNXRuntime download happened to land on the *build*
|
|
32
|
+
# machine, which has no reason to exist -- or be the same path -- on
|
|
33
|
+
# whatever machine later installs this wheel. Loading a bundled copy by
|
|
34
|
+
# explicit path here works regardless of where/how this package itself
|
|
35
|
+
# ends up installed.
|
|
36
|
+
#
|
|
37
|
+
# Each filename varies by platform (libspeech.so / speech.dll /
|
|
38
|
+
# libspeech.dylib), and ONNXRuntime's is version-suffixed on top of that
|
|
39
|
+
# (e.g. libonnxruntime.so.1.21.0). Rather than guess any of that here
|
|
40
|
+
# (hardcoding one platform's name, or globbing for a pattern that only
|
|
41
|
+
# happens to match some platforms), CMake computes the exact filename it
|
|
42
|
+
# actually produced for each one and bakes it into _about -- see the
|
|
43
|
+
# target_compile_definitions() call on the _about target in
|
|
44
|
+
# CMakeLists.txt, and about.cpp. _about is itself a tiny, dependency-free
|
|
45
|
+
# compiled module (no link against speech/httpp/ONNXRuntime), so it's
|
|
46
|
+
# safe to import before any of those are loaded.
|
|
47
|
+
from ._about import HTTPP_LIB_PATH, LIB_PATH, ONNXRUNTIME_LIB_PATH, __version__
|
|
48
|
+
|
|
49
|
+
# httpp is a separate package (pip install httpp), not bundled inside
|
|
50
|
+
# libspeech -- loaded straight from wherever the installed httpp package
|
|
51
|
+
# actually lives, via httpp's own get_lib_dir() helper, so libspeech
|
|
52
|
+
# always runs against whatever httpp build is really installed rather
|
|
53
|
+
# than a copy shipped in here. This is a normal Python import, so it
|
|
54
|
+
# works the same way on every platform and in a local dev build too (no
|
|
55
|
+
# site-packages layout to assume, no symlink needed) -- httpp only has to
|
|
56
|
+
# be importable, same as any other Python dependency.
|
|
57
|
+
try:
|
|
58
|
+
import httpp
|
|
59
|
+
except ImportError as e:
|
|
60
|
+
msg = "libspeech requires the 'httpp' package. Install it with: pip install httpp"
|
|
61
|
+
raise ImportError(msg) from e
|
|
62
|
+
|
|
63
|
+
_httpp_lib_dir = Path(httpp.get_lib_dir())
|
|
64
|
+
if sys.platform == "win32":
|
|
65
|
+
os.add_dll_directory(str(_httpp_lib_dir))
|
|
66
|
+
|
|
67
|
+
# HTTPP_LIB_PATH is only the filename (computed by CMake, see above);
|
|
68
|
+
# httpp.get_lib_dir() is httpp's own answer for where that filename lives.
|
|
69
|
+
cdll.LoadLibrary(str(_httpp_lib_dir / HTTPP_LIB_PATH))
|
|
70
|
+
|
|
71
|
+
cdll.LoadLibrary(str(_here / ONNXRUNTIME_LIB_PATH))
|
|
72
|
+
|
|
73
|
+
# NOTE: AudioFlux is statically linked into libspeech.so itself (see
|
|
74
|
+
# CMakeLists.txt: speech_dsp/speech_models are STATIC libraries), so there
|
|
75
|
+
# is no separate libaudioflux.so to preload here -- only libspeech.so
|
|
76
|
+
# itself needs an explicit load (httpp and ONNXRuntime, both dynamically
|
|
77
|
+
# linked, were already preloaded above).
|
|
78
|
+
cdll.LoadLibrary(str(_here / LIB_PATH))
|
|
79
|
+
from .speech_dsp_py import (
|
|
80
|
+
FFT,
|
|
81
|
+
MFCC,
|
|
82
|
+
STFT,
|
|
83
|
+
MFCCParams,
|
|
84
|
+
Resample,
|
|
85
|
+
WindowType,
|
|
86
|
+
dct,
|
|
87
|
+
window,
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
# The compiled extension modules (_about, speech_io_py, ...) are
|
|
91
|
+
# intentionally underscore/private-prefixed and not meant to be imported
|
|
92
|
+
# directly by users -- `import libspeech; libspeech.Audio(...)`, not
|
|
93
|
+
# `import speech_io_py`. Re-export the public names here, matching ctoon's
|
|
94
|
+
# `from .ctoon_py import *` pattern. Module names mirror the CMake target
|
|
95
|
+
# names (speech_dsp/speech_io/speech_models -> speech_dsp_py/speech_io_py/
|
|
96
|
+
# speech_models_py) so the two naming schemes stay in sync.
|
|
97
|
+
from .speech_io_py import Audio
|
|
98
|
+
from .speech_models_py import Denoiser, SileroVad, SpeechTimestamp
|
|
99
|
+
|
|
100
|
+
__all__ = [
|
|
101
|
+
"FFT",
|
|
102
|
+
"MFCC",
|
|
103
|
+
"STFT",
|
|
104
|
+
"Audio",
|
|
105
|
+
"Denoiser",
|
|
106
|
+
"MFCCParams",
|
|
107
|
+
"Resample",
|
|
108
|
+
"SileroVad",
|
|
109
|
+
"SpeechTimestamp",
|
|
110
|
+
"WindowType",
|
|
111
|
+
"__version__",
|
|
112
|
+
"dct",
|
|
113
|
+
"window",
|
|
114
|
+
]
|
libspeech/__main__.py
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/bin/python3
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import argparse
|
|
5
|
+
import sys
|
|
6
|
+
|
|
7
|
+
from . import Host, Url, __doc__, __version__
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def show_if_not_none(_str, _class):
|
|
11
|
+
if _str is not None:
|
|
12
|
+
print(_class(_str).to_json())
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def main(args):
|
|
16
|
+
show_if_not_none(args.url, Url)
|
|
17
|
+
show_if_not_none(args.host, Host)
|
|
18
|
+
if args.version:
|
|
19
|
+
print(__version__)
|
|
20
|
+
if args.doc:
|
|
21
|
+
print(__doc__)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
if __name__ == '__main__':
|
|
25
|
+
parser = argparse.ArgumentParser()
|
|
26
|
+
parser.add_argument("--url", type=str, default=None,
|
|
27
|
+
help="enter entire url (for example: \"https://google.com/about\")")
|
|
28
|
+
parser.add_argument("--host", type=str, default=None,
|
|
29
|
+
help="enter just host part of url (for example: \"google.com\")")
|
|
30
|
+
parser.add_argument('-v', '--version', action='store_true', help="showing version of module")
|
|
31
|
+
parser.add_argument('--doc', action='store_true', help="showing version of module")
|
|
32
|
+
args = parser.parse_args(args=None if sys.argv[1:] else ['--help'])
|
|
33
|
+
main(args)
|
libspeech/_about.pyd
ADDED
|
Binary file
|
libspeech/core.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/bin/python3
|
|
2
|
+
from __future__ import annotations
|
|
3
|
+
|
|
4
|
+
import warnings
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
# ctypes.CDLL(Path(__file__).parent/"libspeech.so")
|
|
8
|
+
from ._audio import Audio
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def warning_on_one_line(message, category, filename, lineno, file=None, line=None):
|
|
12
|
+
return f'{filename}:{lineno}: {category.__name__}: {message}\n'
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
Binary file
|
|
Binary file
|
libspeech/speech.dll
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: libspeech
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Best library for speech
|
|
5
|
+
Author-Email: Mohammad Raziei <mohammadraziei1375@gmail.com>
|
|
6
|
+
Classifier: Development Status :: 4 - Beta
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Classifier: Operating System :: OS Independent
|
|
9
|
+
Classifier: Programming Language :: C++
|
|
10
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
11
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Project-URL: Homepage, https://github.com/mohammadraziei/libspeech
|
|
19
|
+
Project-URL: Bug Tracker, https://github.com/mohammadraziei/libspeech/issues
|
|
20
|
+
Project-URL: Document, https://mohammadraziei.github.io/libspeech/latest
|
|
21
|
+
Requires-Python: >=3.8
|
|
22
|
+
Requires-Dist: httpp>=0.6.0
|
|
23
|
+
Provides-Extra: test
|
|
24
|
+
Requires-Dist: pytest-xdist; extra == "test"
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
|
|
27
|
+
<p align="center">
|
|
28
|
+
<a href="https://github.com/mohammadraziei/libspeech">
|
|
29
|
+
<img src="https://raw.githubusercontent.com/MohammadRaziei/libspeech/master/docs/logo/libspeech-logo-pods.svg" alt="LibSpeech Logo" width="300">
|
|
30
|
+
</a>
|
|
31
|
+
<h2 align="center">LibSpeech</h2>
|
|
32
|
+
<h3 align="center">Lightweight Speech Processing Library</h3>
|
|
33
|
+
</p>
|
|
34
|
+
|
|
35
|
+
<p align="center">
|
|
36
|
+
<em>C++ library with Python bindings for audio I/O, DSP, and ONNX-based speech models -- built to install with nothing but <code>pip</code>, no system dependencies (libcurl, OpenSSL, ...) required.</em>
|
|
37
|
+
</p>
|
|
38
|
+
|
|
39
|
+
<div align="center">
|
|
40
|
+
|
|
41
|
+
[](https://github.com/mohammadraziei/libspeech/releases)
|
|
42
|
+
[](LICENSE)
|
|
43
|
+
[](https://pypi.org/project/libspeech/)
|
|
44
|
+
[](https://en.cppreference.com/w/cpp/17)
|
|
45
|
+
|
|
46
|
+
[](https://github.com/mohammadraziei/libspeech/actions)
|
|
47
|
+
[](https://sonarcloud.io/summary/new_code?id=MohammadRaziei_libspeech)
|
|
48
|
+
[](https://www.codefactor.io/repository/github/mohammadraziei/libspeech/overview/master)
|
|
49
|
+
[](https://snyk.io/advisor/python/libspeech)
|
|
50
|
+
[](https://pypi.org/project/libspeech/)
|
|
51
|
+
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
## โจ Key Features
|
|
55
|
+
|
|
56
|
+
- ๐ **ONNX Runtime powered** models, without a heavy LibTorch dependency
|
|
57
|
+
- ๐๏ธ **Audio I/O** (`speech::io`): load/save WAV/MP3/FLAC, playback, resample, mono-mixing
|
|
58
|
+
- ๐งฎ **DSP** (`speech::dsp`): Resample, window functions, FFT/IFFT, DCT/IDCT, STFT/ISTFT, MFCC -- all with their own C++ unit tests and Python bindings
|
|
59
|
+
- ๐ **Speech models** (`speech::models`): a `Denoiser` interface (Facebook/SpeechBrain backends) and Silero VAD
|
|
60
|
+
- ๐ฅ๏ธ **Cross-platform**: Windows, Linux, macOS
|
|
61
|
+
- ๐ **Python bindings** (nanobind) mirroring the C++ API 1:1
|
|
62
|
+
- ๐ฆ **Zero system dependencies**: no `apt install libcurl-dev` / OpenSSL needed -- HTTPS model downloads go through a vendored [cpp-httplib](https://github.com/yhirose/cpp-httplib) + [Mbed TLS](https://github.com/Mbed-TLS/mbedtls) built from source
|
|
63
|
+
|
|
64
|
+
## ๐ฆ Installation
|
|
65
|
+
|
|
66
|
+
### Python package
|
|
67
|
+
```bash
|
|
68
|
+
pip install libspeech
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### From source (C++/CMake)
|
|
72
|
+
```bash
|
|
73
|
+
git clone https://github.com/MohammadRaziei/libspeech.git
|
|
74
|
+
cd libspeech
|
|
75
|
+
git submodule update --init src/third_party/miniaudio src/third_party/dr_libs src/third_party/indicators
|
|
76
|
+
|
|
77
|
+
# Mbed TLS is pinned to v3.6.2 and kept as a shallow submodule (see .gitmodules):
|
|
78
|
+
git submodule update --init src/third_party/mbedtls
|
|
79
|
+
git submodule update --init --depth 1 src/third_party/mbedtls/framework
|
|
80
|
+
|
|
81
|
+
mkdir build && cd build
|
|
82
|
+
cmake .. # downloads ONNX Runtime automatically on first configure
|
|
83
|
+
cmake --build . -j$(nproc)
|
|
84
|
+
ctest # runs the full test suite (see "Testing" below)
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Only want the DSP layer (no ONNX Runtime/network access needed at all)?
|
|
88
|
+
```bash
|
|
89
|
+
cmake .. -DBUILD_MODELS=OFF
|
|
90
|
+
cmake --build . -j$(nproc)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## ๐ Quick Start
|
|
94
|
+
|
|
95
|
+
### Python
|
|
96
|
+
|
|
97
|
+
```python
|
|
98
|
+
import libspeech
|
|
99
|
+
|
|
100
|
+
# --- Audio I/O ---
|
|
101
|
+
audio = libspeech.Audio()
|
|
102
|
+
audio.load("sample.wav")
|
|
103
|
+
mono = audio.to_mono()
|
|
104
|
+
resampled = mono.resample(16000)
|
|
105
|
+
resampled.save("sample_16k_mono.wav")
|
|
106
|
+
|
|
107
|
+
# --- DSP ---
|
|
108
|
+
mfcc = libspeech.MFCC(libspeech.MFCCParams())
|
|
109
|
+
coefficients = mfcc.compute(resampled.data(0)) # [num_frames][num_coefficients]
|
|
110
|
+
|
|
111
|
+
# --- Speech models ---
|
|
112
|
+
denoiser = libspeech.Denoiser.create("facebook", "facebook_denoiser.onnx")
|
|
113
|
+
clean = denoiser.process(resampled.data(0))
|
|
114
|
+
|
|
115
|
+
vad = libspeech.SileroVad()
|
|
116
|
+
vad.process(resampled.data(0))
|
|
117
|
+
for segment in vad.get_speech_timestamps():
|
|
118
|
+
print(f"speech from {segment.start_s:.2f}s to {segment.end_s:.2f}s")
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### C++
|
|
122
|
+
|
|
123
|
+
```cpp
|
|
124
|
+
#include "libspeech/audio.h"
|
|
125
|
+
#include "libspeech/dsp/mfcc.h"
|
|
126
|
+
#include "libspeech/models/denoiser.h"
|
|
127
|
+
|
|
128
|
+
speech::io::Audio audio;
|
|
129
|
+
audio.load("sample.wav");
|
|
130
|
+
auto resampled = audio.to_mono().resample(16000);
|
|
131
|
+
|
|
132
|
+
speech::dsp::MFCC::Params params;
|
|
133
|
+
params.sampleRate = 16000;
|
|
134
|
+
speech::dsp::MFCC mfcc(params);
|
|
135
|
+
auto coefficients = mfcc.compute(resampled.data(0));
|
|
136
|
+
|
|
137
|
+
auto denoiser = speech::models::Denoiser::Create("facebook", "facebook_denoiser.onnx");
|
|
138
|
+
auto clean = denoiser->process(resampled.data(0));
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
See [`examples/`](examples/) for complete, runnable programs.
|
|
142
|
+
|
|
143
|
+
## ๐งช Testing
|
|
144
|
+
|
|
145
|
+
Tests are organized by language and module (`speech_test_<language>_<module>`),
|
|
146
|
+
all discoverable via `cmake --build build --target help`:
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
speech_test # everything
|
|
150
|
+
โโโ speech_test_cpp
|
|
151
|
+
โ โโโ speech_test_cpp_dsp # speech::dsp (C++), no network/ONNX needed
|
|
152
|
+
โ โโโ speech_test_cpp_models # speech::models (C++)
|
|
153
|
+
โโโ speech_test_python
|
|
154
|
+
โโโ speech_test_python_audio # libspeech.Audio
|
|
155
|
+
โโโ speech_test_python_dsp # libspeech.Resample/FFT/STFT/MFCC/...
|
|
156
|
+
โโโ speech_test_python_models # libspeech.Denoiser/SileroVad
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Run everything with `cmake --build build --target speech_test`, or just
|
|
160
|
+
`ctest` for the same suites without the extra build-tool chatter.
|
|
161
|
+
|
|
162
|
+
## ๐ง Architecture
|
|
163
|
+
|
|
164
|
+
libspeech is split into three independent C++ libraries (each with its own
|
|
165
|
+
CMake target/namespace/Python module), aggregated by an umbrella `speech`
|
|
166
|
+
library:
|
|
167
|
+
|
|
168
|
+
| Namespace | CMake target | Python module | Depends on |
|
|
169
|
+
|---|---|---|---|
|
|
170
|
+
| `speech::dsp` | `speech_dsp` | `speech_dsp_py` | nothing but a vendored subset of [AudioFlux](https://github.com/libAudioFlux/audioflux)'s C sources |
|
|
171
|
+
| `speech::io` | `speech_io` | `speech_io_py` | `speech::dsp` (for resampling), miniaudio, dr_libs |
|
|
172
|
+
| `speech::models` | `speech_models` | `speech_models_py` | ONNX Runtime, httplib+Mbed TLS (for downloading model weights) |
|
|
173
|
+
|
|
174
|
+
See [`checklist.md`](checklist.md) for the detailed, up-to-date state of
|
|
175
|
+
the project (what's done, what's in progress, known issues), and
|
|
176
|
+
[`audioflux_issues.md`](audioflux_issues.md) for a couple of real bugs
|
|
177
|
+
found in AudioFlux while vendoring it (with repro steps and fixes, in case
|
|
178
|
+
they're useful upstream).
|
|
179
|
+
|
|
180
|
+
## ๐ Benchmarking
|
|
181
|
+
|
|
182
|
+
`benchmarks/` is a **fully standalone** CMake project (no relationship to
|
|
183
|
+
the repository root) that fetches libspeech from GitHub via
|
|
184
|
+
`FetchContent`, exactly like it would fetch any competitor library --
|
|
185
|
+
libspeech is never a special case in there. Mirrors the layout of
|
|
186
|
+
`tests/`: one folder per language.
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
cd benchmarks
|
|
190
|
+
cmake -S . -B build-bench -DCMAKE_BUILD_TYPE=Release
|
|
191
|
+
cmake --build build-bench --target libspeech_benchmarks
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
`benchmarks/cpp/bench_stft.cpp` measures `speech::dsp::STFT`, specifically
|
|
195
|
+
to A/B test whether enabling OpenMP's parallel-frame path
|
|
196
|
+
(`LIBSPEECH_ENABLE_OPENMP`, on by default) actually helps -- STFT frames
|
|
197
|
+
are independent so this *should* scale with core count, but this couldn't
|
|
198
|
+
be verified in this project's own single-core development sandbox (see
|
|
199
|
+
`checklist.md`). If you have a multi-core machine, please run this and
|
|
200
|
+
report back:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
cmake -S . -B build-bench -DCMAKE_BUILD_TYPE=Release -DLIBSPEECH_ENABLE_OPENMP=ON
|
|
204
|
+
cmake --build build-bench --target bench_stft && ./build-bench/cpp/bench_stft
|
|
205
|
+
|
|
206
|
+
cmake -S . -B build-bench -DLIBSPEECH_ENABLE_OPENMP=OFF
|
|
207
|
+
cmake --build build-bench --target bench_stft && ./build-bench/cpp/bench_stft
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
Compare the two `avg=...ms` numbers -- that's the real effect of enabling
|
|
211
|
+
OpenMP on your hardware.
|
|
212
|
+
|
|
213
|
+
## ๐ค Contributing
|
|
214
|
+
|
|
215
|
+
We welcome contributions! Please see [`CONTRIBUTING.md`](CONTRIBUTING.md).
|
|
216
|
+
|
|
217
|
+
## ๐ License
|
|
218
|
+
|
|
219
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
220
|
+
|
|
221
|
+
[](https://starchart.cc/mohammadraziei/libspeech)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
libspeech/__init__.py,sha256=ctTxTgDL13LXnct8zDMVO50vinM_xDNujvIM8eBY3-w,5019
|
|
2
|
+
libspeech/__main__.py,sha256=RfOmaGYL-JqkHol9P6oPpFleqDluBvFETN7GcQfCLjY,1078
|
|
3
|
+
libspeech/_about.pyd,sha256=PWIlzTI5MwMHsu5zVUIm54joH6wGYaN6ZLhPRP74Grs,148480
|
|
4
|
+
libspeech/core.py,sha256=UHoSTx6ydjjs47CX8FrsYtdopDugscWOHY9v8F5RAGw,343
|
|
5
|
+
libspeech/onnxruntime.dll,sha256=KiR4m7BnaP5B5Sh8o_NYUYYbx5AtL1v2jGu5pNw8czI,13006392
|
|
6
|
+
libspeech/onnxruntime_providers_shared.dll,sha256=YJihQCMYsg-C-oh5gTWeY7A5R9AfvHcbJXevikT_ttE,22048
|
|
7
|
+
libspeech/speech.dll,sha256=tccTTQ7-LGkbZqJJCBdKwtGn_VHVmYa8vN0Th60N8Vg,797696
|
|
8
|
+
libspeech/speech_audio_py.pyd,sha256=9J22W_80j0cmsFZEawCNCG_wXUtOCYN-V6fWOAlym0A,164352
|
|
9
|
+
libspeech/speech_dsp_py.pyd,sha256=rbSAz9gzyDQ7tMTcSfLEoj2QKQY4jSkPLlvCVK10pCo,170496
|
|
10
|
+
libspeech/speech_io_py.pyd,sha256=ZPgo_cg1ML7QkkxNeIfTu7gKR-xmuf6MYnf2Cbv5Eeo,164352
|
|
11
|
+
libspeech/speech_models_py.pyd,sha256=zZMjHD2yhTEkvyNnkWd504bevvMuo29otl2rdPh_y2g,162816
|
|
12
|
+
libspeech-0.2.0.dist-info/METADATA,sha256=i4Hsd-zZDd0WHE7QKH0sxyXpdtlmCbBBhxHQprM0l2Q,9210
|
|
13
|
+
libspeech-0.2.0.dist-info/WHEEL,sha256=5ml-wNaeRKDYXu-TApi0xYDjo761u9hbeCC2pq12vdU,104
|
|
14
|
+
libspeech-0.2.0.dist-info/licenses/LICENSE,sha256=N_R9-5l0U5HZyk0-el1LtB0nxSXttAIy78h4x_w_bgk,2218
|
|
15
|
+
libspeech-0.2.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Copyright (c) 2016 The Pybind Development Team, All rights reserved.
|
|
2
|
+
|
|
3
|
+
Redistribution and use in source and binary forms, with or without
|
|
4
|
+
modification, are permitted provided that the following conditions are met:
|
|
5
|
+
|
|
6
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
7
|
+
list of conditions and the following disclaimer.
|
|
8
|
+
|
|
9
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
10
|
+
this list of conditions and the following disclaimer in the documentation
|
|
11
|
+
and/or other materials provided with the distribution.
|
|
12
|
+
|
|
13
|
+
3. Neither the name of the copyright holder nor the names of its contributors
|
|
14
|
+
may be used to endorse or promote products derived from this software
|
|
15
|
+
without specific prior written permission.
|
|
16
|
+
|
|
17
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
18
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
19
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
20
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
21
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
22
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
23
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
24
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
25
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
26
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
27
|
+
|
|
28
|
+
You are under no obligation whatsoever to provide any bug fixes, patches, or
|
|
29
|
+
upgrades to the features, functionality or performance of the source code
|
|
30
|
+
("Enhancements") to anyone; however, if you choose to make your Enhancements
|
|
31
|
+
available either publicly, or directly to the author of this software, without
|
|
32
|
+
imposing a separate written license agreement for such Enhancements, then you
|
|
33
|
+
hereby grant the following license: a non-exclusive, royalty-free perpetual
|
|
34
|
+
license to install, use, modify, prepare derivative works, incorporate into
|
|
35
|
+
other computer software, distribute, and sublicense such enhancements or
|
|
36
|
+
derivative works thereof, in binary and source code form.
|