flexaudio 0.5.4__tar.gz → 0.6.0__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 (222) hide show
  1. {flexaudio-0.5.4 → flexaudio-0.6.0}/Cargo.lock +13 -13
  2. {flexaudio-0.5.4 → flexaudio-0.6.0}/Cargo.toml +1 -1
  3. {flexaudio-0.5.4 → flexaudio-0.6.0}/PKG-INFO +44 -74
  4. {flexaudio-0.5.4 → flexaudio-0.6.0}/README.md +43 -73
  5. {flexaudio-0.5.4 → flexaudio-0.6.0}/THIRD_PARTY_NOTICES.md +99 -99
  6. {flexaudio-0.5.4 → flexaudio-0.6.0}/bindings/flexaudio-py/README.md +43 -73
  7. {flexaudio-0.5.4 → flexaudio-0.6.0}/bindings/flexaudio-py/THIRD_PARTY_NOTICES.md +99 -99
  8. {flexaudio-0.5.4 → flexaudio-0.6.0}/bindings/flexaudio-py/flexaudio.pyi +59 -102
  9. {flexaudio-0.5.4 → flexaudio-0.6.0}/bindings/flexaudio-py/src/config.rs +2 -106
  10. {flexaudio-0.5.4 → flexaudio-0.6.0}/bindings/flexaudio-py/src/errors.rs +6 -6
  11. {flexaudio-0.5.4 → flexaudio-0.6.0}/bindings/flexaudio-py/src/lib.rs +10 -21
  12. {flexaudio-0.5.4 → flexaudio-0.6.0}/bindings/flexaudio-py/src/marshal.rs +15 -108
  13. flexaudio-0.5.4/bindings/flexaudio-py/src/whisper_buffer.rs → flexaudio-0.6.0/bindings/flexaudio-py/src/pcm_buffer.rs +2 -2
  14. flexaudio-0.6.0/bindings/flexaudio-py/src/stream.rs +827 -0
  15. flexaudio-0.6.0/bindings/flexaudio-py/src/stream_stop.rs +212 -0
  16. flexaudio-0.5.4/bindings/flexaudio-py/src/stream_whisper.rs → flexaudio-0.6.0/bindings/flexaudio-py/src/stream_vad.rs +100 -118
  17. flexaudio-0.5.4/bindings/flexaudio-py/src/whisper_vad.rs → flexaudio-0.6.0/bindings/flexaudio-py/src/vad.rs +100 -112
  18. flexaudio-0.5.4/bindings/flexaudio-py/src/whisper_marshal.rs → flexaudio-0.6.0/bindings/flexaudio-py/src/vad_marshal.rs +16 -22
  19. flexaudio-0.5.4/bindings/flexaudio-py/tests/rust/whisper_vad.rs → flexaudio-0.6.0/bindings/flexaudio-py/tests/rust/vad.rs +41 -27
  20. {flexaudio-0.5.4 → flexaudio-0.6.0}/bindings/flexaudio-py/tests/test_contracts.py +31 -8
  21. flexaudio-0.5.4/bindings/flexaudio-py/tests/test_whisper_buffer.py → flexaudio-0.6.0/bindings/flexaudio-py/tests/test_pcm_buffer.py +10 -10
  22. {flexaudio-0.5.4 → flexaudio-0.6.0}/bindings/flexaudio-py/tests/test_startup_documentation.py +1 -9
  23. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/Cargo.toml +6 -6
  24. flexaudio-0.6.0/crates/flexaudio/THIRD_PARTY_NOTICES.md +1368 -0
  25. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/device_watcher.rs +4 -4
  26. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/lib.rs +12 -3
  27. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/mix/contract_tests.rs +0 -20
  28. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/mix/repro_tests.rs +20 -20
  29. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/mix.rs +0 -11
  30. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/stream/permission_tests.rs +2 -2
  31. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/stream/repro_tests.rs +32 -32
  32. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/stream/source.rs +1 -0
  33. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/stream/startup_tests.rs +1 -1
  34. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/stream.rs +1 -1
  35. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/stream_frame_tests.rs +4 -4
  36. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/src/error_context.rs +27 -31
  37. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/src/errors.rs +8 -8
  38. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/src/lib.rs +2 -2
  39. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/src/normalizer/output.rs +1 -1
  40. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/src/normalizer/repro_tests.rs +17 -11
  41. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/src/types.rs +9 -4
  42. flexaudio-0.5.4/crates/flexaudio-core/src/whisper_error.rs → flexaudio-0.6.0/crates/flexaudio-core/src/vad_error.rs +7 -3
  43. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-encode/Cargo.toml +1 -1
  44. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-mic/Cargo.toml +1 -1
  45. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-mic/src/input_config.rs +2 -2
  46. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-mic/src/tests.rs +2 -2
  47. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-linux/Cargo.toml +1 -1
  48. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-linux/src/discovery.rs +2 -2
  49. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-linux/src/lib.rs +2 -2
  50. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-macos/Cargo.toml +1 -1
  51. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-macos/src/common.rs +1 -1
  52. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-macos/src/process.rs +27 -4
  53. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-macos/src/system.rs +41 -7
  54. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-macos/src/tap.rs +3 -3
  55. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-windows/Cargo.toml +2 -2
  56. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-vad/Cargo.toml +2 -2
  57. flexaudio-0.6.0/crates/flexaudio-vad/README.md +61 -0
  58. flexaudio-0.6.0/crates/flexaudio-vad/THIRD_PARTY_NOTICES.md +2804 -0
  59. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-vad/examples/dump_probs.rs +10 -25
  60. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-vad/examples/probe.rs +4 -3
  61. flexaudio-0.5.4/crates/flexaudio-vad/src/whisper_capture.rs → flexaudio-0.6.0/crates/flexaudio-vad/src/capture_converter.rs +12 -10
  62. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-vad/src/infer.rs +43 -44
  63. flexaudio-0.6.0/crates/flexaudio-vad/src/input_converter.rs +137 -0
  64. flexaudio-0.6.0/crates/flexaudio-vad/src/lib.rs +116 -0
  65. flexaudio-0.6.0/crates/flexaudio-vad/src/params.rs +191 -0
  66. flexaudio-0.5.4/crates/flexaudio-vad/src/whisper_preview.rs → flexaudio-0.6.0/crates/flexaudio-vad/src/preview.rs +2 -2
  67. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-vad/src/resample.rs +24 -60
  68. flexaudio-0.5.4/crates/flexaudio-vad/src/whisper_stream.rs → flexaudio-0.6.0/crates/flexaudio-vad/src/stream.rs +190 -54
  69. flexaudio-0.5.4/crates/flexaudio-vad/src/whisper_stream_tests.rs → flexaudio-0.6.0/crates/flexaudio-vad/src/stream_tests.rs +112 -43
  70. flexaudio-0.5.4/crates/flexaudio-vad/src/whisper_tap.rs → flexaudio-0.6.0/crates/flexaudio-vad/src/tap.rs +21 -23
  71. flexaudio-0.5.4/crates/flexaudio-vad/src/whisper_tap_tests.rs → flexaudio-0.6.0/crates/flexaudio-vad/src/tap_tests.rs +43 -29
  72. flexaudio-0.5.4/crates/flexaudio-vad/src/whisper_tap_types.rs → flexaudio-0.6.0/crates/flexaudio-vad/src/tap_types.rs +44 -44
  73. flexaudio-0.5.4/crates/flexaudio-vad/src/whisper_types.rs → flexaudio-0.6.0/crates/flexaudio-vad/src/types.rs +41 -35
  74. flexaudio-0.5.4/crates/flexaudio-vad/src/whisper_postprocess.rs → flexaudio-0.6.0/crates/flexaudio-vad/src/whisper_cpp_segments.rs +23 -26
  75. flexaudio-0.5.4/crates/flexaudio-vad/src/whisper_postprocess_tests.rs → flexaudio-0.6.0/crates/flexaudio-vad/src/whisper_cpp_segments_tests.rs +92 -68
  76. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-vad/tests/speech_fixture.rs +73 -49
  77. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-vad/tests/whisper_golden.rs +19 -11
  78. {flexaudio-0.5.4 → flexaudio-0.6.0}/pyproject.toml +1 -1
  79. flexaudio-0.5.4/bindings/flexaudio-py/src/stream.rs +0 -1432
  80. flexaudio-0.5.4/bindings/flexaudio-py/src/stream_stop.rs +0 -673
  81. flexaudio-0.5.4/bindings/flexaudio-py/src/vad.rs +0 -194
  82. flexaudio-0.5.4/crates/flexaudio/THIRD_PARTY_NOTICES.md +0 -345
  83. flexaudio-0.5.4/crates/flexaudio-vad/README.md +0 -66
  84. flexaudio-0.5.4/crates/flexaudio-vad/THIRD_PARTY_NOTICES.md +0 -345
  85. flexaudio-0.5.4/crates/flexaudio-vad/src/capture.rs +0 -295
  86. flexaudio-0.5.4/crates/flexaudio-vad/src/config.rs +0 -130
  87. flexaudio-0.5.4/crates/flexaudio-vad/src/lib.rs +0 -1340
  88. flexaudio-0.5.4/crates/flexaudio-vad/src/segmenter.rs +0 -197
  89. flexaudio-0.5.4/crates/flexaudio-vad/src/whisper_params.rs +0 -187
  90. {flexaudio-0.5.4 → flexaudio-0.6.0}/LICENSE +0 -0
  91. {flexaudio-0.5.4 → flexaudio-0.6.0}/bindings/flexaudio-py/Cargo.toml +0 -0
  92. {flexaudio-0.5.4 → flexaudio-0.6.0}/bindings/flexaudio-py/LICENSE +0 -0
  93. {flexaudio-0.5.4 → flexaudio-0.6.0}/bindings/flexaudio-py/src/denoise.rs +0 -0
  94. {flexaudio-0.5.4 → flexaudio-0.6.0}/bindings/flexaudio-py/src/encode.rs +0 -0
  95. {flexaudio-0.5.4 → flexaudio-0.6.0}/bindings/flexaudio-py/src/watcher.rs +0 -0
  96. {flexaudio-0.5.4 → flexaudio-0.6.0}/bindings/flexaudio-py/tests/test_exclude_pids.py +0 -0
  97. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/LICENSE +0 -0
  98. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/README.md +0 -0
  99. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/mix/child.rs +0 -0
  100. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/mix/drift.rs +0 -0
  101. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/mix/notices.rs +0 -0
  102. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/mix/permission_tests.rs +0 -0
  103. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/mix/startup_tests.rs +0 -0
  104. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/mix/tests.rs +0 -0
  105. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/mix/worker.rs +0 -0
  106. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/mock.rs +0 -0
  107. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/processes.rs +0 -0
  108. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/stream/contract_tests.rs +0 -0
  109. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/stream/control.rs +0 -0
  110. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/stream/delivery.rs +0 -0
  111. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/stream/intake.rs +0 -0
  112. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/stream/intake_generation.rs +0 -0
  113. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/stream/lifecycle.rs +0 -0
  114. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/stream/processor.rs +0 -0
  115. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/stream/recovery_tests.rs +0 -0
  116. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/stream/shared.rs +0 -0
  117. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/stream/startup_order.rs +0 -0
  118. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/stream/tap_drain.rs +0 -0
  119. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/stream/terminal.rs +0 -0
  120. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/stream/tests/gain.rs +0 -0
  121. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/stream/tests/health.rs +0 -0
  122. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/stream/tests/output.rs +0 -0
  123. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/stream/tests/pause.rs +0 -0
  124. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/stream/tests/validation.rs +0 -0
  125. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/src/stream/tests.rs +0 -0
  126. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/tests/integration.rs +0 -0
  127. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio/tests/processes_linux.rs +0 -0
  128. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/Cargo.toml +0 -0
  129. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/LICENSE +0 -0
  130. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/README.md +0 -0
  131. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/src/addon_error.rs +0 -0
  132. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/src/backend.rs +0 -0
  133. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/src/chunk_ring.rs +0 -0
  134. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/src/clock.rs +0 -0
  135. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/src/diagnostics.rs +0 -0
  136. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/src/inventory.rs +0 -0
  137. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/src/loss.rs +0 -0
  138. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/src/normalizer/resampler.rs +0 -0
  139. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/src/normalizer/tests/clock.rs +0 -0
  140. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/src/normalizer/tests/conversion.rs +0 -0
  141. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/src/normalizer/tests/processor.rs +0 -0
  142. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/src/normalizer/tests.rs +0 -0
  143. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/src/normalizer.rs +0 -0
  144. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/src/process_list.rs +0 -0
  145. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/src/quant.rs +0 -0
  146. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/src/raw_ring.rs +0 -0
  147. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/src/secondary_ring.rs +0 -0
  148. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/src/spawn_error.rs +0 -0
  149. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/src/startup.rs +0 -0
  150. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-core/src/types_tests.rs +0 -0
  151. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-denoise/Cargo.toml +0 -0
  152. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-denoise/LICENSE +0 -0
  153. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-denoise/README.md +0 -0
  154. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-denoise/src/lib.rs +0 -0
  155. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-encode/LICENSE +0 -0
  156. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-encode/README.md +0 -0
  157. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-encode/src/error.rs +0 -0
  158. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-encode/src/lib.rs +0 -0
  159. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-encode/src/writer.rs +0 -0
  160. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-encode/tests/roundtrip.rs +0 -0
  161. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-mic/LICENSE +0 -0
  162. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-mic/README.md +0 -0
  163. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-mic/src/callback_mailbox.rs +0 -0
  164. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-mic/src/capture_owner/tests.rs +0 -0
  165. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-mic/src/capture_owner.rs +0 -0
  166. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-mic/src/lib.rs +0 -0
  167. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-mic/src/mac_permission.rs +0 -0
  168. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-mic/src/mac_policy/tests.rs +0 -0
  169. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-mic/src/mac_policy.rs +0 -0
  170. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-mic/src/permission.rs +0 -0
  171. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-mic/src/windows_keeper.rs +0 -0
  172. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-mic/src/windows_permission.rs +0 -0
  173. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-mic/src/windows_policy.rs +0 -0
  174. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-mic/tests/windows_cpal_keeper.rs +0 -0
  175. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-linux/LICENSE +0 -0
  176. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-linux/README.md +0 -0
  177. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-linux/src/capture_failures.rs +0 -0
  178. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-linux/src/owner.rs +0 -0
  179. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-linux/src/processes.rs +0 -0
  180. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-linux/src/readiness.rs +0 -0
  181. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-linux/src/watcher_failures.rs +0 -0
  182. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-linux/src/watcher_queue.rs +0 -0
  183. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-macos/LICENSE +0 -0
  184. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-macos/README.md +0 -0
  185. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-macos/src/activity.rs +0 -0
  186. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-macos/src/capture_health.rs +0 -0
  187. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-macos/src/devices.rs +0 -0
  188. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-macos/src/inventory.rs +0 -0
  189. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-macos/src/lib.rs +0 -0
  190. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-macos/src/native_probe/capture.rs +0 -0
  191. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-macos/src/native_probe/io.rs +0 -0
  192. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-macos/src/native_probe/output.rs +0 -0
  193. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-macos/src/native_probe.rs +0 -0
  194. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-macos/src/owner.rs +0 -0
  195. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-macos/src/probe/tests.rs +0 -0
  196. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-macos/src/probe.rs +0 -0
  197. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-macos/src/probe_signal.rs +0 -0
  198. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-macos/src/processes.rs +0 -0
  199. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-macos/src/tap/buffer.rs +0 -0
  200. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-macos/src/terminal.rs +0 -0
  201. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-macos/src/version.rs +0 -0
  202. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-windows/LICENSE +0 -0
  203. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-windows/README.md +0 -0
  204. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-windows/src/common.rs +0 -0
  205. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-windows/src/format.rs +0 -0
  206. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-windows/src/inventory.rs +0 -0
  207. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-windows/src/keepalive.rs +0 -0
  208. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-windows/src/lib.rs +0 -0
  209. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-windows/src/lifecycle.rs +0 -0
  210. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-windows/src/native_outcomes.rs +0 -0
  211. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-windows/src/owner.rs +0 -0
  212. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-windows/src/process.rs +0 -0
  213. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-windows/src/processes.rs +0 -0
  214. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-windows/src/system.rs +0 -0
  215. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-os-windows/src/version.rs +0 -0
  216. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-vad/LICENSE +0 -0
  217. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-vad/assets/silero_vad_openvino_16k.onnx +0 -0
  218. /flexaudio-0.5.4/crates/flexaudio-vad/src/whisper_capture_tests.rs → /flexaudio-0.6.0/crates/flexaudio-vad/src/capture_converter_tests.rs +0 -0
  219. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-vad/tests/fixtures/jp_2spk_FF_4s_16k.probs.txt +0 -0
  220. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-vad/tests/fixtures/jp_2spk_FF_4s_16k.wav +0 -0
  221. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-vad/tests/fixtures/whisper_vad_golden.json +0 -0
  222. {flexaudio-0.5.4 → flexaudio-0.6.0}/crates/flexaudio-vad/tests/fixtures/whisper_vad_golden_extreme.json.gz +0 -0
