openspeechapi 0.2.15__tar.gz → 0.2.17__tar.gz

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.
Files changed (161) hide show
  1. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/PKG-INFO +1 -1
  2. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/config.py +21 -0
  3. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/gemma4.py +7 -2
  4. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/qwen3_omni_stt.py +29 -1
  5. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/server/app.py +11 -0
  6. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/server/routes/management.py +13 -0
  7. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/server/routes/stt.py +4 -3
  8. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/server/routes/tts.py +3 -2
  9. openspeechapi-0.2.17/openspeechapi/server/system_metrics.py +264 -0
  10. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/server/webui/app.js +43 -0
  11. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/server/webui/index.html +3 -0
  12. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/server/webui/styles.css +24 -0
  13. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/pyproject.toml +1 -1
  14. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/.gitignore +0 -0
  15. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/README.md +0 -0
  16. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/__init__.py +0 -0
  17. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/__main__.py +0 -0
  18. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/cli.py +0 -0
  19. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/client/__init__.py +0 -0
  20. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/client/client.py +0 -0
  21. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/core/__init__.py +0 -0
  22. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/core/base.py +0 -0
  23. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/core/enums.py +0 -0
  24. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/core/model_hub.py +0 -0
  25. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/core/models.py +0 -0
  26. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/core/registry.py +0 -0
  27. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/core/settings.py +0 -0
  28. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/demo.py +0 -0
  29. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/dispatch/__init__.py +0 -0
  30. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/dispatch/aim_provision.py +0 -0
  31. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/dispatch/context.py +0 -0
  32. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/dispatch/dispatcher.py +0 -0
  33. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/dispatch/executors/__init__.py +0 -0
  34. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/dispatch/executors/base.py +0 -0
  35. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/dispatch/executors/in_process.py +0 -0
  36. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/dispatch/executors/remote.py +0 -0
  37. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/dispatch/executors/subprocess_exec.py +0 -0
  38. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/dispatch/fanout.py +0 -0
  39. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/dispatch/filters.py +0 -0
  40. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/dispatch/lifecycle.py +0 -0
  41. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/dispatch/watcher.py +0 -0
  42. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/engine_catalog.py +0 -0
  43. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/engine_registry.yaml +0 -0
  44. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/exceptions.py +0 -0
  45. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/factory.py +0 -0
  46. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/local_engines/__init__.py +0 -0
  47. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/local_engines/aim_resolver.py +0 -0
  48. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/local_engines/backends/__init__.py +0 -0
  49. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/local_engines/backends/docker_backend.py +0 -0
  50. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/local_engines/backends/native_backend.py +0 -0
  51. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/local_engines/base.py +0 -0
  52. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/local_engines/engines/__init__.py +0 -0
  53. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/local_engines/engines/faster_whisper.py +0 -0
  54. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/local_engines/engines/fish_speech.py +0 -0
  55. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/local_engines/engines/sherpa_onnx.py +0 -0
  56. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/local_engines/engines/whisper.py +0 -0
  57. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/local_engines/engines/whisperlivekit.py +0 -0
  58. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/local_engines/isolated_venv.py +0 -0
  59. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/local_engines/manager.py +0 -0
  60. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/local_engines/models.py +0 -0
  61. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/local_engines/progress.py +0 -0
  62. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/local_engines/registry.py +0 -0
  63. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/local_engines/task_store.py +0 -0
  64. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/local_engines/tasks.py +0 -0
  65. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/logging_config.py +0 -0
  66. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/observe/__init__.py +0 -0
  67. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/observe/base.py +0 -0
  68. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/observe/debug.py +0 -0
  69. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/observe/latency.py +0 -0
  70. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/observe/metrics.py +0 -0
  71. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/observe/tracing.py +0 -0
  72. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/observe/usage.py +0 -0
  73. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/__init__.py +0 -0
  74. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/_template.py +0 -0
  75. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/__init__.py +0 -0
  76. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/_local_audio.py +0 -0
  77. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/alibaba.py +0 -0
  78. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/assemblyai.py +0 -0
  79. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/azure_speech.py +0 -0
  80. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/baidu.py +0 -0
  81. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/canary_qwen_stt.py +0 -0
  82. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/deepgram.py +0 -0
  83. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/dolphin_stt.py +0 -0
  84. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/elevenlabs.py +0 -0
  85. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/faster_whisper.py +0 -0
  86. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/fireredasr_stt.py +0 -0
  87. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/funasr_stt.py +0 -0
  88. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/google_cloud.py +0 -0
  89. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/iflytek.py +0 -0
  90. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/kimi_audio_stt.py +0 -0
  91. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/macos_speech.py +0 -0
  92. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/mlx_whisper_stt.py +0 -0
  93. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/mms_languages.json +0 -0
  94. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/mms_stt.py +0 -0
  95. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/moonshine_stt.py +0 -0
  96. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/openai.py +0 -0
  97. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/paraformer.py +0 -0
  98. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/parakeet_mlx_stt.py +0 -0
  99. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/phi4_multimodal_stt.py +0 -0
  100. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/qwen3_asr.py +0 -0
  101. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/sensevoice.py +0 -0
  102. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/sherpa_onnx.py +0 -0
  103. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/tencent.py +0 -0
  104. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/volcengine.py +0 -0
  105. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/vosk_stt.py +0 -0
  106. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/voxtral_stt.py +0 -0
  107. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/wenet_stt.py +0 -0
  108. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/whisper.py +0 -0
  109. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/whisperlivekit.py +0 -0
  110. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/stt/windows_speech.py +0 -0
  111. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/tts/__init__.py +0 -0
  112. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/tts/alibaba.py +0 -0
  113. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/tts/azure_speech.py +0 -0
  114. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/tts/baidu.py +0 -0
  115. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/tts/coqui.py +0 -0
  116. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/tts/cosyvoice.py +0 -0
  117. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/tts/deepgram.py +0 -0
  118. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/tts/elevenlabs.py +0 -0
  119. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/tts/fish_speech.py +0 -0
  120. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/tts/google_cloud.py +0 -0
  121. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/tts/iflytek.py +0 -0
  122. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/tts/macos_say.py +0 -0
  123. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/tts/minimax.py +0 -0
  124. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/tts/openai.py +0 -0
  125. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/tts/piper.py +0 -0
  126. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/tts/tencent.py +0 -0
  127. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/tts/volcengine.py +0 -0
  128. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/providers/tts/windows_sapi.py +0 -0
  129. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/server/__init__.py +0 -0
  130. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/server/auth.py +0 -0
  131. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/server/extras_installer.py +0 -0
  132. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/server/middleware.py +0 -0
  133. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/server/native_installer.py +0 -0
  134. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/server/routes/__init__.py +0 -0
  135. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/server/routes/webui.py +0 -0
  136. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/server/ws/__init__.py +0 -0
  137. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/server/ws/stt_stream.py +0 -0
  138. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/server/ws/tts_stream.py +0 -0
  139. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/telemetry/__init__.py +0 -0
  140. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/telemetry/perf.py +0 -0
  141. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/utils/__init__.py +0 -0
  142. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/utils/audio_converter.py +0 -0
  143. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/utils/audio_playback.py +0 -0
  144. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/openspeechapi/vendor_registry.yaml +0 -0
  145. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/providers.example.yaml +0 -0
  146. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/scripts/aim_adopt.py +0 -0
  147. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/scripts/aim_consumers.py +0 -0
  148. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/scripts/engines/cloud/install.sh +0 -0
  149. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/scripts/engines/faster-whisper/native/install.sh +0 -0
  150. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/scripts/engines/fish-speech/native/install.sh +0 -0
  151. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/scripts/engines/macos-stt/_bundle.sh +0 -0
  152. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/scripts/engines/macos-stt/install.sh +0 -0
  153. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/scripts/engines/macos-stt/macos_stt.swift +0 -0
  154. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/scripts/engines/macos-stt/request_auth.swift +0 -0
  155. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/scripts/engines/sherpa-onnx/native/install.sh +0 -0
  156. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/scripts/engines/sherpa-onnx/native/run_streaming_server.py +0 -0
  157. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/scripts/engines/whisper/native/install.sh +0 -0
  158. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/scripts/engines/whisperlivekit/native/install.sh +0 -0
  159. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/scripts/gen_mms_languages.py +0 -0
  160. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/scripts/preload_stt_model.py +0 -0
  161. {openspeechapi-0.2.15 → openspeechapi-0.2.17}/scripts/release.sh +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openspeechapi
