# ⭐ SAMMY: Text-To-Speech / Speech Synthesizer Extension!

**URL:** <https://forum.makecode.com/t/sammy-text-to-speech-speech-synthesizer-extension/39499>\
**Category:** Show & Tell\
**Tags:** extension, music, tool\
**Created:** [September 26, 2025, 2:30am UTC](https://forum.makecode.com/t/sammy-text-to-speech-speech-synthesizer-extension/39499 "2025-09-26T02:30:26Z")\
**Posts on this page:** 1\
**Showing post:** 34

<div class="post-metadata">

**Author:** ![randomuser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/randomuser/32/32505_2.png) [@randomuser](https://forum.makecode.com/u/randomuser)\
**Post date:** [November 22, 2025, 11:44pm UTC](https://forum.makecode.com/t/sammy-text-to-speech-speech-synthesizer-extension/39499/34 "2025-11-22T23:44:43Z")

</div>

Hey everyone!! 💖  
I’m working on a HUGE update to the SAMMY extension. There will be no more manual phonetic writing (You can just type normally and the program will pronounce it correctly, like google translate) and I’m looking into a way of having that conversion _in makecode_ rather than on my website.  
The problem I’m trying to solve is that the data set of words and their pronunciations is HUGE (Over 130,000 lines of text, 3.6 Megabytes of plain text) so just storing it in the extension would take up a ton of storage.  
However, I heard of this cool compression trick MakeCode uses…

> [@\[Extension\] BetterArrays - 60 useful array blocks!](https://forum.makecode.com/t/extension-betterarrays-60-useful-array-blocks/29154/3):
>
> MakeCode’s compiler is actually really smart about only compiling code that is actually used in your project. This is called [tree shaking](https://en.wikipedia.org/wiki/Tree_shaking).
> 
> As such, it’s totally possible to make huge extensions but not add that much to the compiled binary! Only the code that is actually referenced in the project will make it in.

It should mean that if there’s an unused function in a user’s code, it isn’t compiled and won’t affect the storage.  
The wiki page linked mentions it is used on functions, so my idea on how to use this technique would be to load all of the text used in the program into one used function and leave the rest in an unused function that won’t be compiled, but I’m not sure how to do that in MakeCode.  
Do any of you know if this could be applied to a data set? (And @richard @WoofWoof for good measure 😆 )

---

_[View the full topic](https://forum.makecode.com/t/sammy-text-to-speech-speech-synthesizer-extension/39499)._