@@ -722,7 +722,7 @@ dependencies = [
722
722
 
723
723
  [[package]]
724
724
  name = "flexaudio"
725
- version = "0.5.4"
725
+ version = "0.6.0"
726
726
  dependencies = [
727
727
  "flexaudio-core",
728
728
  "flexaudio-denoise",
@@ -734,7 +734,7 @@ dependencies = [
734
734
 
735
735
  [[package]]
736
736
  name = "flexaudio-cli"
737
- version = "0.5.4"
737
+ version = "0.6.0"
738
738
  dependencies = [
739
739
  "clap",
740
740
  "ctrlc",
@@ -746,7 +746,7 @@ dependencies = [
746
746
 
747
747
  [[package]]
748
748
  name = "flexaudio-core"
749
- version = "0.5.4"
749
+ version = "0.6.0"
750
750
  dependencies = [
751
751
  "bitflags 2.13.0",
752
752
  "ringbuf",
@@ -757,14 +757,14 @@ dependencies = [
757
757
 
758
758
  [[package]]
759
759
  name = "flexaudio-denoise"
760
- version = "0.5.4"
760
+ version = "0.6.0"
761
761
  dependencies = [
762
762
  "nnnoiseless",
763
763
  ]
764
764
 
765
765
  [[package]]
766
766
  name = "flexaudio-encode"
767
- version = "0.5.4"
767
+ version = "0.6.0"
768
768
  dependencies = [
769
769
  "claxon",
770
770
  "flacenc",
@@ -774,7 +774,7 @@ dependencies = [
774
774
 
775
775
  [[package]]
776
776
  name = "flexaudio-ffi"
777
- version = "0.5.4"
777
+ version = "0.6.0"
778
778
  dependencies = [
779
779
  "flexaudio",
780
780
  "flexaudio-denoise",
@@ -784,7 +784,7 @@ dependencies = [
784
784
 
785
785
  [[package]]
786
786
  name = "flexaudio-mic"
787
- version = "0.5.4"
787
+ version = "0.6.0"
788
788
  dependencies = [
789
789
  "block2",
790
790
  "cpal",
@@ -796,7 +796,7 @@ dependencies = [
796
796
 
797
797
  [[package]]
798
798
  name = "flexaudio-napi"
799
- version = "0.5.4"
799
+ version = "0.6.0"
800
800
  dependencies = [
801
801
  "flexaudio",
802
802
  "flexaudio-denoise",
@@ -809,7 +809,7 @@ dependencies = [
809
809
 
810
810
  [[package]]
811
811
  name = "flexaudio-os-linux"
812
- version = "0.5.4"
812
+ version = "0.6.0"
813
813
  dependencies = [
814
814
  "flexaudio-core",
815
815
  "pipewire",
@@ -817,7 +817,7 @@ dependencies = [
817
817
 
818
818
  [[package]]
819
819
  name = "flexaudio-os-macos"
820
- version = "0.5.4"
820
+ version = "0.6.0"
821
821
  dependencies = [
822
822
  "block2",
823
823
  "flexaudio-core",
@@ -831,7 +831,7 @@ dependencies = [
831
831
 
832
832
  [[package]]
833
833
  name = "flexaudio-os-windows"
834
- version = "0.5.4"
834
+ version = "0.6.0"
835
835
  dependencies = [
836
836
  "flexaudio-core",
837
837
  "windows",
@@ -839,7 +839,7 @@ dependencies = [
839
839
 
840
840
  [[package]]
841
841
  name = "flexaudio-py"
842
- version = "0.5.4"
842
+ version = "0.6.0"
843
843
  dependencies = [
844
844
  "flexaudio",
845
845
  "flexaudio-denoise",
@@ -850,7 +850,7 @@ dependencies = [
850
850
 
851
851
  [[package]]
852
852
  name = "flexaudio-vad"
853
- version = "0.5.4"
853
+ version = "0.6.0"
854
854
  dependencies = [
855
855
  "flate2",
856
856
  "flexaudio-core",
@@ -3,7 +3,7 @@ resolver = "2"
3
3
  members = ["crates/flexaudio-core", "crates/flexaudio-os-windows", "crates/flexaudio-os-macos", "crates/flexaudio-os-linux", "crates/flexaudio-mic", "crates/flexaudio", "crates/flexaudio-vad", "crates/flexaudio-encode", "crates/flexaudio-denoise", "bindings/flexaudio-py"]
4
4
 
5
5
  [workspace.package]
6
- version = "0.5.4"
6
+ version = "0.6.0"
7
7
  edition = "2021"
8
8
  license = "MIT"
9
9
  rust-version = "1.85"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flexaudio
3
- Version: 0.5.4
3
+ Version: 0.6.0
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: 3
6
6
  Classifier: Topic :: Multimedia :: Sound/Audio :: Capture/Recording
@@ -23,7 +23,7 @@ per-process loopback) written in Rust. Built with PyO3 and maturin.
23
23
  ## Install
24
24
 
25
25
  ```sh
26
- pip install "flexaudio>=0.5,<0.6"
26
+ pip install "flexaudio>=0.6,<0.7"
27
27
  ```
28
28
 
29
29
  ## Usage
@@ -142,56 +142,22 @@ Platform behavior:
142
142
  - Linux matches exact PIDs, without excluding descendants. Linux and Windows
143
143
  ignore the selected system device while exclusion is active.
144
144
 
145
- ### Integrated denoise and VAD
145
+ ### Noise suppression and attached VAD
146
146
 
147
- `open()` (and `switch_source()`) accept `denoise=True` and `vad={...}` to run
148
- noise suppression and voice-activity detection inside `poll_chunk()`. The
149
- processing order is denoise -> VAD. `peak` and `rms` measure the final delivered
150
- float PCM after denoise and gain, before integer encoding. Graceful `stop()`
151
- queues the actual 480-frame (10 ms) denoiser tail and pending VAD boundaries;
152
- continue polling after stop to receive them. Repeated stop does not repeat tails.
153
- Capture terminal failure suppresses remaining PCM and audio tails.
147
+ `denoise=True` enables RNNoise. Without VAD it processes delivered PCM during
148
+ polling; with VAD it processes the shared capture branch before VAD and output
149
+ conversion. It requires 48000 Hz output and introduces 480 samples/channel of delay.
150
+ Graceful stop queues the denoiser tail; continue polling to receive final output.
154
151
 
155
- ```python
156
- with flexaudio.open("mic", denoise=True, vad={"threshold": 0.5}) as stream:
157
- drain_events(stream) # Use the helper from Usage before every PCM poll.
158
- chunk = stream.poll_chunk()
159
- if chunk is not None:
160
- samples = np.frombuffer(chunk.data, dtype=np.float32) # denoised audio
161
- for ev in chunk.vad_events: # speech boundaries
162
- print(ev.type, ev.at_sample) # "speech_start"/"speech_end"
163
- ```
152
+ Attach the same generic VAD engine with
153
+ `vad=flexaudio.StreamVadOptions(provisional=True)`. Each chunk's `vad_events`
154
+ contains ordered segments, optional provisional hints, and epoch markers.
155
+ The fixed 20 ms chunk size preserves canonical capture conversion and ordering;
156
+ other chunk durations are rejected before opening a device.
164
157
 
165
- `denoise` requires a 48000 Hz output (`denoise=True` with any other
166
- `output_rate` raises `ValueError`); the first 480 samples/channel are silence
167
- from the denoiser's fixed delay. `vad` is a dict with the same keys as the
168
- standalone `Vad` (below). `at_sample` is measured at the VAD's internal rate
169
- (16000 or 8000 Hz), not the input rate.
170
-
171
- VAD emits `speech_start` and `speech_end` together when a segment is finalized,
172
- not when speech first begins. On `DISCONTINUITY` (`chunk.flags & 1`), an open
173
- pre-gap segment is flushed before the post-gap PCM is processed. Flushed events
174
- come first and retain their pre-gap `at_sample` values; VAD then restarts its
175
- sample clock at zero. These positions are separate from `chunk.pts_ns`.
176
-
177
- Consumers distinguish timelines by the discontinuity chunk: the core always
178
- delivers 20 ms chunks, which cannot complete a fresh 32 ms VAD inference frame.
179
- Consequently **all events on the discontinuity chunk belong to the pre-gap
180
- timeline**, and all events on subsequent chunks belong to the new timeline.
181
- Handle that chunk's events under the previous timeline before advancing your
182
- VAD timeline; the chunk's PCM itself already belongs to the post-gap timeline.
183
- For example, a flushed pair at 0/512 on the discontinuity chunk is old; a pair
184
- at 0/1024 delivered later is new. Do not infer the boundary from a decrease in
185
- `at_sample`: delayed post-gap speech need not produce one. A mixed event list
186
- from larger chunks would require an explicit flushed-event count or timeline
187
- identifier; larger chunks are not supported by the current core.
188
-
189
- If the discontinuity flush fails, VAD reset is still attempted and denoise is
190
- still reset before `poll_chunk()` raises the flush error through its existing
191
- exception path. That poll consumes the chunk. When reset succeeds, later
192
- chunks process normally without repeating that flush error. If VAD reset
193
- itself fails, its failure remains latched and subsequent processing reports
194
- it until a reset succeeds.
158
+ On macOS, `silence_probe=False` disables the silence diagnosis tone. The default
159
+ is enabled: after five seconds of exact-zero system capture, a 1 kHz tone at
160
+ amplitude 1e-5 plays for 300 ms to help distinguish permission failure from silence.
195
161
 
196
162
  ### Standalone add-ons
197
163
 
@@ -199,9 +165,9 @@ The same building blocks are available as independent classes.
199
165
 
200
166
  ```python
201
167
  # Voice activity detection over arbitrary-format PCM (mono/stereo, any rate).
202
- vad = flexaudio.Vad(threshold=0.5, min_silence_ms=100) # silero defaults
168
+ vad = flexaudio.Vad(threshold=0.5, min_silence_ms=100)
203
169
  for ev in vad.process(samples, input_sample_rate=48000, input_channels=2):
204
- print(ev.type, ev.at_sample)
170
+ print(ev.type)
205
171
 
206
172
  # Noise suppression (48 kHz, +/-1.0 normalized interleaved f32).
207
173
  den = flexaudio.Denoiser(channels=1)
@@ -246,9 +212,8 @@ path, reason, optional positive scalar-interleaved sample count, rate, and chann
246
212
  exact chunk attribution; flags 8 (`PADDED`) and 16 (`CLIPPED`) instead describe
247
213
  that delivered chunk. Padding alone does not imply a gap.
248
214
 
249
- Built-in backends emit neither `permissionPending` nor `permissionGranted` for
250
- any capture source on any OS. Those event arms remain for custom Rust backends
251
- and compatibility. From 0.5.3, macOS microphone capture requires decided consent
215
+ `permissionPending` remains available for custom Rust backends; built-in sources
216
+ do not emit it. From 0.5.3, macOS microphone capture requires decided consent
252
217
  before each start and does not continuously monitor authorization or revocation.
253
218
  `error` and `terminalError` are terminal; `recoverableError` continues
254
219
  capture. `terminal_error()` retains the typed capture primary. `shutdown_report()`
@@ -274,11 +239,15 @@ their models/tables and require no runtime files or network access:
274
239
  - **flexaudio-denoise** — uses [nnnoiseless](https://github.com/jneem/nnnoiseless)
275
240
  (BSD-3-Clause), a Rust port of RNNoise with embedded model weights.
276
241
 
277
- ### Whisper-compatible VAD
242
+ ### Generic VAD
278
243
 
279
- `WhisperVad` runs embedded Silero v6 on normalized mono float32 at 16 kHz, with
244
+ `Vad` runs embedded Silero v6 on normalized float32, with
280
245
  segmentation matching whisper.cpp pin `85a69493a601d4ff5a834064f7b7bac250bd8739`.
281
- It accepts a sequence or a contiguous one-dimensional native float32 buffer;
246
+ `process(samples, input_sample_rate=16000, input_channels=1)` accepts arbitrary
247
+ positive input rates/channel counts and converts to mono16k internally. Event
248
+ times use the input timeline, compensated for converter group delay. After raw
249
+ input validation, finite resampler overshoot is clipped internally to [-1, 1]. It accepts
250
+ a sequence or a contiguous one-dimensional native float32 buffer;
282
251
  NumPy is optional. Buffer input is copied through Python bytes into owned Rust
283
252
  float32 storage for Python 3.8 stable-ABI compatibility, and sequence input is
284
253
  copied for that feed. Instances stay on their creating thread.
@@ -287,7 +256,7 @@ copied for that feed. Instances stay on their creating thread.
287
256
  import array
288
257
  import flexaudio
289
258
 
290
- vad = flexaudio.WhisperVad(provisional=True)
259
+ vad = flexaudio.Vad(provisional=True)
291
260
  events = vad.process(memoryview(array.array('f', [0.0] * 513)))
292
261
  events += vad.finish()
293
262
  for event in events:
@@ -295,11 +264,14 @@ for event in events:
295
264
  print(event.start_ms, event.end_ms)
296
265
  ```
297
266
 
298
- Parameters are `threshold=0.5`, `min_speech_duration_ms=250`,
299
- `min_silence_duration_ms=100`, `max_speech_duration_s=3.4028234663852886e38`, and
267
+ Parameters are `threshold=0.5`, `min_speech_ms=250`,
268
+ `min_silence_ms=100`, `max_speech_ms=0`, and
300
269
  `speech_pad_ms=30`. Supplied zero values stay zero. Durations must be integers
301
270
  in 0..134217; bool durations, unknown keys, invalid PCM and nonfinite parameters
302
- are rejected. The seconds budget is truncated by the pinned algorithm, and
271
+ are rejected. `max_speech_ms` is integer milliseconds; 0 or values above 100000000 use the
272
+ effectively unbounded legacy `INT_MAX/2`-sample sentinel (1073741823 samples). Other positive
273
+ values below one inference frame plus twice the padding budget are rejected; equality
274
+ (a zero split budget) is valid. Fixed
303
275
  200 ms merging can undo splits: it does **not** bound final segment duration or
304
276
  latency. Optional provisional cuts independently cap pieces at 30000 ms.
305
277
 
@@ -309,31 +281,29 @@ Events are read-only variant objects with snake_case fields and type tags:
309
281
  final endpoints use the 10 ms grid and can exceed physical EOF. `finish()`
310
282
  infers one zero-padded partial frame when needed, closes the epoch, and is
311
283
  idempotent. Call `reset()` to start another epoch; its returned closure events
312
- must also be consumed. Processing after finish raises `WhisperVadRuntimeError`.
284
+ must also be consumed. Processing after finish raises `VadRuntimeError`.
313
285
  Typed errors carry `code` and `terminal_events`; drain those events even when
314
286
  processing fails. `last_frame_probabilities()` returns the latest call's frame
315
287
  index and an owned read-only float32 memoryview, independent of future calls.
316
288
 
317
- `WhisperVadPostProcessor(WhisperVadParams(...))` accepts probabilities from the
289
+ `VadPostProcessor(VadOptions(...))` accepts probabilities from the
318
290
  16 kHz/512-sample frame geometry and delegates to the same segmentation kernel.
319
- `whisper_speech_segments(samples, params=None)` is the single whole-PCM helper
291
+ `speech_segments(samples, params=None)` is the single whole-PCM helper
320
292
  and uses the same streaming process/finish path with preview disabled.
321
293
 
322
- The additive capture option is `open(...,
323
- whisper_vad=WhisperVadStreamOptions(params=..., provisional=True, tap='primary'))`.
324
- It rejects simultaneous legacy `vad` with `ConflictingVad`, and secondary with
325
- `UnsupportedTap`. The producer's shared 48 kHz stereo branch supplies valid PCM
294
+ The capture option is `open(...,
295
+ vad=StreamVadOptions(params=..., provisional=True, tap='primary'))`.
296
+ Secondary taps are rejected with `UnsupportedTap`. The producer's shared 48 kHz stereo branch supplies valid PCM
326
297
  and authoritative frame indices before output conversion. Attached chunks carry
327
- `whisper_vad_events`; each epoch begins with its saved `capture_sample` and `pts_ns`
298
+ `vad_events`; each epoch begins with its saved `capture_sample` and `pts_ns`
328
299
  origin. `AudioChunk.frame_index` is a producer-owned 48 kHz timeline position.
329
- `flush_whisper_vad()` and `stop()` queue ordered closing carriers even without new
300
+ `flush_vad()` and `stop()` queue ordered closing carriers even without new
330
301
  PCM. Poll until the terminal carrier is consumed before releasing the stream.
331
302
  An attached VAD failure is a failure of that session only: capture and PCM
332
303
  delivery continue, and polling delivers its closing events without raising the
333
304
  processor failure. `stop()` succeeds for a VAD-only failure; its shutdown report
334
- retains the cause in `cleanup_errors` with `whisper_code`, and `primary` remains
335
- capture-only. The next discontinuity (or a successful `flush_whisper_vad()`)
305
+ retains the cause in `cleanup_errors` with `vad_code`, and `primary` remains
306
+ capture-only. The next discontinuity (or a successful `flush_vad()`)
336
307
  reinitializes the session so its next frame starts a new anchored epoch.
337
- Disabled attachment has `AudioChunk.whisper_vad_events=None` and flush is a no-op.
338
- Legacy `Vad` and its integration keep their existing behavior.
308
+ Disabled attachment has `AudioChunk.vad_events=None` and flush is a no-op.
339
309
 
@@ -7,7 +7,7 @@ per-process loopback) written in Rust. Built with PyO3 and maturin.
7
7
  ## Install
8
8
 
9
9
  ```sh
10
- pip install "flexaudio>=0.5,<0.6"
10
+ pip install "flexaudio>=0.6,<0.7"
11
11
  ```
12
12
 
13
13
  ## Usage
@@ -126,56 +126,22 @@ Platform behavior:
126
126
  - Linux matches exact PIDs, without excluding descendants. Linux and Windows
127
127
  ignore the selected system device while exclusion is active.
128
128
 
129
- ### Integrated denoise and VAD
129
+ ### Noise suppression and attached VAD
130
130
 
131
- `open()` (and `switch_source()`) accept `denoise=True` and `vad={...}` to run
132
- noise suppression and voice-activity detection inside `poll_chunk()`. The
133
- processing order is denoise -> VAD. `peak` and `rms` measure the final delivered
134
- float PCM after denoise and gain, before integer encoding. Graceful `stop()`
135
- queues the actual 480-frame (10 ms) denoiser tail and pending VAD boundaries;
136
- continue polling after stop to receive them. Repeated stop does not repeat tails.
137
- Capture terminal failure suppresses remaining PCM and audio tails.
131
+ `denoise=True` enables RNNoise. Without VAD it processes delivered PCM during
132
+ polling; with VAD it processes the shared capture branch before VAD and output
133
+ conversion. It requires 48000 Hz output and introduces 480 samples/channel of delay.
134
+ Graceful stop queues the denoiser tail; continue polling to receive final output.
138
135
 
139
- ```python
140
- with flexaudio.open("mic", denoise=True, vad={"threshold": 0.5}) as stream:
141
- drain_events(stream) # Use the helper from Usage before every PCM poll.
142
- chunk = stream.poll_chunk()
143
- if chunk is not None:
144
- samples = np.frombuffer(chunk.data, dtype=np.float32) # denoised audio
145
- for ev in chunk.vad_events: # speech boundaries
146
- print(ev.type, ev.at_sample) # "speech_start"/"speech_end"
147
- ```
136
+ Attach the same generic VAD engine with
137
+ `vad=flexaudio.StreamVadOptions(provisional=True)`. Each chunk's `vad_events`
138
+ contains ordered segments, optional provisional hints, and epoch markers.
139
+ The fixed 20 ms chunk size preserves canonical capture conversion and ordering;
140
+ other chunk durations are rejected before opening a device.
148
141
 
149
- `denoise` requires a 48000 Hz output (`denoise=True` with any other
150
- `output_rate` raises `ValueError`); the first 480 samples/channel are silence
151
- from the denoiser's fixed delay. `vad` is a dict with the same keys as the
152
- standalone `Vad` (below). `at_sample` is measured at the VAD's internal rate
153
- (16000 or 8000 Hz), not the input rate.
154
-
155
- VAD emits `speech_start` and `speech_end` together when a segment is finalized,
156
- not when speech first begins. On `DISCONTINUITY` (`chunk.flags & 1`), an open
157
- pre-gap segment is flushed before the post-gap PCM is processed. Flushed events
158
- come first and retain their pre-gap `at_sample` values; VAD then restarts its
159
- sample clock at zero. These positions are separate from `chunk.pts_ns`.
160
-
161
- Consumers distinguish timelines by the discontinuity chunk: the core always
162
- delivers 20 ms chunks, which cannot complete a fresh 32 ms VAD inference frame.
163
- Consequently **all events on the discontinuity chunk belong to the pre-gap
164
- timeline**, and all events on subsequent chunks belong to the new timeline.
165
- Handle that chunk's events under the previous timeline before advancing your
166
- VAD timeline; the chunk's PCM itself already belongs to the post-gap timeline.
167
- For example, a flushed pair at 0/512 on the discontinuity chunk is old; a pair
168
- at 0/1024 delivered later is new. Do not infer the boundary from a decrease in
169
- `at_sample`: delayed post-gap speech need not produce one. A mixed event list
170
- from larger chunks would require an explicit flushed-event count or timeline
171
- identifier; larger chunks are not supported by the current core.
172
-
173
- If the discontinuity flush fails, VAD reset is still attempted and denoise is
174
- still reset before `poll_chunk()` raises the flush error through its existing
175
- exception path. That poll consumes the chunk. When reset succeeds, later
176
- chunks process normally without repeating that flush error. If VAD reset
177
- itself fails, its failure remains latched and subsequent processing reports
178
- it until a reset succeeds.
142
+ On macOS, `silence_probe=False` disables the silence diagnosis tone. The default
143
+ is enabled: after five seconds of exact-zero system capture, a 1 kHz tone at
144
+ amplitude 1e-5 plays for 300 ms to help distinguish permission failure from silence.
179
145
 
180
146
  ### Standalone add-ons
181
147
 
@@ -183,9 +149,9 @@ The same building blocks are available as independent classes.
183
149
 
184
150
  ```python
185
151
  # Voice activity detection over arbitrary-format PCM (mono/stereo, any rate).
186
- vad = flexaudio.Vad(threshold=0.5, min_silence_ms=100) # silero defaults
152
+ vad = flexaudio.Vad(threshold=0.5, min_silence_ms=100)
187
153
  for ev in vad.process(samples, input_sample_rate=48000, input_channels=2):
188
- print(ev.type, ev.at_sample)
154
+ print(ev.type)
189
155
 
190
156
  # Noise suppression (48 kHz, +/-1.0 normalized interleaved f32).
191
157
  den = flexaudio.Denoiser(channels=1)
@@ -230,9 +196,8 @@ path, reason, optional positive scalar-interleaved sample count, rate, and chann
230
196
  exact chunk attribution; flags 8 (`PADDED`) and 16 (`CLIPPED`) instead describe
231
197
  that delivered chunk. Padding alone does not imply a gap.
232
198
 
233
- Built-in backends emit neither `permissionPending` nor `permissionGranted` for
234
- any capture source on any OS. Those event arms remain for custom Rust backends
235
- and compatibility. From 0.5.3, macOS microphone capture requires decided consent
199
+ `permissionPending` remains available for custom Rust backends; built-in sources
200
+ do not emit it. From 0.5.3, macOS microphone capture requires decided consent
236
201
  before each start and does not continuously monitor authorization or revocation.
237
202
  `error` and `terminalError` are terminal; `recoverableError` continues
238
203
  capture. `terminal_error()` retains the typed capture primary. `shutdown_report()`
@@ -258,11 +223,15 @@ their models/tables and require no runtime files or network access:
258
223
  - **flexaudio-denoise** — uses [nnnoiseless](https://github.com/jneem/nnnoiseless)
259
224
  (BSD-3-Clause), a Rust port of RNNoise with embedded model weights.
260
225
 
261
- ### Whisper-compatible VAD
226
+ ### Generic VAD
262
227
 
263
- `WhisperVad` runs embedded Silero v6 on normalized mono float32 at 16 kHz, with
228
+ `Vad` runs embedded Silero v6 on normalized float32, with
264
229
  segmentation matching whisper.cpp pin `85a69493a601d4ff5a834064f7b7bac250bd8739`.
265
- It accepts a sequence or a contiguous one-dimensional native float32 buffer;
230
+ `process(samples, input_sample_rate=16000, input_channels=1)` accepts arbitrary
231
+ positive input rates/channel counts and converts to mono16k internally. Event
232
+ times use the input timeline, compensated for converter group delay. After raw
233
+ input validation, finite resampler overshoot is clipped internally to [-1, 1]. It accepts
234
+ a sequence or a contiguous one-dimensional native float32 buffer;
266
235
  NumPy is optional. Buffer input is copied through Python bytes into owned Rust
267
236
  float32 storage for Python 3.8 stable-ABI compatibility, and sequence input is
268
237
  copied for that feed. Instances stay on their creating thread.
@@ -271,7 +240,7 @@ copied for that feed. Instances stay on their creating thread.
271
240
  import array
272
241
  import flexaudio
273
242
 
274
- vad = flexaudio.WhisperVad(provisional=True)
243
+ vad = flexaudio.Vad(provisional=True)
275
244
  events = vad.process(memoryview(array.array('f', [0.0] * 513)))
276
245
  events += vad.finish()
277
246
  for event in events:
@@ -279,11 +248,14 @@ for event in events:
279
248
  print(event.start_ms, event.end_ms)
280
249
  ```
281
250
 
282
- Parameters are `threshold=0.5`, `min_speech_duration_ms=250`,
283
- `min_silence_duration_ms=100`, `max_speech_duration_s=3.4028234663852886e38`, and
251
+ Parameters are `threshold=0.5`, `min_speech_ms=250`,
252
+ `min_silence_ms=100`, `max_speech_ms=0`, and
284
253
  `speech_pad_ms=30`. Supplied zero values stay zero. Durations must be integers
285
254
  in 0..134217; bool durations, unknown keys, invalid PCM and nonfinite parameters
286
- are rejected. The seconds budget is truncated by the pinned algorithm, and
255
+ are rejected. `max_speech_ms` is integer milliseconds; 0 or values above 100000000 use the
256
+ effectively unbounded legacy `INT_MAX/2`-sample sentinel (1073741823 samples). Other positive
257
+ values below one inference frame plus twice the padding budget are rejected; equality
258
+ (a zero split budget) is valid. Fixed
287
259
  200 ms merging can undo splits: it does **not** bound final segment duration or
288
260
  latency. Optional provisional cuts independently cap pieces at 30000 ms.
289
261
 
@@ -293,30 +265,28 @@ Events are read-only variant objects with snake_case fields and type tags:
293
265
  final endpoints use the 10 ms grid and can exceed physical EOF. `finish()`
294
266
  infers one zero-padded partial frame when needed, closes the epoch, and is
295
267
  idempotent. Call `reset()` to start another epoch; its returned closure events
296
- must also be consumed. Processing after finish raises `WhisperVadRuntimeError`.
268
+ must also be consumed. Processing after finish raises `VadRuntimeError`.
297
269
  Typed errors carry `code` and `terminal_events`; drain those events even when
298
270
  processing fails. `last_frame_probabilities()` returns the latest call's frame
299
271
  index and an owned read-only float32 memoryview, independent of future calls.
300
272
 
301
- `WhisperVadPostProcessor(WhisperVadParams(...))` accepts probabilities from the
273
+ `VadPostProcessor(VadOptions(...))` accepts probabilities from the
302
274
  16 kHz/512-sample frame geometry and delegates to the same segmentation kernel.
303
- `whisper_speech_segments(samples, params=None)` is the single whole-PCM helper
275
+ `speech_segments(samples, params=None)` is the single whole-PCM helper
304
276
  and uses the same streaming process/finish path with preview disabled.
305
277
 
306
- The additive capture option is `open(...,
307
- whisper_vad=WhisperVadStreamOptions(params=..., provisional=True, tap='primary'))`.
308
- It rejects simultaneous legacy `vad` with `ConflictingVad`, and secondary with
309
- `UnsupportedTap`. The producer's shared 48 kHz stereo branch supplies valid PCM
278
+ The capture option is `open(...,
279
+ vad=StreamVadOptions(params=..., provisional=True, tap='primary'))`.
280
+ Secondary taps are rejected with `UnsupportedTap`. The producer's shared 48 kHz stereo branch supplies valid PCM
310
281
  and authoritative frame indices before output conversion. Attached chunks carry
311
- `whisper_vad_events`; each epoch begins with its saved `capture_sample` and `pts_ns`
282
+ `vad_events`; each epoch begins with its saved `capture_sample` and `pts_ns`
312
283
  origin. `AudioChunk.frame_index` is a producer-owned 48 kHz timeline position.
313
- `flush_whisper_vad()` and `stop()` queue ordered closing carriers even without new
284
+ `flush_vad()` and `stop()` queue ordered closing carriers even without new
314
285
  PCM. Poll until the terminal carrier is consumed before releasing the stream.
315
286
  An attached VAD failure is a failure of that session only: capture and PCM
316
287
  delivery continue, and polling delivers its closing events without raising the
317
288
  processor failure. `stop()` succeeds for a VAD-only failure; its shutdown report
318
- retains the cause in `cleanup_errors` with `whisper_code`, and `primary` remains
319
- capture-only. The next discontinuity (or a successful `flush_whisper_vad()`)
289
+ retains the cause in `cleanup_errors` with `vad_code`, and `primary` remains
290
+ capture-only. The next discontinuity (or a successful `flush_vad()`)
320
291
  reinitializes the session so its next frame starts a new anchored epoch.
321
- Disabled attachment has `AudioChunk.whisper_vad_events=None` and flush is a no-op.
322
- Legacy `Vad` and its integration keep their existing behavior.
292
+ Disabled attachment has `AudioChunk.vad_events=None` and flush is a no-op.