MCPcopy Create free account

hub / github.com/algal/sparky / functions

Functions744 in github.com/algal/sparky

↓ 49 callersMethoderror
Create an error chunk.
sparky_mvp/core/streaming.py:166
↓ 34 callersFunction_chat_event
Build a JSON chat event frame. Includes runId in the payload to match the real Gateway protocol. Default run_id matches the default in _ack_r
tests/test_openclaw_gateway_client.py:28
↓ 29 callersFunction_agent_event
Build a JSON agent event frame. Includes runId in the payload to match the real Gateway protocol.
tests/test_openclaw_gateway_client.py:48
↓ 24 callersFunction_ack_response
Build a chat.send ACK response.
tests/test_openclaw_gateway_client.py:60
↓ 20 callersMethodclear
Clear buffered speaker reference and reset the APM state.
sparky_mvp/core/webrtc_apm.py:251
↓ 19 callersFunction_collect_events
Collect all events from chat_send into a list.
tests/test_openclaw_gateway_client.py:111
↓ 17 callersMethodrun
Main event loop. Runs the state machine indefinitely until shutdown.
sparky_mvp/core/state_machine.py:1332
↓ 17 callersMethodstart
Start the worker thread that drives the 100 Hz control loop.
sparky_mvp/robot/moves.py:757
↓ 13 callersMethod_handle_invoke
Dispatch a node.invoke.request to the appropriate handler.
sparky_mvp/core/openclaw_node_client.py:307
↓ 13 callersMethodprocess_mic_chunk
(self, mic_pcm: bytes)
sparky_mvp/core/aec_stream.py:20
↓ 13 callersMethodrecv
(self)
tests/test_gentle_actions.py:136
↓ 13 callersMethodstop
Gracefully stop the event loop and close the WS.
sparky_mvp/core/openclaw_node_client.py:287
↓ 13 callersMethodwrite
(self, text)
main.py:47
↓ 11 callersMethod_is_sleep_phrase
Check if transcribed text contains a sleep phrase.
sparky_mvp/core/state_machine.py:1505
↓ 11 callersFunction_make_config
Build a minimal config dict for testing wake/sleep.
tests/test_wake_sleep.py:24
↓ 11 callersFunction_try_make_apm
Create an APM echo canceller, skipping if the shim isn't available.
tests/test_webrtc_apm.py:19
↓ 11 callersMethodconnect
Connect to the Gateway and complete the protocol v3 handshake as a node.
sparky_mvp/core/openclaw_node_client.py:163
↓ 11 callersMethodfeed_speaker_pcm
(self, pcm_int16: bytes)
sparky_mvp/core/webrtc_apm.py:169
↓ 10 callersMethodcapture_speech
Capture speech segment with pause detection. Returns: WAV bytes of captured speech, or None if no speech detected
sparky_mvp/core/vad_capture.py:193
↓ 10 callersMethodclear_move_queue
Stop the active move and discard any queued primary moves. Thread-safe: executed by the worker thread via the command queue.
sparky_mvp/robot/moves.py:337
↓ 10 callersMethodread
(self, n_frames: int, exception_on_overflow: bool = False)
sparky_mvp/core/aec_stream.py:30
↓ 9 callersMethodget_face_tracking_offsets
Get current face tracking offsets (thread-safe).
sparky_mvp/robot/camera_worker.py:70
↓ 9 callersMethodprocess_mic_chunk
Process an arbitrary-length mic chunk through AEC. Returns cleaned PCM bytes (same length as input).
sparky_mvp/core/echo_canceller.py:131
↓ 9 callersMethodsend
(self, data)
tests/test_gentle_actions.py:134
↓ 9 callersMethodtranscribe
Transcribe WAV audio (16 kHz mono int16) and detect speech vs noise.
sparky_mvp/core/stt_engine.py:182
↓ 8 callersMethod_extract_text
Extract text from a chat event payload.
sparky_mvp/core/openclaw_gateway_client.py:725
↓ 8 callersMethod_make_sm
(self, sleep_phrases=None)
tests/test_wake_sleep.py:104
↓ 8 callersMethod_pick_prompt
Pick a random spontaneous speech prompt.
sparky_mvp/core/spontaneous_speech.py:108
↓ 8 callersMethodconnect
Connect to the Gateway and complete the protocol v3 handshake.
sparky_mvp/core/openclaw_gateway_client.py:93
↓ 8 callersMethodevaluate
Sample the thinking animation at time *t* seconds.
sparky_mvp/robot/thinking.py:66
↓ 7 callersFunction_make_sine_pcm
Generate a sine wave as int16 PCM bytes.
tests/test_echo_canceller.py:29
↓ 7 callersFunction_smoothstep
Hermite smoothstep: 0→1 over t in [0,1].
sparky_mvp/robot/thinking.py:53
↓ 7 callersMethodchat_send
Send a chat message and yield streaming events. Args: session_key: OpenClaw session key (e.g. "reachy") mess
sparky_mvp/core/openclaw_gateway_client.py:207
↓ 7 callersMethodstop
Request the worker thread to stop and wait for it to exit. Before stopping, resets the robot to a neutral position.
sparky_mvp/robot/moves.py:767
↓ 7 callersMethodupdate_activity
Update the last activity time.
sparky_mvp/robot/moves.py:202
↓ 6 callersMethod_make_connected_client
Create a client that's already 'connected' and return (client, ws).
tests/test_openclaw_gateway_client.py:205
↓ 6 callersFunction_make_wav_bytes
Generate a synthetic WAV file as bytes.
tests/test_speaker_id.py:25
↓ 6 callersMethod_next_req_id
(self)
sparky_mvp/core/openclaw_gateway_client.py:720
↓ 6 callersFunction_try_make_aecm
(sample_rate: int = 16000, ms_in_soundcard_buf: int = 0)
tests/test_webrtc_aecm.py:15
↓ 6 callersFunctionclone_full_body_pose
Create a deep copy of a full body pose tuple.
sparky_mvp/robot/moves.py:166
↓ 6 callersMethodclose
(self)
sparky_mvp/core/webrtc_apm.py:143
↓ 6 callersMethodfeed_speaker_pcm
Feed raw 16kHz int16 mono PCM from the speaker path.
sparky_mvp/core/echo_canceller.py:126
↓ 6 callersMethodflush
(self)
main.py:89
↓ 6 callersFunctionget_dialog
Open a Dialog from a SolveIt dialog URL.
openclaw_configs/workspace/skills/solveit-tools/bin/solveit_tools.py:31
↓ 6 callersMethodget_latest_frame
Get the latest frame (thread-safe). Returns a copy in BGR format.
sparky_mvp/robot/camera_worker.py:63
↓ 6 callersMethodread
(self, n_frames, exception_on_overflow=False)
tests/test_echo_canceller.py:264
↓ 6 callersMethodreset_states
Reset VAD internal state.
sparky_mvp/core/vad_capture.py:63
↓ 6 callersMethodset_listening
Enable or disable listening mode without touching shared state directly. While listening: - Antenna positions are frozen at the last
sparky_mvp/robot/moves.py:373
↓ 6 callersMethodset_user_message
Set the user message for the next chat.send call.
sparky_mvp/core/middlewares/openclaw_provider.py:48
↓ 5 callersFunction_download
(url: str, dst: Path)
wake_training/scripts/train_custom_wakeword.py:28
↓ 5 callersFunction_ensure_cuda_ld_path
Add nvidia pip-package library dirs to LD_LIBRARY_PATH at runtime. onnxruntime-gpu needs libcublas, libcudnn etc. When installed via pip (nv
sparky_mvp/core/stt_engine.py:48
↓ 5 callersMethod_interruptible_sleep
Sleep in small increments so stop() takes effect quickly.
sparky_mvp/core/spontaneous_speech.py:162
↓ 5 callersMethod_is_speech
Determine if audio contains actual speech vs background noise. Uses multiple heuristics: - avg_logprob: How confident the mo
sparky_mvp/core/stt_engine.py:295
↓ 5 callersMethod_make_connected_client
(self, response_frames: list[str])
tests/test_openclaw_gateway_client.py:802
↓ 5 callersMethod_next_delay
Compute next randomized delay (seconds).
sparky_mvp/core/spontaneous_speech.py:101
↓ 5 callersMethod_return_to_sleep
Helper to transition back to sleep state.
sparky_mvp/core/state_machine.py:1281
↓ 5 callersMethod_select_best_face
Select the best face based on confidence and area. Uses the same weighted scoring as the YOLO tracker: score = confidence * 0.7 + nor
sparky_mvp/robot/scrfd_head_tracker.py:73
↓ 5 callersMethod_setup_wake_word
Set up OpenWakeWord model. Supports both explicit .onnx file paths and pretrained model names (e.g. "hey_jarvis_v0.1", "alex
sparky_mvp/core/state_machine.py:234
↓ 5 callersFunction_silence_wav
(duration_s: float = 2.0, sr: int = 16000)
tests/test_stt_engine.py:27
↓ 5 callersFunction_smoothstep
Hermite smoothstep for jump-free transitions.
sparky_mvp/robot/gentle_actions.py:176
↓ 5 callersMethodchat_inject
Inject a one-time assistant message into the session transcript. This enters model context on subsequent turns without running the agent.
sparky_mvp/core/openclaw_gateway_client.py:632
↓ 5 callersMethodclose
(self)
tests/test_gentle_actions.py:139
↓ 5 callersFunctioncreate_gateway_client_from_config
Create a gateway client from the scaffold config dict. Reads openclaw config from config.yaml's openclaw section, falling back to enviro
sparky_mvp/core/openclaw_gateway_client.py:742
↓ 5 callersMethodget_head_position
Get head position from face detection. Same interface as YOLO HeadTracker. Args: img: Input image (BGR, from camera).
sparky_mvp/robot/scrfd_head_tracker.py:116
↓ 5 callersMethodqueue_move
Queue a primary move to run after the currently executing one. Thread-safe: the move is enqueued via the worker command queue so the
sparky_mvp/robot/moves.py:329
↓ 5 callersMethodreset
Reset capture state for new speech segment.
sparky_mvp/core/vad_capture.py:475
↓ 5 callersMethodwake_up
Wake up animation. Uses robot's built-in wake_up() method.
sparky_mvp/robot/animations.py:107
↓ 4 callersMethod_build_pipeline
Build the streaming middleware pipeline. Pipeline order (outermost to innermost): TTS → Filter → Sentence → Tool → Provider
sparky_mvp/core/state_machine.py:397
↓ 4 callersFunction_connect_challenge
()
tests/test_openclaw_gateway_client.py:70
↓ 4 callersFunction_connect_response
(req_id: str, ok: bool = True)
tests/test_openclaw_gateway_client.py:74
↓ 4 callersMethod_make_connected_client
(self, chat_frames: list[str])
tests/test_openclaw_gateway_client.py:682
↓ 4 callersFunction_make_wav
Wrap PCM int16 bytes in a WAV container.
tests/test_echo_canceller.py:36
↓ 4 callersMethod_manage_pre_activation_buffer
Manage circular buffer and detect voice activation. Args: chunk: Audio chunk vad_confidence: VAD result
sparky_mvp/core/vad_capture.py:406
↓ 4 callersFunction_numpy_to_wav
Convert float32 numpy audio to WAV bytes (16-bit PCM mono).
sparky_mvp/core/middlewares/direct_tts.py:466
↓ 4 callersFunction_pcm_to_wav
Wrap raw PCM bytes in a WAV container (mono).
sparky_mvp/core/middlewares/direct_tts.py:473
↓ 4 callersMethod_process_activated_audio
Process audio after activation, detect pauses. Args: chunk: Audio chunk vad_confidence: VAD result
sparky_mvp/core/vad_capture.py:427
↓ 4 callersMethod_synthesize_wav
(self, text: str)
sparky_mvp/core/middlewares/direct_tts.py:285
↓ 4 callersMethod_tts_is_speaking
(self)
sparky_mvp/core/state_machine.py:1481
↓ 4 callersFunction_wav_bytes_to_float
Convert WAV bytes to float32 numpy array at 16kHz mono. Handles stereo→mono conversion and sample rate conversion if needed.
sparky_mvp/core/speaker_id.py:42
↓ 4 callersFunctioncapture_scene_image
Capture current camera frame as an Anthropic-compatible image content block. Args: camera_worker: CameraWorker instance with get_latest_f
sparky_mvp/robot/scene_capture.py:24
↓ 4 callersFunctionempty_stream
()
tools/provider_smoke_test.py:72
↓ 4 callersFunctionencode_frame_as_image_block
Encode a BGR numpy frame as an Anthropic image content block. Args: frame: BGR uint8 numpy array from camera. max_size: Max dimen
sparky_mvp/robot/scene_capture.py:51
↓ 4 callersMethodensure_connected
Connect if not already connected, or reconnect if the WS died.
sparky_mvp/core/openclaw_gateway_client.py:169
↓ 4 callersFunctionfmt_offsets
Format a 6-tuple of offsets for display.
tools/orient_on_speech_smoke_test.py:41
↓ 4 callersMethodidentify
Identify the speaker from WAV audio bytes. Args: wav_bytes: WAV-format audio (16-bit PCM, any sample rate, mono or stereo).
sparky_mvp/core/speaker_id.py:105
↓ 4 callersFunctionmsg_to_dict
Convert a Message to a plain dict, omitting empty fields.
openclaw_configs/workspace/skills/solveit-tools/bin/solveit_tools.py:37
↓ 4 callersFunctionpoll_offsets
Poll and log offsets for a duration. Args: cw: CameraWorker mm: MovementManager duration_s: how long to poll labe
tools/orient_on_speech_smoke_test.py:136
↓ 4 callersMethodprocess
Process stream through all middlewares in order. Args: stream: Input stream Yields: Processed chunk
sparky_mvp/core/streaming.py:242
↓ 4 callersMethodrun
Main loop: sleep, check conditions, perform gesture.
sparky_mvp/core/spontaneous_gestures.py:133
↓ 4 callersMethodstart
Start the camera worker loop in a thread.
sparky_mvp/robot/camera_worker.py:83
↓ 4 callersMethodstop
Stop the camera worker loop.
sparky_mvp/robot/camera_worker.py:90
↓ 4 callersMethodstop_antenna_wiggle
Stop antenna wiggle animation and return to default neutral pose (singleton). Signals the wiggle loop to stop and waits for it to co
sparky_mvp/robot/animations.py:181
↓ 3 callersMethod_build_result
( self, text: str, duration: float, language: str, avg_logprob: float,
sparky_mvp/core/stt_engine.py:254
↓ 3 callersMethod_build_voice_message
Build the prefixed message for chat.send. Prepends a [speaker:name] tag (or [speaker:unknown]) so the agent knows who is speaking. V
sparky_mvp/core/middlewares/openclaw_provider.py:57
↓ 3 callersMethod_cancel_tts_playback
(self)
sparky_mvp/core/state_machine.py:1472
↓ 3 callersFunction_connect_challenge
()
tests/test_openclaw_node_client.py:21
↓ 3 callersFunction_connect_response
(req_id: str, ok: bool = True)
tests/test_openclaw_node_client.py:25
↓ 3 callersMethod_get_wav_duration
Get duration of WAV audio in seconds. Args: audio_wav: WAV audio bytes Returns: Duration in seconds
sparky_mvp/core/stt_engine.py:356
↓ 3 callersFunction_make_enrollments_file
Create a temporary enrollments JSON file.
tests/test_speaker_id.py:46
↓ 3 callersFunction_mock_emotions_on
Set up mock emotions library on a manager.
tests/test_spontaneous_gestures.py:22
next →1–100 of 744, ranked by callers