3
- Version: 0.2.15
3
+ Version: 0.2.17
4
4
  Summary: Unified speech interface for STT/TTS providers
5
5
  Requires-Python: >=3.11
6
6
  Requires-Dist: httpx>=0.27
@@ -106,6 +106,15 @@ class ServerConfig:
106
106
  # Per-source download attempts (huggingface_hub resumes between attempts) before
107
107
  # switching source. Exports OSA_MODEL_DOWNLOAD_RETRIES for workers.
108
108
  model_download_retries: int = 3
109
+ # System monitor (WebUI footer + thermal guard). Background sampler interval (s) for
110
+ # CPU/mem/GPU/temperature; the footer polls /v1/system at roughly the same cadence.
111
+ metrics_interval: int = 10
112
+ # Thermal thresholds (°C). At >= temp_warn_c the footer turns amber; at >= temp_critical_c
113
+ # it turns red and (when thermal_guard) new STT/TTS requests get 503 until temp < warn
114
+ # (hysteresis) — guards a unified-memory GPU box from overheating into a hard hang.
115
+ temp_warn_c: float = 80.0
116
+ temp_critical_c: float = 90.0
117
+ thermal_guard: bool = True
109
118
 
110
119
 
111
120
  @dataclass
@@ -241,6 +250,18 @@ def load_config(path: Path) -> OpenSpeechConfig:
241
250
  server_cfg.default_model_source = src
