KVoiceWalk – Voice cloning for Kokoro TTS using random walk algorithms
I was blown away by Kokoro and what it managed to do with such little space. I became curious if it would be possible to create new voices by direct manipulation of the style tensors. After many failed attempts I finally landed on a method that properly scores the similarity of two audio segments that works well enough to random walk similar voices for Kokoro. I plan on using this scoring as part of a genetic algorithm, but wanted to baseline test it with this code. The scoring mechanism using Resemblyzer to calculate similarity to target audio and similarity to another segment of audio it…
In plain words
KVoiceWalk is a tool for creating new voices with Kokoro TTS by manipulating style tensors using random walk algorithms. It works by scoring audio similarity using Resemblyzer to measure how closely generated audio matches a target voice while maintaining stability through self-similarity metrics. Intended for developers working with Kokoro TTS, it provides a baseline implementation that could eventually integrate into genetic algorithms for voice synthesis.
written from the facts on this page · September 2026
From the sources
In the maker’s words, at launch
I was blown away by Kokoro and what it managed to do with such little space. I became curious if it would be possible to create new voices by direct manipulation of the style tensors. After many failed attempts I finally landed on a method that properly scores the similarity of two audio segments that works well enough to random walk similar voices for Kokoro. I plan on using this scoring as part of a genetic algorithm, but wanted to baseline test it with this code. The scoring mechanism using Resemblyzer to calculate similarity to target audio and similarity to another segment of audio it generates itself, self similarity. This self similarity was key in keeping the model stable and the audio consistent across inputs. But it was not enough to prevent over fitting to Resemblyzer. I had to create a third metric which uses a normalized difference of a variety of audio features compared to the target features. Summing those I get a feature similarity metric which is useful in keeping audio quality from degrading too much and prevents over fitting. The last challenge was weighting the score while keeping it flexible enough to explore the complex text to speech style space. Using a weighted harmonic mean allowed for back sliding on some metrics for significant improvement in others, which reduced stagnation and worked well enough for the random walk to work. The results are fairly good. I would say it ends up in the uncanny valley of similarity rather than producing a proper clone of the target voice. It sounds like it might be the target voice, but does well enough to improve similarity from 70% to around 90%. There are probably limitations to the architecture of Kokoro in how close it can possibly sound to other voices, but there is probably some more progress to be made using a more advanced genetic algorithm. Check out the code, make some new voices, and let me know if you have any ideas on ways to improve.
More dev tools this month
the category →



Open-source GTM skills for technical founders
Dev tools · 29d ago · gtmcofounder.com

OpenTrailPaper is open-source bike computer firmware for the LilyGO T5S3 4.7" E-Paper PRO. It supports offline maps, GPX routes, FIT recording and Bluetooth sensors.
Dev tools · 2d ago · opentrailpaper.com

Launched alongside, May 2025
the whole month →
- C9
Life & fun · 2025 · felixrieseberg.github.io



