Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/algal/sparky
/ functions
Functions
744 in github.com/algal/sparky
⨍
Functions
744
◇
Types & classes
135
↳
Endpoints
20
↓ 3 callers
Method
_next_delay
Compute next randomized delay (seconds).
sparky_mvp/core/spontaneous_gestures.py:126
↓ 3 callers
Function
_run_train_py
(repo_root: Path, config_path: Path, *args: str)
wake_training/scripts/train_custom_wakeword.py:101
↓ 3 callers
Method
_wake_up_and_go_interactive
Common wake-up sequence: animation + restart subsystems + go interactive.
sparky_mvp/core/state_machine.py:874
↓ 3 callers
Function
_wav_duration_seconds
Return duration for a WAV byte string. Note: OpenAI's TTS WAV output currently uses placeholder chunk sizes (0xFFFFFFFF) for streaming.
sparky_mvp/core/middlewares/testbench_tts.py:257
↓ 3 callers
Function
_wav_to_pcm_16k
Decode WAV and resample to 16kHz mono int16 PCM.
sparky_mvp/core/echo_canceller.py:43
↓ 3 callers
Method
feed_pcm
Thread-safe: push raw PCM int16 audio into the consumer queue.
sparky_mvp/robot/head_wobbler.py:57
↓ 3 callers
Method
get_read_available
(self)
sparky_mvp/core/aec_stream.py:37
↓ 3 callers
Function
get_tool_handler
Get a tool handler by name.
sparky_mvp/tools/tool_handlers.py:133
↓ 3 callers
Method
go_to_sleep
Sleep animation. Uses robot's built-in goto_sleep() method.
sparky_mvp/robot/animations.py:121
↓ 3 callers
Method
run
Event loop: listen for Gateway messages and dispatch invoke requests. Run as ``asyncio.create_task(client.run())``.
sparky_mvp/core/openclaw_node_client.py:248
↓ 3 callers
Method
sentence
Create a sentence chunk (complete sentence).
sparky_mvp/core/streaming.py:126
↓ 3 callers
Method
set_speaker_name
Set the identified speaker for the next chat.send call.
sparky_mvp/core/middlewares/openclaw_provider.py:53
↓ 3 callers
Method
sleep_phase
Monitor for wake word while robot sleeps. Transitions to INTERACTIVE when wake word detected. If no wake word model availabl
sparky_mvp/core/state_machine.py:849
↓ 3 callers
Method
stop
Signal the manager to stop.
sparky_mvp/core/spontaneous_gestures.py:202
↓ 3 callers
Method
synthesize
Synthesize text to PCM int16 audio bytes (24kHz mono).
sparky_mvp/core/orpheus_engine.py:128
↓ 2 callers
Function
_b64url_encode
Base64-URL encode without padding (RFC 4648 §5).
sparky_mvp/core/openclaw_node_client.py:34
↓ 2 callers
Function
_check_parakeet
()
tools/fetch_models.py:72
↓ 2 callers
Method
_check_user_presence
Check if a user face has been detected recently.
sparky_mvp/core/state_machine.py:1515
↓ 2 callers
Method
_continuous_vad_listener
Continuously listen for speech during AWAKE state. Yields speech audio bytes via queue when pause detected. Runs throughout
sparky_mvp/core/state_machine.py:275
↓ 2 callers
Function
_ensure_snac
Load the SNAC neural audio codec (24kHz).
sparky_mvp/core/orpheus_engine.py:28
↓ 2 callers
Function
_file_status
(path: Path)
tools/fetch_models.py:52
↓ 2 callers
Function
_fmt_size
(num_bytes: int)
tools/fetch_models.py:42
↓ 2 callers
Function
_get_encoder
Lazy-load the resemblyzer VoiceEncoder (downloads model on first use).
sparky_mvp/core/speaker_id.py:32
↓ 2 callers
Method
_interruptible_sleep
Sleep in small increments so stop() takes effect quickly.
sparky_mvp/core/spontaneous_gestures.py:195
↓ 2 callers
Function
_iter_input_devices
(pa: pyaudio.PyAudio)
tools/baseline_listen_transcribe.py:41
↓ 2 callers
Function
_load_apm_shim
Load the APM shim shared library from the same directory as this module.
sparky_mvp/core/webrtc_apm.py:31
↓ 2 callers
Method
_make_connected_client
(self, chat_frames: list[str])
tests/test_openclaw_gateway_client.py:327
↓ 2 callers
Method
_make_connected_client
(self, chat_frames: list[str])
tests/test_openclaw_gateway_client.py:388
↓ 2 callers
Method
_make_connected_client
(self, chat_frames: list[str])
tests/test_openclaw_gateway_client.py:451
↓ 2 callers
Method
_next_req_id
(self)
sparky_mvp/core/openclaw_node_client.py:505
↓ 2 callers
Function
_normalize_text_for_echo
(text: str)
sparky_mvp/core/state_machine.py:1625
↓ 2 callers
Method
_play_audio
Play audio data using pygame mixer (interruptible) or robot's media_manager. Args: audio_data: WAV audio data bytes
sparky_mvp/core/middlewares/tts.py:322
↓ 2 callers
Method
_samples_to_wav
Convert captured samples to WAV bytes. Returns: WAV file as bytes (16kHz, mono, int16)
sparky_mvp/core/vad_capture.py:454
↓ 2 callers
Method
_send_invoke_result
Send a node.invoke.result RPC back to the Gateway.
sparky_mvp/core/openclaw_node_client.py:471
↓ 2 callers
Function
_split_text_for_tts
Split text into smaller pieces to improve perceived responsiveness and barge-in. We prefer to split on punctuation, otherwise on whitespace.
sparky_mvp/core/middlewares/testbench_tts.py:317
↓ 2 callers
Function
_words_for_echo
(norm_text: str)
sparky_mvp/core/state_machine.py:1631
↓ 2 callers
Method
evaluate
(self, t: float)
sparky_mvp/robot/gentle_actions.py:134
↓ 2 callers
Method
evaluate
(self, t: float)
sparky_mvp/robot/gentle_actions.py:166
↓ 2 callers
Method
evaluate
Evaluate breathing move at time t.
sparky_mvp/robot/moves.py:104
↓ 2 callers
Method
feed_speaker_wav
Feed speaker WAV (any rate/format) — resampled to 16kHz internally.
sparky_mvp/core/echo_canceller.py:118
↓ 2 callers
Function
generate_speech_tone
Generate a sine wave that simulates speech loudness for testing.
tools/head_wobbler_smoke_test.py:19
↓ 2 callers
Function
load_config
Load configuration from YAML file. Args: config_path: Path to config file Returns: Configuration dictionary Raises
main.py:109
↓ 2 callers
Method
orient_to_speaker
Trigger a one-shot face orientation snapshot (for orient_on_speech mode). Thread-safe: can be called from any thread. The next control loop
sparky_mvp/robot/moves.py:718
↓ 2 callers
Function
send_and_print
Send a message and print all streaming events.
tools/gateway_chat.py:33
↓ 2 callers
Method
set_head_tracking_enabled
Enable/disable head tracking.
sparky_mvp/robot/camera_worker.py:78
↓ 2 callers
Method
text
Create a text chunk.
sparky_mvp/core/streaming.py:121
↓ 1 callers
Method
_antenna_wiggle_loop
Continuous antenna wiggle loop (runs in background). Uses set_target() with explicit head pose to prevent head wilting. Smoo
sparky_mvp/robot/animations.py:242
↓ 1 callers
Method
_apply_pending_offsets
Apply the most recent speech/face offset updates.
sparky_mvp/robot/moves.py:399
↓ 1 callers
Method
_await_task_done
Await a task completion in the background to prevent "Task exception was never retrieved". This is used for interruption paths where
sparky_mvp/core/state_machine.py:1127
↓ 1 callers
Method
_bind
(self)
sparky_mvp/core/webrtc_apm.py:111
↓ 1 callers
Method
_bind
(self)
sparky_mvp/core/webrtc_aecm.py:120
↓ 1 callers
Method
_calculate_blended_antennas
Blend target antennas with listening freeze state and update blending.
sparky_mvp/robot/moves.py:612
↓ 1 callers
Method
_call_callback
Call the TTS trigger callback in a non-blocking way. Args: text: Text to send to TTS
sparky_mvp/core/middlewares/tts.py:149
↓ 1 callers
Method
_call_callback_with_thread
Call TTS callback that returns a thread for tracking. Args: text: Text to send to TTS
sparky_mvp/core/middlewares/tts.py:514
↓ 1 callers
Method
_call_tts_http
Call TTS service via HTTP asynchronously. Args: text: Text to synthesize and play
sparky_mvp/core/middlewares/tts.py:529
↓ 1 callers
Function
_check_small_models
()
tools/fetch_models.py:60
↓ 1 callers
Method
_compose_full_body_pose
Compose primary and secondary poses into a single command pose.
sparky_mvp/robot/moves.py:601
↓ 1 callers
Method
_create
(self, sample_rate: int)
sparky_mvp/core/webrtc_apm.py:137
↓ 1 callers
Method
_create_and_init
(self)
sparky_mvp/core/webrtc_aecm.py:151
↓ 1 callers
Function
_decode_snac_tokens
Decode Orpheus token IDs into PCM int16 audio bytes via SNAC.
sparky_mvp/core/orpheus_engine.py:41
↓ 1 callers
Function
_download_parakeet
()
tools/fetch_models.py:90
↓ 1 callers
Function
_download_with_curl
Large-file-friendly download with resume support. Falls back to `_download` if `curl` isn't available.
wake_training/scripts/train_custom_wakeword.py:39
↓ 1 callers
Function
_ensure_acav100m_features
(repo_root: Path, dst_rel: str = "data/openwakeword_features_ACAV100M_2000_hrs_16bit.npy")
wake_training/scripts/train_custom_wakeword.py:122
↓ 1 callers
Function
_ensure_hf_validation_set
(repo_root: Path, dst_rel: str = "data/validation_set_features.npy")
wake_training/scripts/train_custom_wakeword.py:132
↓ 1 callers
Method
_ensure_model
Lazy-initialize the SCRFD model on first use.
sparky_mvp/robot/scrfd_head_tracker.py:46
↓ 1 callers
Function
_ensure_openwakeword_feature_models
`openWakeWord/openwakeword/utils.AudioFeatures` expects these by default: - resources/models/melspectrogram.onnx - resources/models/e
wake_training/scripts/train_custom_wakeword.py:56
↓ 1 callers
Function
_ensure_piper_sample_generator
(repo_root: Path, repo_url: str, voice_model_url: str, voice_model_name: str)
wake_training/scripts/train_custom_wakeword.py:83
↓ 1 callers
Method
_extract_audio_tokens
Convert raw LLM token IDs to SNAC codec indices.
sparky_mvp/core/orpheus_engine.py:174
↓ 1 callers
Method
_fetch_and_queue_audio
Fetch audio from TTS service and add to playback queue. Args: text: Text to synthesize
sparky_mvp/core/middlewares/tts.py:162
↓ 1 callers
Method
_find_reachy_microphone
Find Reachy's microphone device index. Returns: Device index for Reachy's microphone Raises: Runtim
sparky_mvp/core/state_machine.py:149
↓ 1 callers
Method
_format_prompt
Format prompt with voice and special tokens.
sparky_mvp/core/orpheus_engine.py:165
↓ 1 callers
Method
_get_primary_pose
Get the primary full body pose from current move or neutral.
sparky_mvp/robot/moves.py:544
↓ 1 callers
Method
_get_secondary_pose
Get the secondary full body pose from speech and face tracking offsets.
sparky_mvp/robot/moves.py:577
↓ 1 callers
Method
_handle_action_list
Return the list of available actions.
sparky_mvp/core/openclaw_node_client.py:455
↓ 1 callers
Method
_handle_action_perform
Perform a gentle physical action on the robot.
sparky_mvp/core/openclaw_node_client.py:403
↓ 1 callers
Method
_handle_camera_list
Return the list of available cameras (single front-facing camera).
sparky_mvp/core/openclaw_node_client.py:394
↓ 1 callers
Method
_handle_camera_snap
Capture a frame from CameraWorker and return as base64 JPEG.
sparky_mvp/core/openclaw_node_client.py:341
↓ 1 callers
Method
_handle_command
Handle a single cross-thread command.
sparky_mvp/robot/moves.py:421
↓ 1 callers
Method
_init_faster_whisper
( self, model_size: str, device: str, compute_type: Optional[str] )
sparky_mvp/core/stt_engine.py:120
↓ 1 callers
Method
_init_parakeet
( self, model_path: Optional[str], gpu_device: int )
sparky_mvp/core/stt_engine.py:139
↓ 1 callers
Function
_invoke_request
( req_id: str = "invoke-1", command: str = "camera.snap", params: dict | None = None, node_id:
tests/test_openclaw_node_client.py:34
↓ 1 callers
Method
_is_audio_buffer_empty
Check if the SoundDevice output buffer has drained.
sparky_mvp/core/middlewares/direct_tts.py:196
↓ 1 callers
Method
_issue_control_command
Send the fused pose to the robot with throttled error logging.
sparky_mvp/robot/moves.py:648
↓ 1 callers
Method
_iter_input_devices
(self)
sparky_mvp/core/state_machine.py:167
↓ 1 callers
Method
_load_emotions
Lazy-load the recorded emotions library.
sparky_mvp/core/spontaneous_gestures.py:98
↓ 1 callers
Function
_load_or_create_identity
Load or generate a persistent Ed25519 identity for this node. Returns dict with keys: device_id, public_key_b64url, private_key_pem, public_key_p
sparky_mvp/core/openclaw_node_client.py:39
↓ 1 callers
Function
_load_token
Load gateway token from env or ~/.openclaw/openclaw.json.
tools/node_camera_smoke_test.py:40
↓ 1 callers
Function
_load_webrtc_aecm_lib
Load the shared library that exports WebRtcAecm_* symbols. Debian trixie package installs: /usr/lib/x86_64-linux-gnu/libwebrtc-audio-p
sparky_mvp/core/webrtc_aecm.py:33
↓ 1 callers
Method
_looks_like_echo_of_tts
(self, transcribed_text: str)
sparky_mvp/core/state_machine.py:1577
↓ 1 callers
Function
_loudness_gain
Normalize dB into [0,1] with gamma; clipped to [0,1].
sparky_mvp/robot/speech_tapper.py:66
↓ 1 callers
Method
_make_connected_client
(self, chat_frames: list[str])
tests/test_openclaw_gateway_client.py:879
↓ 1 callers
Function
_make_fp_validation_from_negative_test
(model_dir: Path, fp_out: Path)
wake_training/scripts/train_custom_wakeword.py:107
↓ 1 callers
Function
_make_streaming_wav_bytes
(*, sample_rate: int, channels: int, bits_per_sample: int, data_bytes: bytes)
tests/test_testbench_tts_duration.py:4
↓ 1 callers
Function
_make_wav
Encode int16 PCM as WAV bytes.
tests/test_stt_engine.py:16
↓ 1 callers
Method
_manage_breathing
Manage automatic breathing when idle.
sparky_mvp/robot/moves.py:505
↓ 1 callers
Method
_manage_move_queue
Manage the primary move queue (sequential execution).
sparky_mvp/robot/moves.py:489
↓ 1 callers
Method
_maybe_log_frequency
Emit frequency telemetry when enough loops have elapsed.
sparky_mvp/robot/moves.py:700
↓ 1 callers
Function
_pick_input_device_index
(pa: pyaudio.PyAudio)
tools/baseline_listen_transcribe.py:48
↓ 1 callers
Method
_pick_input_device_index
(self)
sparky_mvp/core/state_machine.py:173
↓ 1 callers
Method
_playback_worker
Background worker that plays audio from the queue sequentially. Ensures only one audio plays at a time. Singleton worker shar
sparky_mvp/core/middlewares/tts.py:186
← previous
next →
101–200 of 744, ranked by callers