242
251
  elif server_cfg.prefer_modelscope:
243
252
  server_cfg.default_model_source = "ms"
253
+ # System monitor / thermal guard
254
+ try:
255
+ server_cfg.metrics_interval = max(
256
+ 2, int(srv.get("metrics_interval", server_cfg.metrics_interval)))
257
+ except (TypeError, ValueError):
258
+ pass
259
+ try:
260
+ server_cfg.temp_warn_c = float(srv.get("temp_warn_c", server_cfg.temp_warn_c))
261
+ server_cfg.temp_critical_c = float(srv.get("temp_critical_c", server_cfg.temp_critical_c))
262
+ except (TypeError, ValueError):
263
+ pass
264
+ server_cfg.thermal_guard = bool(srv.get("thermal_guard", server_cfg.thermal_guard))
244
265
  auth = srv.get("auth", {})
245
266
  if auth:
246
267
  server_cfg.auth_enabled = bool(auth.get("enabled", False))
@@ -194,7 +194,7 @@ class Gemma4STT(STTProvider):
194
194
  # Gemma (3n) audio via HF transformers (Linux + CUDA). transformers downloads the
195
195
  # weights (honours HF_ENDPOINT). NOTE: audio path verified on the DGX box.
196
196
  try:
197
- import torch # noqa: F401
197
+ import torch
198
198
  from transformers import AutoModelForImageTextToText, AutoProcessor
199
199
  except ImportError as exc: # pragma: no cover - import guard
200
200
  raise ImportError(
@@ -202,9 +202,14 @@ class Gemma4STT(STTProvider):
202
202
  "('pip install openspeechapi[gemma4-stt]' pulls them off macOS)"
203
203
  ) from exc
204
204
  target = aim_local_path_or(self.settings.model_path, model)
205
+ # device_map="auto" mis-reads unified-memory GPUs (DGX/GB10, Jetson) whose free VRAM
206
+ # reports as N/A → accelerate concludes nothing "fits" and offloads the whole model to
207
+ # CPU (~20x slower inference). Pin the GPU when CUDA is present (Gemma 4 E2B/E4B fit a
208
+ # single device); fall back to CPU only when there's no CUDA at all.
209
+ device_map = "cuda" if torch.cuda.is_available() else "cpu"
205
210
  proc = AutoProcessor.from_pretrained(target)
206
211
  m = AutoModelForImageTextToText.from_pretrained(
207
- target, torch_dtype="auto", device_map="auto",
212
+ target, torch_dtype="auto", device_map=device_map,
208
213
  )
209
214
  return m, proc, None
210
215
 
@@ -72,6 +72,27 @@ class Qwen3OmniSTT(STTProvider):
72
72
  async def health_check(self) -> bool:
73
73
  return self._model is not None
74
74
 
75
+ @staticmethod
76
+ def _resolve_device_map(device_map: str) -> str:
77
+ """Resolve the configured device_map to a concrete placement.
78
+
79
+ device_map="auto" mis-reads unified-memory GPUs (DGX/GB10, Jetson) whose free
80
+ VRAM reports as N/A → accelerate concludes nothing "fits" and offloads the whole
81
+ 30B model to CPU (~20x slower). Pin the GPU when CUDA is present (mirrors gemma4's
82
+ _load_cuda fix); fall back to CPU only when there's no CUDA at all. Explicit
83
+ "cuda"/"cpu" are user overrides and pass through untouched (no torch probe).
84
+
85
+ NOTE: pinning "cuda" places the whole model on a single device — correct for the
86
+ unified-memory targets this engine is gated to (GB10 128GB / Jetson). True
87
+ multi-GPU sharding of the 30B MoE would need a separate explicit option (e.g.
88
+ "balanced"), not "auto".
89
+ """
90
+ dm = (device_map or "auto").strip().lower()
91
+ if dm != "auto":
92
+ return dm
93
+ import torch
94
+ return "cuda" if torch.cuda.is_available() else "cpu"
95
+
75
96
  async def _ensure_model(self, s: "Qwen3OmniSTTSettings") -> None:
76
97
  key = (s.model.strip(), s.dtype.strip(), s.device_map.strip(), s.attn_implementation.strip())
77
98
  if self._model is not None and self._loaded_key == key:
@@ -87,9 +108,16 @@ class Qwen3OmniSTT(STTProvider):
87
108
  "pip install 'openspeechapi[qwen3-omni-stt]'"
88
109
  ) from exc
89
110
 
