build_tools.syllable_walk_tui.services.generation
Walk generation service for Syllable Walker TUI.
Provides functions for generating phonetic walks using SyllableWalker.
Classes
Result from walk generation. |
Functions
|
Generate walks for a patch using SyllableWalker. |
Module Contents
- class build_tools.syllable_walk_tui.services.generation.WalkResult[source]
Result from walk generation.
- build_tools.syllable_walk_tui.services.generation.generate_walks_for_patch(patch)[source]
Generate walks for a patch using SyllableWalker.
This function: 1. Creates SyllableWalker from patch’s annotated data 2. Filters syllables by min/max length constraints 3. Generates walks with current patch parameters 4. Returns formatted walk strings
- Parameters:
patch (build_tools.syllable_walk_tui.modules.oscillator.PatchState) – PatchState with corpus data and walk parameters
- Returns:
WalkResult with walks list and optional error message
- Return type:
Note
Caller is responsible for validating patch.is_ready_for_generation() before calling this function.
Examples
>>> result = generate_walks_for_patch(patch) >>> if result.error: ... print(f"Generation failed: {result.error}") >>> else: ... for walk in result.walks: ... print(walk) # "syl1 → syl2 → syl3"