crates/veilvoice-core/examples/spectrum_report.rs
veilvoice-core · 107 lines · read the source here · or on GitHub
Where do the output partials actually land?
Prints the strongest partials of a synthetic speaker before and after processing, as multiples of the STFT bin grid. It is the quickest way to see the two synthesis modes described in spectral.rs:
- accent off, the legacy channel-vocoder path. Each harmonic smears into a cluster of neighbouring grid frequencies (187.5 and 234.4 Hz around one partial), which is what makes it sound metallic.
- accent on, an exact harmonic series at the canonical register (140.6 Hz and its multiples), whatever pitch went in.
Run with cargo run -p veilvoice-core --example diag_spectrum.
In plain words
A small program that runs the engine over a recording and prints what changed about its frequencies.
It is here so that the claims about what VeilVoice does to a voice can be checked by anybody, rather than taken on trust from a paragraph of prose.
WHAT THIS FILE CONTAINS
107 lines defining 3 functions (0 public), 0 types and 0 constants. Everything below is read out of the source, so it cannot disagree with the code.
WHAT CALLS WHAT
The functions this file defines, and the calls between them. An edge means the callee's name appears, called, inside the caller's body. This is a syntactic reading, not a type-resolved one.
The same graph as Mermaid source
%%{init: {"theme":"base","themeVariables":{"background":"#1a1b26","primaryColor":"#1f2335","primaryTextColor":"#c0caf5","primaryBorderColor":"#7aa2f7","secondaryColor":"#16161e","tertiaryColor":"#16161e","lineColor":"#737aa2","textColor":"#c0caf5","mainBkg":"#1f2335","nodeBorder":"#7aa2f7","clusterBkg":"#16161e","clusterBorder":"#2f3549","fontFamily":"ui-monospace, SFMono-Regular, Consolas, monospace","fontSize":"14px"}}}%%
flowchart TD
n_speaker["speaker<br/>line 27"]
n_peaks["peaks<br/>line 49"]
n_main["main<br/>line 79"]
n_main --> n_peaks
n_main --> n_speaker
click n_speaker href "https://github.com/tilas01/veilvoice/blob/main/crates/veilvoice-core/examples/spectrum_report.rs#L27" "open the source"
click n_peaks href "https://github.com/tilas01/veilvoice/blob/main/crates/veilvoice-core/examples/spectrum_report.rs#L49" "open the source"
click n_main href "https://github.com/tilas01/veilvoice/blob/main/crates/veilvoice-core/examples/spectrum_report.rs#L79" "open the source"
classDef helper fill:#1f2335,stroke:#bb9af7,color:#c0caf5
class n_speaker,n_peaks,n_main helper
This site loads no third-party script, so it cannot run Mermaid; the diagram above is the same nodes and edges drawn by the generator instead. GitHub renders the source below directly.
ITEMS
| Item | Line | Documentation |
|---|---|---|
speaker fn | 27 | |
peaks fn | 49 | |
main fn | 79 |