111
+ # Resolve device placement on THIS (event-loop) thread, before the heavy load is
112
+ # offloaded to a worker. Probing CUDA imports torch, and the FIRST torch import in
113
+ # an asyncio worker thread segfaults on macOS; resolving here also avoids relying on
114
+ # transformers having already pre-imported torch. _load() then loads with a concrete
115
+ # device only.
116
+ device_map = self._resolve_device_map(s.device_map)
117
+
90
118
  def _load() -> tuple[Any, Any]:
91
119
  model = Qwen3OmniMoeForConditionalGeneration.from_pretrained(
92
- s.model, dtype=s.dtype, device_map=s.device_map,
120
+ s.model, dtype=s.dtype, device_map=device_map,
93
121
  attn_implementation=s.attn_implementation,
94
122
  )
95
123
  processor = Qwen3OmniMoeProcessor.from_pretrained(s.model)
@@ -15,6 +15,7 @@ from openspeechapi.local_engines import EngineManager
15
15
  from openspeechapi.logging_config import ensure_configured, logger
16
16
  from openspeechapi.server.middleware import RequestContextMiddleware
17
17
  from openspeechapi.server.routes import stt, tts, management, webui
18
+ from openspeechapi.server.system_metrics import SystemMonitor
18
19
  from openspeechapi.server.ws import stt_stream, tts_stream
19
20
 
20
21
 
@@ -109,6 +110,15 @@ def create_app(config_path: Path, registry: ProviderRegistry) -> FastAPI:
109
110
  async def lifespan(app: FastAPI):
110
111
  await dispatcher.start()
111
112
 
113
+ monitor = SystemMonitor(
114
+ interval=config.server.metrics_interval,
115
+ warn_c=config.server.temp_warn_c,
116
+ critical_c=config.server.temp_critical_c,
117
+ guard=config.server.thermal_guard,
118
+ )
119
+ app.state.system_monitor = monitor
120
+ await monitor.start()
121
+
112
122
  async def _on_reload() -> dict:
113
123
  return await dispatcher.reload_config(config_path, registry)
114
124
 
@@ -118,6 +128,7 @@ def create_app(config_path: Path, registry: ProviderRegistry) -> FastAPI:
118
128
  yield
119
129
 
120
130
  await watcher.stop()
131
+ await monitor.stop()
121
132
  await dispatcher.stop()
122
133
 
123
134
  app = FastAPI(title="OpenSpeechAPI API", version="0.1.0", lifespan=lifespan)
@@ -89,6 +89,19 @@ async def health_check(request: Request):
89
89
  return {"status": "ok" if all_healthy else "degraded", "engines": health}
90
90
 
91
91
 
92
+ @router.get("/system")
93
+ async def system_metrics(request: Request):
94
+ """Latest cached CPU/memory/GPU/temperature snapshot + thermal_state for the WebUI
95
+ footer. Sampled on a background interval (server.metrics_interval); this only reads the
96
+ cache, so it's safe to poll frequently and never blocks on nvidia-smi."""
97
+ mon = getattr(request.app.state, "system_monitor", None)
98
+ if mon is None:
99
+ return {"available": False}
100
+ snap = mon.snapshot()
101
+ snap["available"] = True
102
+ return snap
103
+
104
+
92
105
  @router.get("/metrics")
93
106
  async def metrics(request: Request):
94
107
  dispatcher = request.app.state.dispatcher
@@ -1,9 +1,10 @@
1
1
  """STT REST endpoints."""
2
2
  from __future__ import annotations
3
- from fastapi import APIRouter, File, Form, Request, UploadFile, HTTPException
3
+ from fastapi import APIRouter, Depends, File, Form, Request, UploadFile, HTTPException
4
4
  from openspeechapi.core.models import AudioData, STTOptions
5
5
  from openspeechapi.dispatch.fanout import FirstCompleted, HighestConfidence, CollectAll
6
6
  from openspeechapi.exceptions import AudioConversionError, ProviderNotFoundError, FanOutAllFailedError
7
+ from openspeechapi.server.system_metrics import thermal_guard
7
8
  from openspeechapi.utils.audio_converter import AudioConverter
8
9
 
9
10
  router = APIRouter()
@@ -15,7 +16,7 @@ STRATEGY_MAP = {
15
16
  }
16
17
 
17
18
 
