extensions icon indicating copy to clipboard operation
extensions copied to clipboard

SAM extension

Open MagentaDude opened this issue 8 months ago • 13 comments

This is a new extension that I've been working on the past few days that implements the program SAM (Software Automatic Mouth) into TurboWarp using SamJs. It allows the user to change the speed, pitch, mouth, and throat properties of the voice, which allows for more complex voices and text-to-speech in projects. It also has a nice retro vibe to it which would be great for projects simulating computers. Let me know what you think!

MagentaDude avatar Mar 12 '25 23:03 MagentaDude

Does he only know how to speak English?

WAYLIVES avatar Mar 13 '25 05:03 WAYLIVES

My bad. I didn't understand how to run linting and formatting, but I think I get it now. I'll try to fix all the issues ASAP.

MagentaDude avatar Mar 13 '25 21:03 MagentaDude

Alright, I fixed all of the errors.

MagentaDude avatar Mar 13 '25 22:03 MagentaDude

Hi @MagentaDude SAM is a lot of fun! I forked your repo and made 3 commits that you're welcome to include or ignore:

  1. added a "add [SPEECH] as a sound" block which adds the speech as a sound in the project, rather than downloading to disk.
  2. slight tweak to use // global SamJs eslint setting to avoid needing to enable/disable as many lines (totally optional!)
  3. This is PROBABLY overboard, but I adapted the SAM doc's Phoneme Chart into a dropdown menu to make it easier to find the right combination of letters. In particular I added IPA symbols for the sounds, so that if anyone really wanted to translate the text to other languages they could (for example, by looking up examples here, which is creative commons licensed).

@WAYLIVES SAM doesn't understand much, which is why it fits in a tiny amount of code. Supporting lots of languages would take > 2 mb for the locale data (I'm thinking mespeak). Maybe my solution in #3 is acceptable?

lselden avatar Mar 14 '25 05:03 lselden

@lselden Those features sound great! I can't seem to find your fork though; could you provide a link?

MagentaDude avatar Mar 14 '25 13:03 MagentaDude

@lselden Those features sound great! I can't seem to find your fork though; could you provide a link?

Whoops! Yeah it's here: https://github.com/lselden/extensions/tree/sam

lselden avatar Mar 14 '25 19:03 lselden

you should not leak SamJs to global, this is bad practice, a more indepth review will be required CC: @lselden

@MagentaDude I submitted a PR to your fork the plugs the leak, as well as including the other changes I suggested. Take from it what you will

lselden avatar Mar 15 '25 02:03 lselden

Looks great; I think I'll stop adding changes now 😅

MagentaDude avatar Mar 15 '25 14:03 MagentaDude

!format

PPPDUD avatar Sep 13 '25 14:09 PPPDUD

The formatting bot didn't find any formatting issues. It currently only checks the extensions folder. The author or a maintainer can run terminal command 'npm run format' manually to format all files.

github-actions[bot] avatar Sep 13 '25 14:09 github-actions[bot]

This code appears to be minified in some areas. Please use clear, well-formatted code.

Minified libraries aren't banned, so long as you include a license above, and it's recommended to use // prettier-ignore above them to maintain readability

This extension relies on SAM.js and large libraries are probably better left minified

Brackets-Coder avatar Sep 13 '25 14:09 Brackets-Coder

I'm glad this project is finally out of limbo 😅

@PPPDUD Do you still want me to include the unminified version instead?

MagentaDude avatar Sep 16 '25 21:09 MagentaDude

I'm glad this project is finally out of limbo 😅

@PPPDUD Do you still want me to include the unminified version instead?

It's fine, nevermind. I was feeling like picking apart PRs that day.

PPPDUD avatar Sep 17 '25 15:09 PPPDUD