openspeechapi 0.1.0__py3-none-any.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.
- openspeech/__init__.py +75 -0
- openspeech/__main__.py +5 -0
- openspeech/cli.py +413 -0
- openspeech/client/__init__.py +4 -0
- openspeech/client/client.py +145 -0
- openspeech/config.py +212 -0
- openspeech/core/__init__.py +0 -0
- openspeech/core/base.py +75 -0
- openspeech/core/enums.py +39 -0
- openspeech/core/models.py +61 -0
- openspeech/core/registry.py +37 -0
- openspeech/core/settings.py +8 -0
- openspeech/demo.py +675 -0
- openspeech/dispatch/__init__.py +0 -0
- openspeech/dispatch/context.py +34 -0
- openspeech/dispatch/dispatcher.py +661 -0
- openspeech/dispatch/executors/__init__.py +0 -0
- openspeech/dispatch/executors/base.py +34 -0
- openspeech/dispatch/executors/in_process.py +66 -0
- openspeech/dispatch/executors/remote.py +64 -0
- openspeech/dispatch/executors/subprocess_exec.py +446 -0
- openspeech/dispatch/fanout.py +95 -0
- openspeech/dispatch/filters.py +73 -0
- openspeech/dispatch/lifecycle.py +178 -0
- openspeech/dispatch/watcher.py +82 -0
- openspeech/engine_catalog.py +236 -0
- openspeech/engine_registry.yaml +347 -0
- openspeech/exceptions.py +51 -0
- openspeech/factory.py +325 -0
- openspeech/local_engines/__init__.py +12 -0
- openspeech/local_engines/aim_resolver.py +91 -0
- openspeech/local_engines/backends/__init__.py +1 -0
- openspeech/local_engines/backends/docker_backend.py +490 -0
- openspeech/local_engines/backends/native_backend.py +902 -0
- openspeech/local_engines/base.py +30 -0
- openspeech/local_engines/engines/__init__.py +1 -0
- openspeech/local_engines/engines/faster_whisper.py +36 -0
- openspeech/local_engines/engines/fish_speech.py +33 -0
- openspeech/local_engines/engines/sherpa_onnx.py +56 -0
- openspeech/local_engines/engines/whisper.py +41 -0
- openspeech/local_engines/engines/whisperlivekit.py +60 -0
- openspeech/local_engines/manager.py +208 -0
- openspeech/local_engines/models.py +50 -0
- openspeech/local_engines/progress.py +69 -0
- openspeech/local_engines/registry.py +19 -0
- openspeech/local_engines/task_store.py +52 -0
- openspeech/local_engines/tasks.py +71 -0
- openspeech/logging_config.py +607 -0
- openspeech/observe/__init__.py +0 -0
- openspeech/observe/base.py +79 -0
- openspeech/observe/debug.py +44 -0
- openspeech/observe/latency.py +19 -0
- openspeech/observe/metrics.py +47 -0
- openspeech/observe/tracing.py +44 -0
- openspeech/observe/usage.py +27 -0
- openspeech/providers/__init__.py +0 -0
- openspeech/providers/_template.py +101 -0
- openspeech/providers/stt/__init__.py +0 -0
- openspeech/providers/stt/alibaba.py +86 -0
- openspeech/providers/stt/assemblyai.py +135 -0
- openspeech/providers/stt/azure_speech.py +99 -0
- openspeech/providers/stt/baidu.py +135 -0
- openspeech/providers/stt/deepgram.py +311 -0
- openspeech/providers/stt/elevenlabs.py +385 -0
- openspeech/providers/stt/faster_whisper.py +211 -0
- openspeech/providers/stt/google_cloud.py +106 -0
- openspeech/providers/stt/iflytek.py +427 -0
- openspeech/providers/stt/macos_speech.py +226 -0
- openspeech/providers/stt/openai.py +84 -0
- openspeech/providers/stt/sherpa_onnx.py +353 -0
- openspeech/providers/stt/tencent.py +212 -0
- openspeech/providers/stt/volcengine.py +107 -0
- openspeech/providers/stt/whisper.py +153 -0
- openspeech/providers/stt/whisperlivekit.py +530 -0
- openspeech/providers/stt/windows_speech.py +249 -0
- openspeech/providers/tts/__init__.py +0 -0
- openspeech/providers/tts/alibaba.py +95 -0
- openspeech/providers/tts/azure_speech.py +123 -0
- openspeech/providers/tts/baidu.py +143 -0
- openspeech/providers/tts/coqui.py +64 -0
- openspeech/providers/tts/cosyvoice.py +90 -0
- openspeech/providers/tts/deepgram.py +174 -0
- openspeech/providers/tts/elevenlabs.py +311 -0
- openspeech/providers/tts/fish_speech.py +158 -0
- openspeech/providers/tts/google_cloud.py +107 -0
- openspeech/providers/tts/iflytek.py +209 -0
- openspeech/providers/tts/macos_say.py +251 -0
- openspeech/providers/tts/minimax.py +122 -0
- openspeech/providers/tts/openai.py +104 -0
- openspeech/providers/tts/piper.py +104 -0
- openspeech/providers/tts/tencent.py +189 -0
- openspeech/providers/tts/volcengine.py +117 -0
- openspeech/providers/tts/windows_sapi.py +234 -0
- openspeech/server/__init__.py +1 -0
- openspeech/server/app.py +72 -0
- openspeech/server/auth.py +42 -0
- openspeech/server/middleware.py +75 -0
- openspeech/server/routes/__init__.py +1 -0
- openspeech/server/routes/management.py +848 -0
- openspeech/server/routes/stt.py +121 -0
- openspeech/server/routes/tts.py +159 -0
- openspeech/server/routes/webui.py +29 -0
- openspeech/server/webui/app.js +2649 -0
- openspeech/server/webui/index.html +216 -0
- openspeech/server/webui/styles.css +617 -0
- openspeech/server/ws/__init__.py +1 -0
- openspeech/server/ws/stt_stream.py +263 -0
- openspeech/server/ws/tts_stream.py +207 -0
- openspeech/telemetry/__init__.py +21 -0
- openspeech/telemetry/perf.py +307 -0
- openspeech/utils/__init__.py +5 -0
- openspeech/utils/audio_converter.py +406 -0
- openspeech/utils/audio_playback.py +156 -0
- openspeech/vendor_registry.yaml +74 -0
- openspeechapi-0.1.0.dist-info/METADATA +101 -0
- openspeechapi-0.1.0.dist-info/RECORD +118 -0
- openspeechapi-0.1.0.dist-info/WHEEL +4 -0
- openspeechapi-0.1.0.dist-info/entry_points.txt +3 -0
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>OpenSpeech Control Center</title>
|
|
7
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
8
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
9
|
+
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=IBM+Plex+Mono:wght@400;500&display=swap" rel="stylesheet" />
|
|
10
|
+
<link rel="stylesheet" href="/ui/styles.css" />
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
<div class="bg-orb orb-1"></div>
|
|
14
|
+
<div class="bg-orb orb-2"></div>
|
|
15
|
+
<header class="hero">
|
|
16
|
+
<div>
|
|
17
|
+
<p class="eyebrow">OpenSpeech Phase A</p>
|
|
18
|
+
<h1>Control Center</h1>
|
|
19
|
+
</div>
|
|
20
|
+
<nav class="tab-nav">
|
|
21
|
+
<button class="tab-btn active" data-tab="dashboard">Dashboard</button>
|
|
22
|
+
<button class="tab-btn" data-tab="lab">Lab</button>
|
|
23
|
+
<button class="tab-btn" data-tab="engines">Engines</button>
|
|
24
|
+
<button class="tab-btn" data-tab="config">Config</button>
|
|
25
|
+
<button class="tab-btn" data-tab="logs">Logs</button>
|
|
26
|
+
</nav>
|
|
27
|
+
<button id="refresh-all" class="btn btn-primary">Refresh All</button>
|
|
28
|
+
</header>
|
|
29
|
+
|
|
30
|
+
<main class="layout">
|
|
31
|
+
<!-- Tab: Dashboard -->
|
|
32
|
+
<div class="tab-content active" id="tab-dashboard">
|
|
33
|
+
<section class="card" id="dashboard-card">
|
|
34
|
+
<div class="card-head">
|
|
35
|
+
<h2>Dashboard</h2>
|
|
36
|
+
<span id="dashboard-status" class="status-dot">syncing</span>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="stats-grid">
|
|
39
|
+
<div class="stat"><p>Providers</p><h3 id="stat-providers">-</h3></div>
|
|
40
|
+
<div class="stat"><p>Healthy</p><h3 id="stat-healthy">-</h3></div>
|
|
41
|
+
<div class="stat"><p>Running Tasks</p><h3 id="stat-running-tasks">-</h3></div>
|
|
42
|
+
<div class="stat"><p>Last Update</p><h3 id="stat-updated-at">-</h3></div>
|
|
43
|
+
</div>
|
|
44
|
+
<div id="provider-groups"></div>
|
|
45
|
+
<pre id="engine-output" class="result tall" style="display:none"></pre>
|
|
46
|
+
</section>
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<!-- Tab: Lab -->
|
|
50
|
+
<div class="tab-content" id="tab-lab">
|
|
51
|
+
<section class="card" id="capability-card">
|
|
52
|
+
<div class="card-head"><h2>Capability Lab</h2></div>
|
|
53
|
+
<div class="lab-stack">
|
|
54
|
+
<details class="lab-section" open>
|
|
55
|
+
<summary>STT - Speech to Text</summary>
|
|
56
|
+
<form id="stt-form" class="panel">
|
|
57
|
+
<div class="lab-form-row">
|
|
58
|
+
<label class="lab-field">Provider<select id="stt-provider"></select></label>
|
|
59
|
+
<label class="lab-field">Mode
|
|
60
|
+
<select id="stt-mode">
|
|
61
|
+
<option value="file">Audio File</option>
|
|
62
|
+
<option value="live">Live Mic</option>
|
|
63
|
+
</select>
|
|
64
|
+
</label>
|
|
65
|
+
<label class="lab-field">Language<select id="stt-language"><option value="">(auto)</option></select></label>
|
|
66
|
+
</div>
|
|
67
|
+
<details class="lab-advanced">
|
|
68
|
+
<summary>Advanced Options</summary>
|
|
69
|
+
<div class="lab-form-row">
|
|
70
|
+
<label class="lab-field">Model<select id="stt-model"><option value="">(auto)</option></select></label>
|
|
71
|
+
<label class="lab-field">Device<select id="stt-device"><option value="">(auto)</option></select></label>
|
|
72
|
+
<label class="lab-field">Beam Size<input id="stt-beam-size" type="number" min="1" step="1" value="5" /></label>
|
|
73
|
+
</div>
|
|
74
|
+
</details>
|
|
75
|
+
<div id="stt-file-panel" class="lab-action-area">
|
|
76
|
+
<label class="lab-field-full">Audio File<input id="stt-file" type="file" accept="audio/*" required /></label>
|
|
77
|
+
<button id="stt-run-btn" type="submit" class="btn btn-primary btn-lg">Transcribe</button>
|
|
78
|
+
</div>
|
|
79
|
+
<div id="stt-live-panel" class="lab-action-area hidden">
|
|
80
|
+
<div class="button-row">
|
|
81
|
+
<button id="stt-live-start" type="button" class="btn btn-primary btn-lg">Start Mic</button>
|
|
82
|
+
<button id="stt-live-stop" type="button" class="btn btn-lg">Stop</button>
|
|
83
|
+
</div>
|
|
84
|
+
<p id="stt-live-status" class="status-dot">idle</p>
|
|
85
|
+
</div>
|
|
86
|
+
<div class="lab-output">
|
|
87
|
+
<h4>Result</h4>
|
|
88
|
+
<pre id="stt-stream-text" class="result lab-result"></pre>
|
|
89
|
+
<pre id="stt-result" class="result lab-result"></pre>
|
|
90
|
+
<pre id="stt-live-metrics" class="result lab-result" style="display:none"></pre>
|
|
91
|
+
</div>
|
|
92
|
+
</form>
|
|
93
|
+
</details>
|
|
94
|
+
<details class="lab-section" open>
|
|
95
|
+
<summary>TTS - Text to Speech</summary>
|
|
96
|
+
<form id="tts-form" class="panel">
|
|
97
|
+
<div class="lab-form-row">
|
|
98
|
+
<label class="lab-field">Provider<select id="tts-provider"></select></label>
|
|
99
|
+
<label class="lab-field" id="tts-voice-label">Voice<select id="tts-voice"></select></label>
|
|
100
|
+
<label class="lab-field">Speed<input id="tts-speed" type="number" min="0.5" max="2.0" step="0.1" value="1.0" /></label>
|
|
101
|
+
</div>
|
|
102
|
+
<details class="lab-advanced">
|
|
103
|
+
<summary>Advanced Options</summary>
|
|
104
|
+
<div class="lab-form-row">
|
|
105
|
+
<label class="lab-field">Model<select id="tts-model"><option value="">(auto)</option></select></label>
|
|
106
|
+
<label class="lab-field">Transport<select id="tts-transport"><option value="">(auto)</option></select></label>
|
|
107
|
+
</div>
|
|
108
|
+
</details>
|
|
109
|
+
<label class="lab-field-full">Text<textarea id="tts-text" rows="4" required>Hello from OpenSpeech web UI.</textarea></label>
|
|
110
|
+
<div class="lab-action-area"><button type="submit" class="btn btn-primary btn-lg">Synthesize</button></div>
|
|
111
|
+
<div class="lab-output">
|
|
112
|
+
<h4>Result</h4>
|
|
113
|
+
<audio id="tts-audio" controls class="lab-audio"></audio>
|
|
114
|
+
<div id="tts-download-area" class="tts-download-area hidden">
|
|
115
|
+
<select id="tts-download-format">
|
|
116
|
+
<option value="__original__">Original</option>
|
|
117
|
+
<option value="wav">WAV</option>
|
|
118
|
+
<option value="mp3">MP3</option>
|
|
119
|
+
<option value="ogg">OGG</option>
|
|
120
|
+
<option value="flac">FLAC</option>
|
|
121
|
+
<option value="opus">Opus</option>
|
|
122
|
+
</select>
|
|
123
|
+
<button type="button" class="btn btn-xs" id="tts-download-btn" onclick="downloadTTSAudio(event)">Download</button>
|
|
124
|
+
<span id="tts-download-status" class="tts-download-status"></span>
|
|
125
|
+
</div>
|
|
126
|
+
<pre id="tts-result" class="result lab-result"></pre>
|
|
127
|
+
</div>
|
|
128
|
+
</form>
|
|
129
|
+
</details>
|
|
130
|
+
</div>
|
|
131
|
+
<div class="lab-log-panel">
|
|
132
|
+
<div class="lab-log-head">
|
|
133
|
+
<h4>Interaction Log</h4>
|
|
134
|
+
<div class="lab-log-actions">
|
|
135
|
+
<label class="lab-log-verbose"><input type="checkbox" id="lab-log-verbose" /> Verbose</label>
|
|
136
|
+
<button type="button" class="btn btn-xs" id="lab-log-clear">Clear</button>
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
<pre id="lab-log" class="result lab-log"></pre>
|
|
140
|
+
</div>
|
|
141
|
+
</section>
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
<!-- Tab: Engines -->
|
|
145
|
+
<div class="tab-content" id="tab-engines">
|
|
146
|
+
<section class="card">
|
|
147
|
+
<div class="card-head">
|
|
148
|
+
<h2>Engine Catalog</h2>
|
|
149
|
+
<button id="catalog-refresh" class="btn">Refresh</button>
|
|
150
|
+
</div>
|
|
151
|
+
<p class="hint">Click engine name to configure. Install/Uninstall toggles providers.yaml entry.</p>
|
|
152
|
+
<div id="catalog-list"></div>
|
|
153
|
+
</section>
|
|
154
|
+
</div>
|
|
155
|
+
|
|
156
|
+
<!-- Tab: Config -->
|
|
157
|
+
<div class="tab-content" id="tab-config">
|
|
158
|
+
<section class="card">
|
|
159
|
+
<div class="card-head">
|
|
160
|
+
<h2>Provider Configuration</h2>
|
|
161
|
+
<div class="button-row">
|
|
162
|
+
<button id="config-add-btn" class="btn btn-primary">Add Vendor</button>
|
|
163
|
+
<button id="config-save-btn" class="btn">Save & Apply</button>
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
<div id="config-status" class="result" style="display:none"></div>
|
|
167
|
+
<div class="config-split">
|
|
168
|
+
<div class="config-sidebar">
|
|
169
|
+
<div id="config-sidebar-list"></div>
|
|
170
|
+
</div>
|
|
171
|
+
<div class="config-detail">
|
|
172
|
+
<div id="config-detail-content">
|
|
173
|
+
<p class="config-placeholder">Select a vendor or engine from the left to edit its settings.</p>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
</section>
|
|
178
|
+
</div>
|
|
179
|
+
|
|
180
|
+
<!-- Tab: Logs -->
|
|
181
|
+
<div class="tab-content" id="tab-logs">
|
|
182
|
+
<section class="card">
|
|
183
|
+
<div class="card-head">
|
|
184
|
+
<h2>Activity Logs</h2>
|
|
185
|
+
<div class="button-row">
|
|
186
|
+
<button id="logs-refresh" class="btn">Refresh</button>
|
|
187
|
+
<button id="logs-clear" class="btn">Clear</button>
|
|
188
|
+
</div>
|
|
189
|
+
</div>
|
|
190
|
+
<div class="table-wrap">
|
|
191
|
+
<table>
|
|
192
|
+
<thead>
|
|
193
|
+
<tr><th>Time</th><th>Engine</th><th>Action</th><th>Status</th><th>Message</th></tr>
|
|
194
|
+
</thead>
|
|
195
|
+
<tbody id="logs-table"></tbody>
|
|
196
|
+
</table>
|
|
197
|
+
</div>
|
|
198
|
+
<pre id="logs-detail" class="result tall"></pre>
|
|
199
|
+
</section>
|
|
200
|
+
</div>
|
|
201
|
+
</main>
|
|
202
|
+
|
|
203
|
+
<div id="config-add-dialog">
|
|
204
|
+
<div class="dialog-box">
|
|
205
|
+
<h3>Add Vendor</h3>
|
|
206
|
+
<label>Vendor<select id="config-add-template"></select></label>
|
|
207
|
+
<div class="button-row">
|
|
208
|
+
<button class="btn btn-primary" onclick="confirmAddProvider()">Add</button>
|
|
209
|
+
<button class="btn" onclick="closeAddDialog()">Cancel</button>
|
|
210
|
+
</div>
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
|
|
214
|
+
<script src="/ui/app.js" defer></script>
|
|
215
|
+
</body>
|
|
216
|
+
</html>
|