18
- @router.post("/transcribe")
19
+ @router.post("/transcribe", dependencies=[Depends(thermal_guard)])
19
20
  async def transcribe(
20
21
  request: Request,
21
22
  audio: UploadFile = File(...),
@@ -90,7 +91,7 @@ async def transcribe(
90
91
  }
91
92
 
92
93
 
93
- @router.post("/transcribe/fanout")
94
+ @router.post("/transcribe/fanout", dependencies=[Depends(thermal_guard)])
94
95
  async def transcribe_fanout(
95
96
  request: Request,
96
97
  audio: UploadFile = File(...),
@@ -1,12 +1,13 @@
1
1
  """TTS REST endpoints."""
2
2
  from __future__ import annotations
3
3
  import time
4
- from fastapi import APIRouter, Request, HTTPException, UploadFile, File, Form
4
+ from fastapi import APIRouter, Depends, Request, HTTPException, UploadFile, File, Form
5
5
  from fastapi.responses import Response
6
6
  from pydantic import BaseModel
7
7
  from openspeechapi.core.enums import AudioFormat
8
8
  from openspeechapi.core.models import AudioData, TTSOptions
9
9
  from openspeechapi.exceptions import ProviderNotFoundError
10
+ from openspeechapi.server.system_metrics import thermal_guard
10
11
  from openspeechapi.utils.audio_converter import AudioConverter
11
12
 
12
13
  router = APIRouter()
@@ -59,7 +60,7 @@ async def list_voices(request: Request, provider: str):
59
60
  return {"voices": voices}
60
61
 
61
62
 
62
- @router.post("/synthesize")
63
+ @router.post("/synthesize", dependencies=[Depends(thermal_guard)])
63
64
  async def synthesize(request: Request, body: SynthesizeRequest):
64
65
  dispatcher = request.app.state.dispatcher
65
66
  opts = TTSOptions(
@@ -0,0 +1,264 @@
1
+ """Lightweight system resource + temperature monitor (CPU / memory / GPU / thermal).
2
+
3
+ Powers the WebUI footer status bar and an optional **thermal guard** that sheds new
4
+ STT/TTS load when the box runs too hot — added after a GB10/DGX box overheated into a
5
+ hard hang (sshd + HTTP both starved). Sampling is cheap (reads `/proc` files + one short
6
+ `nvidia-smi`/`tegrastats` call) and runs on a background interval; requests and the footer
7
+ only read the cached snapshot, never sample inline.
8
+
9
+ Temperature sourcing is defensive — it takes the max of whatever is available:
10
+ `/sys/class/thermal/thermal_zone*/temp`, `nvidia-smi` GPU temp, and `tegrastats` (Tegra
11
+ SoCs like GB10/Jetson). On a box with none of these the temp is simply ``None`` and the
12
+ guard stays inactive.
13
+ """
14
+ from __future__ import annotations
15
+
16
+ import asyncio
17
+ import glob
18
+ import os
19
+ import re
20
+ import shutil
21
+ import subprocess
22
+ import sys
23
+ import time
24
+ from typing import Any
25
+
26
+ from fastapi import HTTPException, Request
27
+
28
+ from openspeechapi.logging_config import logger
29
+
30
+
31
+ # ── individual cheap samplers (each returns None on any failure) ─────────────
32
+
33
+ def _read_cpu_load() -> float | None:
34
+ """1-min load average (cross-platform: macOS + Linux via os.getloadavg)."""
35
+ try:
36
+ return round(os.getloadavg()[0], 2)
37
+ except (OSError, AttributeError, IndexError):
38
+ return None
39
+
40
+
41
+ def _read_mem() -> tuple[float | None, float | None]:
42
+ """(used_gb, total_gb). Linux via /proc/meminfo (accurate MemAvailable); other POSIX
43
+ (macOS) via sysconf as a fallback so the footer still shows memory off-Linux."""
44
+ try:
45
+ info: dict[str, int] = {}
46
+ with open("/proc/meminfo") as f:
47
+ for line in f:
48
+ parts = line.split()
49
+ if parts and parts[0].rstrip(":") in ("MemTotal", "MemAvailable"):
50
+ info[parts[0].rstrip(":")] = int(parts[1]) # kB
51
+ total, avail = info.get("MemTotal"), info.get("MemAvailable")
52
+ if total is not None and avail is not None:
53
+ return round((total - avail) / 1048576, 2), round(total / 1048576, 2)
54
+ except (OSError, ValueError):
55
+ pass
56
+ if sys.platform == "darwin": # macOS has no /proc → sysctl + vm_stat
57
+ return _read_mem_macos()
58
+ return None, None
59
+
60
+
61
+ def _read_mem_macos() -> tuple[float | None, float | None]:
62
+ """(used_gb, total_gb) on macOS via `sysctl hw.memsize` + `vm_stat`. used = total −
63
+ (free + inactive + speculative), i.e. counts reclaimable pages as available."""
64
+ try:
65
+ total_b = int(subprocess.run(["sysctl", "-n", "hw.memsize"],
66
+ capture_output=True, text=True, timeout=3).stdout.strip())
67
+ vm = subprocess.run(["vm_stat"], capture_output=True, text=True, timeout=3).stdout
68
+ except (subprocess.SubprocessError, OSError, ValueError):
69
+ return None, None
70
+ page_m = re.search(r"page size of (\d+) bytes", vm)
71
+ page = int(page_m.group(1)) if page_m else 4096
72
+
73
+ def _pages(name: str) -> int:
74
+ m = re.search(rf"{name}:\s+(\d+)", vm)
75
+ return int(m.group(1)) if m else 0
76
+ free_b = (_pages("Pages free") + _pages("Pages inactive")
77
+ + _pages("Pages speculative")) * page
78
+ return round((total_b - free_b) / 1073741824, 2), round(total_b / 1073741824, 2)
79
+
80
+
81
+ def _read_thermal_zones() -> float | None:
82
+ """Max temp (°C) across /sys/class/thermal/thermal_zone*/temp (values in milli-°C)."""
83
+ temps: list[float] = []
84
+ for p in glob.glob("/sys/class/thermal/thermal_zone*/temp"):
85
+ try:
86
+ with open(p) as f:
87
+ v = int(f.read().strip())
88
+ temps.append(v / 1000.0 if v > 1000 else float(v)) # milli-°C or °C
89
+ except (OSError, ValueError):
90
+ continue
91
+ return round(max(temps), 1) if temps else None
92
+
93
+
94
+ def _nvidia_smi() -> dict[str, float | None] | None:
95
+ """Best-effort GPU temp/util/mem via nvidia-smi (short timeout). None if unavailable.
96
+
97
+ On unified-memory GPUs (GB10) some fields read ``[N/A]`` → parsed as None."""
98
+ if not shutil.which("nvidia-smi"):
99
+ return None
100
+ try:
101
+ out = subprocess.run(
102
+ ["nvidia-smi",
103
+ "--query-gpu=temperature.gpu,utilization.gpu,memory.used,memory.total",
104
+ "--format=csv,noheader,nounits"],
105
+ capture_output=True, text=True, timeout=5,
106
+ )
107
+ except (subprocess.SubprocessError, OSError):
108
+ return None
109
+ line = out.stdout.strip().splitlines()[0] if out.stdout.strip() else ""
110
+ if out.returncode != 0 or not line:
111
+ return None
112
+
113
+ def _num(x: str) -> float | None:
114
+ try:
115
+ return float(x.strip())
116
+ except ValueError:
117
+ return None
118
+ f = [c for c in line.split(",")]
119
+ return {
120
+ "temp_c": _num(f[0]) if len(f) > 0 else None,
121
+ "util_pct": _num(f[1]) if len(f) > 1 else None,
122
+ "mem_used_mb": _num(f[2]) if len(f) > 2 else None,
123
+ "mem_total_mb": _num(f[3]) if len(f) > 3 else None,
124
+ }
125
+
126
+
127
+ def _tegrastats_temp() -> float | None:
128
+ """Max temp from a single tegrastats line (Tegra SoCs: GB10/Jetson). None if absent.
129
+
130
+ tegrastats streams forever, so we read one line with a timeout and parse ``<name>@<temp>C``
131
+ tokens (e.g. ``cpu@61.5C gpu@59C``)."""
132
+ if not shutil.which("tegrastats"):
133
+ return None
134
+ try:
135
+ out = subprocess.run(["tegrastats", "--interval", "100"],
136
+ capture_output=True, text=True, timeout=4)
137
+ line = out.stdout.strip().splitlines()[0] if out.stdout.strip() else ""
138
+ except (subprocess.SubprocessError, OSError):
139
+ return None
140
+ temps = [float(m) for m in re.findall(r"@(\d+(?:\.\d+)?)C", line)]
141
+ return round(max(temps), 1) if temps else None
142
+
143
+
144
+ def sample() -> dict[str, Any]:
145
+ """One cheap snapshot of CPU / memory / GPU / temperature (all best-effort)."""
146
+ mem_used_gb, mem_total_gb = _read_mem()
147
+ gpu = _nvidia_smi()
148
+ gpu_temp = gpu.get("temp_c") if gpu else None
149
+ cpu_zone_temp = _read_thermal_zones()
150
+ tegra_temp = _tegrastats_temp()
151
+ temps = [t for t in (gpu_temp, cpu_zone_temp, tegra_temp) if t is not None]
152
+ return {
153
+ "cpu_load1": _read_cpu_load(),
154
+ "cpu_count": os.cpu_count(),
155
+ "mem_used_gb": mem_used_gb,
156
+ "mem_total_gb": mem_total_gb,
157
+ "mem_pct": (round(mem_used_gb / mem_total_gb * 100, 1)
158
+ if mem_used_gb is not None and mem_total_gb else None),
159
+ "gpu_util_pct": gpu.get("util_pct") if gpu else None,
160
+ "gpu_mem_used_mb": gpu.get("mem_used_mb") if gpu else None,
161
+ "gpu_mem_total_mb": gpu.get("mem_total_mb") if gpu else None,
162
+ "temp_c": round(max(temps), 1) if temps else None,
163
+ "temp_gpu_c": gpu_temp,
164
+ "temp_cpu_c": cpu_zone_temp if cpu_zone_temp is not None else tegra_temp,
165
+ }
166
+
167
+
168
+ class SystemMonitor:
169
+ """Latest cached sample + thermal state (with hysteresis) + a background sampling loop.
170
+
171
+ Thermal state transitions (hysteresis so it doesn't flap at the boundary):
172
+ ``ok`` → ``warn`` at ``warn_c`` → ``critical`` at ``critical_c``; once ``critical`` it
173
+ stays critical until the temp falls back **below warn_c**, then clears to ``ok``.
174
+ """
175
+
176
+ def __init__(self, *, interval: float = 10.0, warn_c: float = 80.0,
177
+ critical_c: float = 90.0, guard: bool = True) -> None:
178
+ self.interval = max(2.0, float(interval))
179
+ self.warn_c = float(warn_c)
180
+ self.critical_c = float(critical_c)
181
+ self.guard = bool(guard)
182
+ self._latest: dict[str, Any] = {}
183
+ self._state = "ok"
184
+ self._task: asyncio.Task | None = None
185
+
186
+ def _update_state(self, temp: float | None) -> None:
187
+ if temp is None:
188
+ return # temp unreadable → keep prior state, never falsely guard
189
+ if temp >= self.critical_c:
190
+ self._state = "critical"
191
+ elif temp >= self.warn_c:
192
+ self._state = "critical" if self._state == "critical" else "warn"
193
+ else:
194
+ self._state = "ok"
195
+
196
+ def refresh(self) -> dict[str, Any]:
197
+ s = sample()
198
+ s["ts"] = time.time() # so the footer can show staleness if sampling stalls
199
+ self._update_state(s.get("temp_c"))
200
+ s["thermal_state"] = self._state
201
+ self._latest = s
202
+ return s
203
+
204
+ def snapshot(self) -> dict[str, Any]:
205
+ out = dict(self._latest)
206
+ out.setdefault("thermal_state", self._state)
207
+ out["thresholds"] = {
208
+ "warn_c": self.warn_c, "critical_c": self.critical_c,
209
+ "guard": self.guard, "interval": self.interval,
210
+ }
211
+ return out
212
+
213
+ @property
214
+ def latest_temp(self) -> float | None:
215
+ return self._latest.get("temp_c")
216
+
217
+ @property
218
+ def overheated(self) -> bool:
219
+ """True when the guard is on AND the box is in the critical thermal state."""
220
+ return self.guard and self._state == "critical"
221
+
222
+ async def _loop(self) -> None:
223
+ while True:
224
+ try:
225
+ await asyncio.to_thread(self.refresh)
226
+ if self._state == "critical":
227
+ logger.warning(
228
+ "system monitor: thermal CRITICAL ({}°C ≥ {}°C) — shedding new "
229
+ "STT/TTS requests until it cools below {}°C",
230
+ self.latest_temp, self.critical_c, self.warn_c)
231
+ except Exception as exc: # never let a sampling hiccup kill the loop
232
+ logger.debug("system monitor sample failed: {}", exc)
233
+ await asyncio.sleep(self.interval)
234
+
235
+ async def start(self) -> None:
236
+ try: # prime one sample so the first footer poll has data
237
+ await asyncio.to_thread(self.refresh)
238
+ except Exception as exc:
239
+ logger.debug("system monitor initial sample failed: {}", exc)
240
+ self._task = asyncio.create_task(self._loop())
241
+
242
+ async def stop(self) -> None:
243
+ if self._task is not None:
244
+ self._task.cancel()
245
+ try:
246
+ await self._task
247
+ except asyncio.CancelledError:
248
+ pass
249
+ except Exception: # pragma: no cover
250
+ pass
251
+ self._task = None
252
+
253
+
254
+ def thermal_guard(request: Request) -> None:
255
+ """FastAPI dependency: reject a new STT/TTS request with 503 while the box is in the
256
+ critical thermal state (the guard) so it can cool instead of overheating into a hang.
257
+ In-flight requests are never interrupted; new ones resume once temp < warn_c."""
258
+ mon: SystemMonitor | None = getattr(request.app.state, "system_monitor", None)
259
+ if mon is not None and mon.overheated:
260
+ raise HTTPException(
261
+ status_code=503,
262
+ detail=(f"Server cooling down (temperature {mon.latest_temp}°C ≥ "
263
+ f"{mon.critical_c}°C); please retry shortly."),
264
+ )
@@ -3297,3 +3297,46 @@ async function init() {
3297
3297
  }
3298
3298
 
3299
3299
  init().catch((err) => setOutput(`Init failed: ${err.message}`));
3300
+
3301
+
3302
+ // ── System monitor footer ────────────────────────────────────────────────
3303
+ // Polls /v1/system on a fixed interval and renders CPU / memory / GPU / temperature
3304
+ // in the bottom bar, colour-coded by thermal state (ok/warn/critical). On a critical
3305
+ // (overheat) state the server's thermal guard sheds new STT/TTS requests; the bar says so.
3306
+ // If the backend is unreachable the bar hides itself rather than showing stale numbers
3307
+ // (keeps the footer honest about backend state).
3308
+ function _sysmonNum(v, digits) {
3309
+ return (v === null || v === undefined) ? "—" : Number(v).toFixed(digits);
3310
+ }
3311
+
3312
+ async function refreshSysmon() {
3313
+ const bar = document.getElementById("sysmon-bar");
3314
+ if (!bar) return;
3315
+ try {
3316
+ const d = await fetchJson("/v1/system");
3317
+ if (!d || d.available === false) { bar.hidden = true; return; }
3318
+ const state = d.thermal_state || "ok";
3319
+ bar.className = "sysmon-bar sysmon-" + state;
3320
+ const parts = [];
3321
+ if (d.temp_c != null) parts.push(`🌡 ${_sysmonNum(d.temp_c, 1)}°C`);
3322
+ if (d.cpu_load1 != null) parts.push(`CPU ${_sysmonNum(d.cpu_load1, 2)}${d.cpu_count ? " / " + d.cpu_count : ""}`);
3323
+ if (d.mem_pct != null) {
3324
+ const detail = (d.mem_used_gb != null && d.mem_total_gb != null)
3325
+ ? ` (${_sysmonNum(d.mem_used_gb, 1)}/${_sysmonNum(d.mem_total_gb, 0)}G)` : "";
3326
+ parts.push(`内存 ${_sysmonNum(d.mem_pct, 0)}%${detail}`);
3327
+ }
3328
+ if (d.gpu_util_pct != null) parts.push(`GPU ${_sysmonNum(d.gpu_util_pct, 0)}%`);
3329
+ if (d.gpu_mem_used_mb != null && d.gpu_mem_total_mb != null)
3330
+ parts.push(`显存 ${_sysmonNum(d.gpu_mem_used_mb / 1024, 1)}/${_sysmonNum(d.gpu_mem_total_mb / 1024, 0)}G`);
3331
+ let text = parts.join(" · ") || "系统监控";
3332
+ if (state === "critical") text += " · ⚠️ 降温中:已暂停接收新请求";
3333
+ else if (state === "warn") text += " · ⚠️ 偏热";
3334
+ bar.innerHTML = '<span class="sysmon-dot"></span>' + text;
3335
+ bar.hidden = false;
3336
+ } catch (_) {
3337
+ bar.hidden = true; // backend down → hide, don't show stale readings
3338
+ }
3339
+ }
3340
+
3341
+ refreshSysmon();
3342
+ setInterval(refreshSysmon, 10000);
@@ -242,6 +242,9 @@
242
242
  </div>
243
243
  </div>
244
244
 
245
+ <!-- System monitor: CPU/mem/GPU/temperature + thermal-guard state (filled by app.js) -->
246
+ <footer id="sysmon-bar" class="sysmon-bar" hidden></footer>
247
+
245
248
  <script src="/ui/app.js" defer></script>
246
249
  </body>
247
250
  </html>
@@ -648,3 +648,27 @@ button.filter-chip.active { background: var(--accent); color: #fff; border-color
648
648
  box-shadow: 0 8px 32px rgba(0,0,0,.15);
649
649
  }
650
650
  #config-add-dialog label { display: block; margin-bottom: .8rem; }
651
+
652
+ /* ── System monitor footer (CPU / mem / GPU / temperature + thermal guard) ── */
653
+ body { padding-bottom: 34px; } /* room for the fixed status bar */
654
+ .sysmon-bar {
655
+ position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
656
+ display: flex; align-items: center; gap: 8px;
657
+ padding: 5px 14px; font-size: .78rem; line-height: 1.2;
658
+ background: var(--bg-2, #ece8de);
659
+ border-top: 1px solid var(--line, rgba(31, 42, 31, .16));
660
+ color: var(--ink-soft, #4f5b4f);
661
+ font-variant-numeric: tabular-nums;
662
+ }
663
+ .sysmon-dot {
664
+ width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
665
+ background: var(--accent, #0d7c5a);
666
+ }
667
+ .sysmon-warn { color: #8a5a00; }
668
+ .sysmon-warn .sysmon-dot { background: #d99800; }
669
+ .sysmon-critical {
670
+ color: #fff; font-weight: 600;
671
+ background: var(--danger, #b0352f);
672
+ border-top-color: var(--danger, #b0352f);
673
+ }
674
+ .sysmon-critical .sysmon-dot { background: #fff; }
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "openspeechapi"
7
- version = "0.2.15"
7
+ version = "0.2.17"
8
8
  description = "Unified speech interface for STT/TTS providers"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
File without changes