Skip to content

feat: return waveform peaks as a typed list instead of a JSON string - #4

Merged
cloud-hai-vo merged 1 commit into
mainfrom
feat/typed-waveform-result
Aug 5, 2026
Merged

feat: return waveform peaks as a typed list instead of a JSON string#4
cloud-hai-vo merged 1 commit into
mainfrom
feat/typed-waveform-result

Conversation

@cloud-hai-vo

Copy link
Copy Markdown
Contributor

Summary

ProbeResult.WaveformResult was a string? holding a JSON-serialized List<double> -- a leftover of the old JSON-blob-everything design that Result (removed earlier in this same API-cleanup cycle) also used. Return the actual typed data instead of a string to parse:

  • ProbeResult.Waveform is now IReadOnlyList<double>?, assigned directly from WaveformCalculator.GetNormalizedWindows() -- no JsonSerializer.Serialize/Deserialize round trip in between.
  • Updated all 6 NativeEncoder.Probe* methods, the unit tests (AssertNonEmptyWaveform now takes the list directly), and the docs that documented the old shape (llms.txt, llms-full.txt, API-Reference.html, Advanced-Features.html, Getting-Started.html, CLAUDE.md).

Breaking change

ProbeResult.WaveformResult (string?) no longer exists -- use ProbeResult.Waveform (IReadOnlyList<double>?) instead.

Test plan

  • dotnet build --configuration Release (net8.0/net9.0/net10.0)
  • dotnet test --configuration Release passes on all three target frameworks (109 passed, 1 pre-existing skip)

🤖 Generated with Claude Code

ProbeResult.WaveformResult was a string holding a JSON-serialized
List<double> -- a leftover of the old JSON-blob-everything design that
Result (removed earlier this cycle) also used. Return the data itself:
ProbeResult.Waveform is now IReadOnlyList<double>?, populated directly
from WaveformCalculator.GetNormalizedWindows() with no serialize step
in between. Docs (llms.txt, llms-full.txt, API-Reference.html,
Advanced-Features.html, Getting-Started.html) updated to match.

BREAKING CHANGE: ProbeResult.WaveformResult (string?) no longer exists;
use ProbeResult.Waveform (IReadOnlyList<double>?) instead.
@cloud-hai-vo
cloud-hai-vo merged commit 4efb798 into main Aug 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant