a11-kit 0.2.2__tar.gz → 0.2.3__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.
- {a11_kit-0.2.2 → a11_kit-0.2.3}/PKG-INFO +1 -1
- a11_kit-0.2.3/VERSION +1 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/__init__.py +18 -10
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/_native.pyi +156 -2
- a11_kit-0.2.3/a11/sdk/audio/actions.py +84 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/audio/client.py +73 -0
- a11_kit-0.2.3/a11/sdk/audio/tests/test_actions.py +249 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/bash/tests/test_manager.py +3 -6
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/CMakeLists.txt +24 -2
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/actions/action.cc +172 -155
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/actions/registry.cc +6 -3
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/actions/schema.cc +14 -30
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/actions/schema.h +6 -5
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/concurrency/executor.h +4 -2
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/data/json.cc +128 -167
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/data/msgpack.cc +42 -57
- a11_kit-0.2.3/cpp/a11/data/serializable.h +234 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/data/serialization.cc +57 -75
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/data/serialization.h +10 -15
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/data/types.cc +253 -455
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/channel_wire_stream.cc +66 -60
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/http2.cc +209 -137
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/http_sse_wire_stream.cc +157 -159
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/in_process_wire_stream.cc +35 -36
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/internal/http2_websocket_channel.cc +101 -61
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/internal/multiplexed_binary_channel.cc +80 -42
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/internal/rtc_binary_channel.cc +2 -1
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/signalling.cc +38 -39
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/webrtc_wire_stream.cc +192 -192
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/websocket_signalling.cc +54 -27
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/websocket_wire_stream.cc +12 -6
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/wire_stream.cc +2 -3
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/wire_stream_with_recv.cc +16 -8
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/nodes/async_node.cc +32 -16
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/nodes/async_node.h +8 -4
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/nodes/node_map.cc +17 -21
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/obs/trace_context.cc +10 -17
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/service/session.cc +198 -196
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/status.cc +10 -5
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/stores/local_chunk_store.cc +10 -7
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/stores/redis_chunk_store.cc +305 -411
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/python/actions_bindings.cc +92 -72
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/python/audio_bindings.cc +387 -56
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/python/core_bindings.cc +137 -101
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/python/data_bindings.cc +204 -174
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/python/http_bindings.cc +224 -204
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/python/interop.cc +28 -14
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/python/interop.h +4 -2
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/python/net_bindings.cc +39 -28
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/python/nodes_bindings.cc +21 -16
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/python/obs_bindings.cc +4 -3
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/python/redis_bindings.cc +8 -5
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/python/service_bindings.cc +29 -18
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/python/stores_bindings.cc +31 -26
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/python/webrtc_bindings.cc +175 -157
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/redis/client.cc +211 -175
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/redis/reply.cc +11 -8
- a11_kit-0.2.3/cpp/sdk/audio/CMakeLists.txt +17 -0
- a11_kit-0.2.3/cpp/sdk/audio/actions/audio_actions.cc +733 -0
- a11_kit-0.2.3/cpp/sdk/audio/actions/audio_actions.h +91 -0
- a11_kit-0.2.3/cpp/sdk/audio/actions/audio_events.cc +114 -0
- a11_kit-0.2.3/cpp/sdk/audio/actions/audio_events.h +133 -0
- a11_kit-0.2.3/cpp/sdk/audio/actions/audio_serialization.cc +521 -0
- a11_kit-0.2.3/cpp/sdk/audio/actions/audio_serialization.h +181 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/sdk/audio/audio_input.cc +35 -26
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/sdk/audio/audio_input.h +14 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/sdk/audio/device.cc +10 -15
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/sdk/audio/speech_recognizer.cc +148 -61
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/sdk/audio/speech_recognizer.h +49 -1
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/CMakeLists.txt +9 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/action_test.cc +8 -4
- a11_kit-0.2.3/cpp/tests/audio_actions_test.cc +224 -0
- a11_kit-0.2.3/cpp/tests/audio_serialization_test.cc +254 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/byte_chunking_test.cc +4 -2
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/http2_test.cc +20 -10
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/in_process_wire_stream_test.cc +2 -1
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/obs_action_span_test.cc +10 -4
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/obs_session_stream_test.cc +29 -24
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/redis_chunk_store_test.cc +28 -14
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/redis_client_test.cc +10 -5
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/webrtc_wire_stream_test.cc +2 -1
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/websocket_wire_stream_test.cc +4 -2
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/thread/thread/fiber.cc +2 -1
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/thread/thread/thread_pool.cc +4 -2
- a11_kit-0.2.2/VERSION +0 -1
- a11_kit-0.2.2/cpp/sdk/audio/CMakeLists.txt +0 -8
- {a11_kit-0.2.2 → a11_kit-0.2.3}/.clang-format +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/.clang-tidy +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/AGENTS.md +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/CMakeLists.txt +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/README.md +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/.gitignore +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/_asyncio.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/_native_options.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/_native_protocol.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/actions/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/actions/_native_action.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/actions/action.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/actions/registry.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/actions/tests/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/actions/tests/test_action.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/cli/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/cli/__main__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/cli/app.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/cli/backends.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/cli/chat_ui.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/cli/commands/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/cli/commands/chat.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/cli/tests/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/cli/tests/test_chat_shell_tools.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/cli/tests/test_chat_voice.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/cli/voice.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/conftest.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/data/README.md +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/data/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/data/msgpack_utils.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/data/serialization.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/data/tests/test_serialization.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/data/types.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/demos/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/demos/echo_client_webrtc.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/demos/echo_server.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/demos/echo_server_webrtc.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/net/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/net/http2.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/net/http_sse_wire_stream.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/net/in_process_wire_stream.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/net/signalling.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/net/tests/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/net/tests/test_in_process_wire_stream.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/net/tests/test_native_network.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/net/tests/test_websocket_session_echo.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/net/tests/test_wire_stream_with_recv.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/net/webrtc_wire_stream.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/net/websocket_wire_stream.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/net/wire_stream.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/nodes/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/nodes/_native_async_node.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/nodes/async_node.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/nodes/tests/test_async_node.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/observability/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/observability/tests/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/observability/tests/test_observability.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/py.typed +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/redis/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/redis/client.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/redis/tests/test_client.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/anthropic/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/anthropic/client.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/anthropic/interact_with_claude.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/anthropic/interact_with_claude_schema.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/audio/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/audio/tests/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/audio/tests/test_audio.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/bash/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/bash/handlers.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/bash/manager.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/bash/prompt.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/bash/schemas.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/bash/shell.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/bash/tests/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/bash/tests/test_add_done_callback.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/bash/tests/test_prompt.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/bash/tests/test_shell_integration.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/bash/tests/test_shell_with_llm.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/gemini/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/gemini/client.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/gemini/interact_with_gemini.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/gemini/interact_with_gemini_schema.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/interact_with_llm.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/interact_with_llm_schema.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/llm.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/llm_tools/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/llm_tools/adapter.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/llm_tools/jsonschema_utils.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/llm_tools/runner.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/llm_tools/tests/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/llm_tools/tests/test_autofill_and_allowlist.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/ollama/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/ollama/client.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/ollama/interact_with_ollama.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/ollama/interact_with_ollama_schema.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/ollama/tests/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/ollama/tests/test_interact_with_ollama.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/tests/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/sdk/tests/test_interact_with_llm.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/service/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/service/_native_session.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/service/session.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/service/tests/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/service/tests/test_session.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/status.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/stores/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/stores/chunk_store.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/stores/chunk_store_reader.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/stores/chunk_store_writer.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/stores/local_chunk_store.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/stores/redis_chunk_store.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/stores/tests/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/stores/tests/test_chunk_store.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/stores/tests/test_chunk_store_reader.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/stores/tests/test_chunk_store_writer.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/stores/tests/test_redis_chunk_store.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/tests/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/tests/test_native_bindings.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/tests/test_typing_package.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/a11/timing.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/CMakeLists.txt +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/actions/CMakeLists.txt +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/actions/action.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/actions/registry.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/concurrency/CMakeLists.txt +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/concurrency/callback_scheduler.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/concurrency/callback_scheduler.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/concurrency/executor.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/concurrency/future.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/data/CMakeLists.txt +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/data/json.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/data/msgpack.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/data/types.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/CMakeLists.txt +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/byte_chunking.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/byte_chunking.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/channel_wire_stream.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/http2.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/http_sse_wire_stream.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/in_process_wire_stream.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/internal/binary_channel.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/internal/http2_websocket_channel.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/internal/multiplexed_binary_channel.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/signalling.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/webrtc_wire_stream.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/websocket_signalling.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/websocket_wire_stream.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/wire_stream.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/net/wire_stream_with_recv.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/nodes/CMakeLists.txt +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/nodes/node_map.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/obs/CMakeLists.txt +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/obs/internal/otel_internal.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/obs/internal/otlp_http_exporter.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/obs/internal/otlp_http_exporter.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/obs/provider.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/obs/provider.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/obs/span.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/obs/trace_context.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/obs/tracer.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/obs/tracer.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/service/CMakeLists.txt +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/service/session.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/status.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/stores/CMakeLists.txt +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/stores/chunk_store.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/stores/chunk_store_reader.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/stores/chunk_store_reader.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/stores/chunk_store_writer.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/stores/chunk_store_writer.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/stores/local_chunk_store.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/stores/redis_chunk_store.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/stores/redis_chunk_store_script.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/time.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/a11/time.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/cmake/a11Config.cmake.in +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/python/CMakeLists.txt +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/python/bindings.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/python/casters.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/python/module.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/python/native_types.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/redis/CMakeLists.txt +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/redis/client.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/redis/reply.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/sdk/audio/audio_buffer.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/sdk/audio/audio_buffer.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/sdk/audio/device.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/sdk/audio/internal/audio_processing.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/sdk/audio/internal/audio_processing.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/sdk/audio/internal/portaudio_session.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/sdk/audio/internal/portaudio_session.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/sdk/audio/internal/sample_ring.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/async_node_test.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/audio_buffer_test.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/audio_input_test.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/audio_processing_test.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/chunk_store_reader_test.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/chunk_store_writer_test.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/data_json_test.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/data_types_test.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/future_test.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/http_sse_wire_stream_test.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/install_smoke/CMakeLists.txt +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/install_smoke/smoke.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/local_chunk_store_test.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/obs_trace_context_test.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/obs_tracer_test.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/sample_ring_test.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/session_test.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/signalling_test.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/speech_recognizer_test.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/testdata/localhost-cert.pem +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/testdata/localhost-key.pem +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/websocket_signalling_test.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/tests/wire_stream_with_recv_test.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/thread/CMakeLists.txt +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/thread/tests/thread_test.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/thread/thread/boost_primitives.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/thread/thread/boost_primitives.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/thread/thread/cases.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/thread/thread/channel/waiter_state.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/thread/thread/channel/waiter_state.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/thread/thread/channel.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/thread/thread/concurrency.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/thread/thread/executor.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/thread/thread/fiber.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/thread/thread/select.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/thread/thread/select.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/thread/thread/selectables.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/thread/thread/selectables.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/thread/thread/thread_pool.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/thread/thread/util.cc +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/cpp/thread/thread/util.h +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/pybind11_abseil/__init__.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/pyproject.toml +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/scripts/audit_wheel.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/scripts/bootstrap_wheel_deps.sh +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/scripts/build_wheels.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/scripts/check_release_version.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/scripts/freeze_hunt.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/scripts/generate_stubs.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/scripts/patches/boost-fiber-macos-futex.md +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/scripts/patches/boost-fiber-macos-futex.patch +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/scripts/serialization.py +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/scripts/smoke_cmake_install.sh +0 -0
- {a11_kit-0.2.2 → a11_kit-0.2.3}/uv.lock +0 -0
a11_kit-0.2.3/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.2.3
|
|
@@ -118,6 +118,12 @@ from .timing import (
|
|
|
118
118
|
|
|
119
119
|
|
|
120
120
|
def get_deadline(action: Action) -> Time:
|
|
121
|
+
"""Read the ``x-a11-deadline`` header as an absolute :class:`Time`.
|
|
122
|
+
|
|
123
|
+
The value is a base-10 count of **milliseconds** since the Unix epoch, or a
|
|
124
|
+
base-10 count of **nanoseconds** when suffixed with ``ns``. An absent header
|
|
125
|
+
means no deadline (:func:`infinite_future`).
|
|
126
|
+
"""
|
|
121
127
|
deadline_str = action.get_header("x-a11-deadline", decode=True)
|
|
122
128
|
if deadline_str is None:
|
|
123
129
|
return infinite_future()
|
|
@@ -130,29 +136,31 @@ def get_deadline(action: Action) -> Time:
|
|
|
130
136
|
try:
|
|
131
137
|
deadline = int(deadline_str)
|
|
132
138
|
except ValueError:
|
|
133
|
-
|
|
134
|
-
code=StatusCode.INVALID_ARGUMENT,
|
|
135
|
-
message=(
|
|
136
|
-
"Deadline header must be an integer optionally followed by 'ns'"
|
|
137
|
-
),
|
|
138
|
-
).to_exception()
|
|
139
|
-
|
|
139
|
+
deadline = -1
|
|
140
140
|
if deadline < 0:
|
|
141
141
|
raise Status(
|
|
142
142
|
code=StatusCode.INVALID_ARGUMENT,
|
|
143
143
|
message=(
|
|
144
|
-
"
|
|
145
|
-
"
|
|
144
|
+
"The x-a11-deadline header must be a non-negative base-10"
|
|
145
|
+
" integer of milliseconds since the epoch, or nanoseconds with"
|
|
146
|
+
" an 'ns' suffix."
|
|
146
147
|
),
|
|
147
148
|
).to_exception()
|
|
148
149
|
|
|
149
|
-
|
|
150
|
+
# Bare values are milliseconds; only the 'ns' form is already nanoseconds.
|
|
151
|
+
if not nanos:
|
|
150
152
|
deadline *= 1000000
|
|
151
153
|
|
|
152
154
|
return Time.from_nanoseconds_since_epoch(deadline)
|
|
153
155
|
|
|
154
156
|
|
|
155
157
|
def set_deadline_header(action: Action, deadline: Time = infinite_future()):
|
|
158
|
+
"""Write ``deadline`` to the ``x-a11-deadline`` header as milliseconds.
|
|
159
|
+
|
|
160
|
+
An infinite deadline clears the header. The value is emitted as a bare
|
|
161
|
+
base-10 millisecond count, the representation :func:`get_deadline` reads by
|
|
162
|
+
default.
|
|
163
|
+
"""
|
|
156
164
|
if deadline == infinite_future():
|
|
157
165
|
try:
|
|
158
166
|
action.remove_header("x-a11-deadline")
|
|
@@ -40,6 +40,8 @@ __all__: list[str] = [
|
|
|
40
40
|
"ActionSettings",
|
|
41
41
|
"AsyncNode",
|
|
42
42
|
"AudioBuffer",
|
|
43
|
+
"AudioCaptureEvent",
|
|
44
|
+
"AudioControlEvent",
|
|
43
45
|
"AudioDeviceInfo",
|
|
44
46
|
"AudioInput",
|
|
45
47
|
"AudioInputOptions",
|
|
@@ -121,6 +123,7 @@ __all__: list[str] = [
|
|
|
121
123
|
"TCP",
|
|
122
124
|
"TLS",
|
|
123
125
|
"Time",
|
|
126
|
+
"TranscriptionEvent",
|
|
124
127
|
"TurnRelayType",
|
|
125
128
|
"TurnServer",
|
|
126
129
|
"UDP",
|
|
@@ -143,6 +146,8 @@ __all__: list[str] = [
|
|
|
143
146
|
"WireStream",
|
|
144
147
|
"WireStreamOptions",
|
|
145
148
|
"WireStreamWithRecv",
|
|
149
|
+
"audio_buffer_from_msgpack",
|
|
150
|
+
"audio_buffer_to_msgpack",
|
|
146
151
|
"audio_device_info",
|
|
147
152
|
"create_in_process_wire_stream_pair",
|
|
148
153
|
"default_audio_input_device",
|
|
@@ -159,6 +164,7 @@ __all__: list[str] = [
|
|
|
159
164
|
"obs_recorded_spans",
|
|
160
165
|
"obs_shutdown",
|
|
161
166
|
"obs_start_span",
|
|
167
|
+
"register_audio_actions",
|
|
162
168
|
"reset_default_redis_client",
|
|
163
169
|
"set_default_redis_client",
|
|
164
170
|
"status_code_from_http",
|
|
@@ -1586,6 +1592,16 @@ class AudioBuffer:
|
|
|
1586
1592
|
Return a buffer object that exposes the underlying memory of the object.
|
|
1587
1593
|
"""
|
|
1588
1594
|
|
|
1595
|
+
def __init__(
|
|
1596
|
+
self,
|
|
1597
|
+
data: collections.abc.Buffer,
|
|
1598
|
+
sample_rate: typing.SupportsFloat,
|
|
1599
|
+
num_channels: typing.SupportsInt = 1,
|
|
1600
|
+
) -> None:
|
|
1601
|
+
"""
|
|
1602
|
+
Build an AudioBuffer from a buffer-protocol object (bytes, a NumPy array, a CPU PyTorch tensor, ...). Samples are read as channel-major float32 (raw bytes are reinterpreted as float32); a 2-D buffer's first dimension is the channel count.
|
|
1603
|
+
"""
|
|
1604
|
+
|
|
1589
1605
|
def __release_buffer__(self, buffer):
|
|
1590
1606
|
"""
|
|
1591
1607
|
Release the buffer object that exposes the underlying memory of the object.
|
|
@@ -1626,6 +1642,72 @@ class AudioBuffer:
|
|
|
1626
1642
|
A zero-copy read-only ``(channels, frames)`` float view.
|
|
1627
1643
|
"""
|
|
1628
1644
|
|
|
1645
|
+
class AudioCaptureEvent:
|
|
1646
|
+
"""
|
|
1647
|
+
A capture lifecycle or dropped-buffer notification from capture_audio.
|
|
1648
|
+
"""
|
|
1649
|
+
|
|
1650
|
+
__hash__: None = None # pyright: ignore[reportIncompatibleMethodOverride]
|
|
1651
|
+
@staticmethod
|
|
1652
|
+
def buffers_dropped(count: typing.SupportsInt) -> AudioCaptureEvent: ...
|
|
1653
|
+
@staticmethod
|
|
1654
|
+
def started() -> AudioCaptureEvent: ...
|
|
1655
|
+
@staticmethod
|
|
1656
|
+
def stopped() -> AudioCaptureEvent: ...
|
|
1657
|
+
def __eq__(self, arg0: object) -> bool: ...
|
|
1658
|
+
def __init__(
|
|
1659
|
+
self, kind: str = "started", dropped: typing.SupportsInt = 0
|
|
1660
|
+
) -> None:
|
|
1661
|
+
"""
|
|
1662
|
+
Construct a capture event.
|
|
1663
|
+
"""
|
|
1664
|
+
|
|
1665
|
+
def __repr__(self) -> str: ...
|
|
1666
|
+
|
|
1667
|
+
@property
|
|
1668
|
+
def dropped(self) -> int:
|
|
1669
|
+
"""
|
|
1670
|
+
Buffers dropped since the previous event.
|
|
1671
|
+
"""
|
|
1672
|
+
@dropped.setter
|
|
1673
|
+
def dropped(self, arg0: typing.SupportsInt) -> None: ...
|
|
1674
|
+
|
|
1675
|
+
@property
|
|
1676
|
+
def kind(self) -> str:
|
|
1677
|
+
"""
|
|
1678
|
+
The event kind: 'started', 'buffers_dropped' or 'stopped'.
|
|
1679
|
+
"""
|
|
1680
|
+
@kind.setter
|
|
1681
|
+
def kind(self, arg1: str) -> None: ...
|
|
1682
|
+
|
|
1683
|
+
class AudioControlEvent:
|
|
1684
|
+
"""
|
|
1685
|
+
A command on an Action's control_events input; 'stop' finishes capture gracefully.
|
|
1686
|
+
"""
|
|
1687
|
+
|
|
1688
|
+
__hash__: None = None # pyright: ignore[reportIncompatibleMethodOverride]
|
|
1689
|
+
@staticmethod
|
|
1690
|
+
def stop() -> AudioControlEvent:
|
|
1691
|
+
"""
|
|
1692
|
+
A stop command that finishes capture gracefully.
|
|
1693
|
+
"""
|
|
1694
|
+
|
|
1695
|
+
def __eq__(self, arg0: object) -> bool: ...
|
|
1696
|
+
def __init__(self, command: str = "stop") -> None:
|
|
1697
|
+
"""
|
|
1698
|
+
Construct a control event.
|
|
1699
|
+
"""
|
|
1700
|
+
|
|
1701
|
+
def __repr__(self) -> str: ...
|
|
1702
|
+
|
|
1703
|
+
@property
|
|
1704
|
+
def command(self) -> str:
|
|
1705
|
+
"""
|
|
1706
|
+
The command name, e.g. 'stop'.
|
|
1707
|
+
"""
|
|
1708
|
+
@command.setter
|
|
1709
|
+
def command(self, arg1: str) -> None: ...
|
|
1710
|
+
|
|
1629
1711
|
class AudioDeviceInfo:
|
|
1630
1712
|
"""
|
|
1631
1713
|
Static metadata describing one host audio device.
|
|
@@ -1787,10 +1869,12 @@ class AudioInputOptions:
|
|
|
1787
1869
|
def __init__(
|
|
1788
1870
|
self,
|
|
1789
1871
|
device_index: typing.SupportsInt = -1,
|
|
1872
|
+
device_name: str = "",
|
|
1790
1873
|
sample_rate: typing.SupportsFloat = 0.0,
|
|
1791
1874
|
channels: typing.SupportsInt = 0,
|
|
1792
1875
|
block_frames: typing.SupportsInt = 256,
|
|
1793
1876
|
ring_blocks: typing.SupportsInt = 32,
|
|
1877
|
+
buffer_frames: typing.SupportsInt = 0,
|
|
1794
1878
|
) -> None:
|
|
1795
1879
|
"""
|
|
1796
1880
|
Construct validated audio input options.
|
|
@@ -1813,6 +1897,14 @@ class AudioInputOptions:
|
|
|
1813
1897
|
@block_frames.setter
|
|
1814
1898
|
def block_frames(self, arg0: typing.SupportsInt) -> None: ...
|
|
1815
1899
|
|
|
1900
|
+
@property
|
|
1901
|
+
def buffer_frames(self) -> int:
|
|
1902
|
+
"""
|
|
1903
|
+
Frames per delivered subscription buffer, or 0 for the block size.
|
|
1904
|
+
"""
|
|
1905
|
+
@buffer_frames.setter
|
|
1906
|
+
def buffer_frames(self, arg0: typing.SupportsInt) -> None: ...
|
|
1907
|
+
|
|
1816
1908
|
@property
|
|
1817
1909
|
def channels(self) -> int:
|
|
1818
1910
|
"""
|
|
@@ -1829,6 +1921,14 @@ class AudioInputOptions:
|
|
|
1829
1921
|
@device_index.setter
|
|
1830
1922
|
def device_index(self, arg0: typing.SupportsInt) -> None: ...
|
|
1831
1923
|
|
|
1924
|
+
@property
|
|
1925
|
+
def device_name(self) -> str:
|
|
1926
|
+
"""
|
|
1927
|
+
Input device name to capture from; empty selects by index or the default input.
|
|
1928
|
+
"""
|
|
1929
|
+
@device_name.setter
|
|
1930
|
+
def device_name(self, arg0: str) -> None: ...
|
|
1931
|
+
|
|
1832
1932
|
@property
|
|
1833
1933
|
def ring_blocks(self) -> int:
|
|
1834
1934
|
"""
|
|
@@ -5153,7 +5253,7 @@ class SignallingTransport:
|
|
|
5153
5253
|
|
|
5154
5254
|
class SpeechRecognizer:
|
|
5155
5255
|
"""
|
|
5156
|
-
Restartable local automatic speech recognizer backed by whisper.cpp.
|
|
5256
|
+
Restartable local automatic speech recognizer backed by whisper.cpp. A cheap energy gate endpoints utterances so silence never reaches the decoder; a Silero VAD model, when configured, then filters each utterance to genuine speech before inference.
|
|
5157
5257
|
"""
|
|
5158
5258
|
|
|
5159
5259
|
@staticmethod
|
|
@@ -5231,7 +5331,7 @@ class SpeechRecognizer:
|
|
|
5231
5331
|
|
|
5232
5332
|
class SpeechRecognizerOptions:
|
|
5233
5333
|
"""
|
|
5234
|
-
Configuration for whisper.cpp transcription and
|
|
5334
|
+
Configuration for whisper.cpp transcription, a cheap energy VAD gate, and optional whisper.cpp Silero neural VAD.
|
|
5235
5335
|
"""
|
|
5236
5336
|
|
|
5237
5337
|
_a11_options_installed: typing.ClassVar[bool] = True
|
|
@@ -5250,6 +5350,7 @@ class SpeechRecognizerOptions:
|
|
|
5250
5350
|
def __eq__(self, other: object) -> bool: ...
|
|
5251
5351
|
def __init__(
|
|
5252
5352
|
self,
|
|
5353
|
+
model_path: str = "",
|
|
5253
5354
|
language: str = "auto",
|
|
5254
5355
|
translate: bool = False,
|
|
5255
5356
|
inference_threads: typing.SupportsInt = 0,
|
|
@@ -5337,6 +5438,14 @@ class SpeechRecognizerOptions:
|
|
|
5337
5438
|
@min_speech_millis.setter
|
|
5338
5439
|
def min_speech_millis(self, arg0: typing.SupportsInt) -> None: ...
|
|
5339
5440
|
|
|
5441
|
+
@property
|
|
5442
|
+
def model_path(self) -> str:
|
|
5443
|
+
"""
|
|
5444
|
+
Path to the whisper.cpp model; used by the transcription action (empty is rejected there).
|
|
5445
|
+
"""
|
|
5446
|
+
@model_path.setter
|
|
5447
|
+
def model_path(self, arg0: str) -> None: ...
|
|
5448
|
+
|
|
5340
5449
|
@property
|
|
5341
5450
|
def silero_threshold(self) -> float:
|
|
5342
5451
|
"""
|
|
@@ -5669,6 +5778,36 @@ class Time:
|
|
|
5669
5778
|
The time as nanoseconds since the Unix epoch.
|
|
5670
5779
|
"""
|
|
5671
5780
|
|
|
5781
|
+
class TranscriptionEvent:
|
|
5782
|
+
"""
|
|
5783
|
+
A capture/inference lifecycle notification from capture_transcription.
|
|
5784
|
+
"""
|
|
5785
|
+
|
|
5786
|
+
__hash__: None = None # pyright: ignore[reportIncompatibleMethodOverride]
|
|
5787
|
+
@staticmethod
|
|
5788
|
+
def capture_started() -> TranscriptionEvent: ...
|
|
5789
|
+
@staticmethod
|
|
5790
|
+
def capture_stopped() -> TranscriptionEvent: ...
|
|
5791
|
+
@staticmethod
|
|
5792
|
+
def inference_started() -> TranscriptionEvent: ...
|
|
5793
|
+
@staticmethod
|
|
5794
|
+
def inference_stopped() -> TranscriptionEvent: ...
|
|
5795
|
+
def __eq__(self, arg0: object) -> bool: ...
|
|
5796
|
+
def __init__(self, kind: str = "capture_started") -> None:
|
|
5797
|
+
"""
|
|
5798
|
+
Construct a transcription event.
|
|
5799
|
+
"""
|
|
5800
|
+
|
|
5801
|
+
def __repr__(self) -> str: ...
|
|
5802
|
+
|
|
5803
|
+
@property
|
|
5804
|
+
def kind(self) -> str:
|
|
5805
|
+
"""
|
|
5806
|
+
The event kind, e.g. 'inference_started'.
|
|
5807
|
+
"""
|
|
5808
|
+
@kind.setter
|
|
5809
|
+
def kind(self, arg1: str) -> None: ...
|
|
5810
|
+
|
|
5672
5811
|
class TurnRelayType:
|
|
5673
5812
|
"""
|
|
5674
5813
|
Members:
|
|
@@ -7308,6 +7447,16 @@ class _StringSchemaMapView:
|
|
|
7308
7447
|
Return a view of the map's values.
|
|
7309
7448
|
"""
|
|
7310
7449
|
|
|
7450
|
+
def audio_buffer_from_msgpack(data: bytes) -> AudioBuffer:
|
|
7451
|
+
"""
|
|
7452
|
+
Decode an AudioBuffer from A11's MessagePack representation.
|
|
7453
|
+
"""
|
|
7454
|
+
|
|
7455
|
+
def audio_buffer_to_msgpack(buffer: AudioBuffer) -> bytes:
|
|
7456
|
+
"""
|
|
7457
|
+
Encode an AudioBuffer to A11's MessagePack representation.
|
|
7458
|
+
"""
|
|
7459
|
+
|
|
7311
7460
|
def audio_device_info(index: typing.SupportsInt) -> AudioDeviceInfo:
|
|
7312
7461
|
"""
|
|
7313
7462
|
Return metadata for the audio device at `index`.
|
|
@@ -7403,6 +7552,11 @@ def obs_start_span(
|
|
|
7403
7552
|
Starts a new span with the given name and kind, optionally parented by a W3C traceparent.
|
|
7404
7553
|
"""
|
|
7405
7554
|
|
|
7555
|
+
def register_audio_actions(registry: ActionRegistry | None) -> None:
|
|
7556
|
+
"""
|
|
7557
|
+
Register the list_audio_inputs, capture_audio and capture_transcription Actions on `registry`, wiring each port's typeinfo to the matching audio type and ensuring their serializers are installed.
|
|
7558
|
+
"""
|
|
7559
|
+
|
|
7406
7560
|
def reset_default_redis_client() -> None:
|
|
7407
7561
|
"""
|
|
7408
7562
|
Clear the global Redis client so its environment is reread.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"""Action-based interface to the audio SDK.
|
|
2
|
+
|
|
3
|
+
Three native (C++) Actions wrap the capture and recognition primitives and can
|
|
4
|
+
be registered on any :class:`a11.ActionRegistry`:
|
|
5
|
+
|
|
6
|
+
* ``list_audio_inputs`` streams one :class:`~a11.sdk.audio.AudioDeviceInfo` per
|
|
7
|
+
available input device;
|
|
8
|
+
* ``capture_audio`` streams :class:`~a11.sdk.audio.AudioBuffer` blocks with a
|
|
9
|
+
control input that accepts a stop command;
|
|
10
|
+
* ``capture_transcription`` streams recognized text pieces, reusing the capture
|
|
11
|
+
path and driving whisper.cpp recognition;
|
|
12
|
+
* ``transcribe_audio`` streams recognized text pieces from a caller-supplied
|
|
13
|
+
:class:`~a11.sdk.audio.AudioBuffer` stream instead of a device, stopping on
|
|
14
|
+
input closure or cancellation.
|
|
15
|
+
|
|
16
|
+
Call :func:`register` to install all three on a registry; their handlers and
|
|
17
|
+
value-type serialization live in C++, and each port's ``typeinfo`` is wired to
|
|
18
|
+
the matching native audio class so schema-driven tooling sees the right types.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
from __future__ import annotations
|
|
22
|
+
|
|
23
|
+
from typing import TYPE_CHECKING
|
|
24
|
+
|
|
25
|
+
from a11 import _native
|
|
26
|
+
from a11._native_options import install_native_options
|
|
27
|
+
from a11.sdk.audio.client import register_json_codec
|
|
28
|
+
|
|
29
|
+
from a11._native import AudioCaptureEvent
|
|
30
|
+
from a11._native import AudioControlEvent
|
|
31
|
+
from a11._native import TranscriptionEvent
|
|
32
|
+
|
|
33
|
+
if TYPE_CHECKING:
|
|
34
|
+
from a11.actions import ActionRegistry
|
|
35
|
+
|
|
36
|
+
#: Registered name of the list-inputs Action.
|
|
37
|
+
LIST_AUDIO_INPUTS = "list_audio_inputs"
|
|
38
|
+
#: Registered name of the capture Action.
|
|
39
|
+
CAPTURE_AUDIO = "capture_audio"
|
|
40
|
+
#: Registered name of the transcription Action.
|
|
41
|
+
CAPTURE_TRANSCRIPTION = "capture_transcription"
|
|
42
|
+
#: Registered name of the buffer-stream transcription Action.
|
|
43
|
+
TRANSCRIBE_AUDIO = "transcribe_audio"
|
|
44
|
+
|
|
45
|
+
install_native_options(AudioControlEvent, {"command": (str, "stop")})
|
|
46
|
+
install_native_options(
|
|
47
|
+
AudioCaptureEvent, {"kind": (str, "started"), "dropped": (int, 0)}
|
|
48
|
+
)
|
|
49
|
+
install_native_options(TranscriptionEvent, {"kind": (str, "capture_started")})
|
|
50
|
+
|
|
51
|
+
# JSON codecs so the event types round-trip through the Python serialization
|
|
52
|
+
# registry the AsyncNode uses, matching the native C++ tags.
|
|
53
|
+
register_json_codec(AudioControlEvent, "a11.sdk.audio.AudioControlEvent")
|
|
54
|
+
register_json_codec(AudioCaptureEvent, "a11.sdk.audio.AudioCaptureEvent")
|
|
55
|
+
register_json_codec(TranscriptionEvent, "a11.sdk.audio.TranscriptionEvent")
|
|
56
|
+
|
|
57
|
+
_native_register_audio_actions = _native.register_audio_actions
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def register(registry: ActionRegistry) -> None:
|
|
61
|
+
"""Register the three audio Actions on ``registry``.
|
|
62
|
+
|
|
63
|
+
Installs ``list_audio_inputs``, ``capture_audio`` and
|
|
64
|
+
``capture_transcription`` (schema + native handler) and ensures the audio
|
|
65
|
+
value-type serializers are available. Raises if a name is already
|
|
66
|
+
registered.
|
|
67
|
+
"""
|
|
68
|
+
_native_register_audio_actions(registry)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
for _class in (AudioControlEvent, AudioCaptureEvent, TranscriptionEvent):
|
|
72
|
+
_class.__module__ = __name__
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
__all__ = [
|
|
76
|
+
"CAPTURE_AUDIO",
|
|
77
|
+
"CAPTURE_TRANSCRIPTION",
|
|
78
|
+
"LIST_AUDIO_INPUTS",
|
|
79
|
+
"TRANSCRIBE_AUDIO",
|
|
80
|
+
"AudioCaptureEvent",
|
|
81
|
+
"AudioControlEvent",
|
|
82
|
+
"TranscriptionEvent",
|
|
83
|
+
"register",
|
|
84
|
+
]
|
|
@@ -10,6 +10,7 @@ and ``buffer.channel(i)`` is one channel's row.
|
|
|
10
10
|
|
|
11
11
|
from __future__ import annotations
|
|
12
12
|
|
|
13
|
+
import json
|
|
13
14
|
import os
|
|
14
15
|
from collections.abc import Awaitable, Callable, Mapping
|
|
15
16
|
from typing import Any, Self
|
|
@@ -17,6 +18,10 @@ from typing import Any, Self
|
|
|
17
18
|
from a11 import _native
|
|
18
19
|
from a11._native_options import install_native_options
|
|
19
20
|
from a11._native_protocol import attach_protocol
|
|
21
|
+
from a11.data.serialization import (
|
|
22
|
+
get_global_serialization_registry,
|
|
23
|
+
set_global_type_tag,
|
|
24
|
+
)
|
|
20
25
|
from a11.status import Status, StatusCode, StatusException
|
|
21
26
|
|
|
22
27
|
from a11._native import AudioBuffer
|
|
@@ -34,16 +39,19 @@ install_native_options(
|
|
|
34
39
|
AudioInputOptions,
|
|
35
40
|
{
|
|
36
41
|
"device_index": (int, -1),
|
|
42
|
+
"device_name": (str, ""),
|
|
37
43
|
"sample_rate": (float, 0.0),
|
|
38
44
|
"channels": (int, 0),
|
|
39
45
|
"block_frames": (int, 256),
|
|
40
46
|
"ring_blocks": (int, 32),
|
|
47
|
+
"buffer_frames": (int, 0),
|
|
41
48
|
},
|
|
42
49
|
)
|
|
43
50
|
|
|
44
51
|
install_native_options(
|
|
45
52
|
SpeechRecognizerOptions,
|
|
46
53
|
{
|
|
54
|
+
"model_path": (str, ""),
|
|
47
55
|
"language": (str, "auto"),
|
|
48
56
|
"translate": (bool, False),
|
|
49
57
|
"inference_threads": (int, 0),
|
|
@@ -64,6 +72,71 @@ install_native_options(
|
|
|
64
72
|
},
|
|
65
73
|
)
|
|
66
74
|
|
|
75
|
+
def register_json_codec(cls: type, tag: str) -> None:
|
|
76
|
+
"""Register a JSON codec for ``cls`` on the global Python registry.
|
|
77
|
+
|
|
78
|
+
Mirrors the native C++ codec so an audio value serialized by one language
|
|
79
|
+
(with the tag ``application/json;type=<tag>``) round-trips through the
|
|
80
|
+
other. ``cls`` must expose ``model_dump``/``model_validate`` (installed by
|
|
81
|
+
:func:`install_native_options`). Idempotent across repeated imports.
|
|
82
|
+
"""
|
|
83
|
+
registry = get_global_serialization_registry()
|
|
84
|
+
set_global_type_tag(cls, tag)
|
|
85
|
+
|
|
86
|
+
def _serialize(obj: Any, _cls: type = cls) -> str:
|
|
87
|
+
return json.dumps(obj.model_dump())
|
|
88
|
+
|
|
89
|
+
def _deserialize(chunk: Any, _cls: type = cls) -> Any:
|
|
90
|
+
data = chunk.data
|
|
91
|
+
if isinstance(data, (bytes, bytearray)):
|
|
92
|
+
data = bytes(data).decode("utf-8")
|
|
93
|
+
return _cls.model_validate(json.loads(data))
|
|
94
|
+
|
|
95
|
+
try:
|
|
96
|
+
registry.register(
|
|
97
|
+
cls, "application/json", _serialize, _deserialize,
|
|
98
|
+
receives_chunk=True,
|
|
99
|
+
)
|
|
100
|
+
except StatusException:
|
|
101
|
+
pass # already registered in this process
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
register_json_codec(AudioInputOptions, "a11.sdk.audio.AudioInputOptions")
|
|
105
|
+
register_json_codec(
|
|
106
|
+
SpeechRecognizerOptions, "a11.sdk.audio.SpeechRecognizerOptions"
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def _register_audio_buffer_codec() -> None:
|
|
111
|
+
"""Register the MessagePack codec for AudioBuffer on the global registry.
|
|
112
|
+
|
|
113
|
+
Both directions delegate to the native encoder/decoder so the bytes are
|
|
114
|
+
byte-for-byte identical to what C++ produces and consumes (samples as a
|
|
115
|
+
little-endian float32 blob).
|
|
116
|
+
"""
|
|
117
|
+
registry = get_global_serialization_registry()
|
|
118
|
+
set_global_type_tag(AudioBuffer, "a11.sdk.audio.AudioBuffer")
|
|
119
|
+
|
|
120
|
+
def _serialize(buffer: AudioBuffer) -> bytes:
|
|
121
|
+
return _native.audio_buffer_to_msgpack(buffer)
|
|
122
|
+
|
|
123
|
+
def _deserialize(chunk: Any) -> AudioBuffer:
|
|
124
|
+
data = chunk.data
|
|
125
|
+
if isinstance(data, (bytes, bytearray)):
|
|
126
|
+
data = bytes(data)
|
|
127
|
+
return _native.audio_buffer_from_msgpack(data)
|
|
128
|
+
|
|
129
|
+
try:
|
|
130
|
+
registry.register(
|
|
131
|
+
AudioBuffer, "application/x-msgpack", _serialize, _deserialize,
|
|
132
|
+
receives_chunk=True,
|
|
133
|
+
)
|
|
134
|
+
except StatusException:
|
|
135
|
+
pass # already registered in this process
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
_register_audio_buffer_codec()
|
|
139
|
+
|
|
67
140
|
_native_list_devices = _native.list_audio_devices
|
|
68
141
|
_native_default_input_device = _native.default_audio_input_device
|
|
69
142
|
_native_device_info = _native.audio_device_info
|