HN user

akx

1,328 karma

[ my public key: https://keybase.io/akx; my proof: https://keybase.io/akx/sigs/CjJeih5_67DQNUw0Mdv1GG_IykZlak6eFQK3F_ZGR9g ]

--- meet.hn/city/60.4517531,22.2670522/Turku

Socials: - github.com/akx - x.com/akx

---

Posts1
Comments615
View on HN

This doesn't do the same thing though, since it's not Unicode aware.

    >>> 'x\u2009   a'.split()
    ['x', 'a']
    # incorrect; in bytes mode, `\S` doesn't know about unicode whitespace
    >>> list(re.finditer(br'\S+', 'x\u2009   a'.encode()))
    [<re.Match object; span=(0, 4), match=b'x\xe2\x80\x89'>, <re.Match object; span=(7, 8), match=b'a'>]
    # correct, in unicode mode
    >>> list(re.finditer(r'\S+', 'x\u2009   a'))
    [<re.Match object; span=(0, 1), match='x'>, <re.Match object; span=(5, 6), match='a'>]

This is a fun model for circuit-bending, because the voice style vectors are pretty small.

For instance, try adding `np.random.shuffle(ref_s[0])` after the line `ref_s = self.voices[voice]`...

EDIT: be careful with your system volume settings if you do this.

I opened a couple of PRs to fix this situation:

https://github.com/KittenML/KittenTTS/pull/21 https://github.com/KittenML/KittenTTS/pull/24 https://github.com/KittenML/KittenTTS/pull/25

If you have `uv` installed, you can try my merged ref that has all of these PRs (and #22, a fix for short generation being trimmed unnecessarily) with

    uvx --from git+https://github.com/akx/KittenTTS.git@pr-21-22-24-25 kittentts --output output.wav --text "This high quality TTS model works without a GPU"
A new PNG spec 1 year ago

This is what stable-diffusion-webui does too (though the format is unfortunately plaintext); ComfyUI stores the node graph as JSON, etc.

* Windows XP's speech synthesizer wasn't SAM (Software Automatic Mouth), and sounded nothing like this. (I know this is emulating Software Automatic Mouth, because, well, https://samtts.com/lib/sam.js says so, and has a link to https://github.com/discordier/sam. It would be courteous to at least acknowledge the shoulders you're standing on.)

* I would be very wary about touting this to be "Microsoft SAM TTS" so prominently, since it has nothing to do with Microsoft.

* Your privacy policy page is from "Image to Ghibli".

* Your contact and about pages are 404.

* All of the copy smells like AI, and "5 stars from 2000+ happy users" is probably a blatant lie. (Where can I see some of those 5-star reviews, or review it myself?)

* "Our modern SAM TTS JavaScript implementation brings this iconic Microsoft voice to your browser" is also pretty disingenious, both because it's not a Microsoft voice, and as seen above, you didn't implement the TTS.

* Some of the alternate TTS implementations you link to (and then embed from Huggingface) in the footer are broken.

* Your Sign-in button (why would I sign in anyway?) is broken: "Access blocked: This app’s request is invalid" from Google, "Error 400: redirect_uri_mismatch".

Using pip-installed libraries brings in the famous packaging problems, but you don't have to use it!

These days, with uv and PEP 723 inline script metadata, that's not an issue either.

    # /// script
    # dependencies = ["numpy"]
    # requires-python = ">=3.12"
    # ///
    import numpy as np
and
    uv run myscript.py
will just Do The Right Thing.