What was asked, what was done
What the owner said
Please create game sound effects, such as the sound made when hit, using AI.
So here is what I did
- I excluded Stable Audio Open and MMAudio due to licensing issues and selected MOSS-SoundEffect v2.0.
- I verified dependency errors in the conversion code repository and inconsistencies in the model card examples, then installed it.
- To resolve the silence issue, I applied logic to widen the generation window, find the start point, and trim, succeeding with 43 out of 48 attempts.
- I checked each file's length, loudness and pitch with a script, so the owner can pick by ear.
What the owner didDescribe the desired sound in words and choose from the generated variations by ear
How I selected candidates
I excluded Stable Audio Open because it required Hugging Face login and agreement to terms. I excluded MMAudio based on web search results stating its weights are non-commercial (CC-BY-NC) (I did not verify this directly). MOSS-SoundEffect v2.0 has Apache-2.0 in its card, requires no login, and has a Mac (MLX) conversion version.
What I read before installing someone else's conversion code
The conversion repository is a personal work (1 star, last updated 2026-06-15), is not on PyPI, and exists only on GitHub. I downloaded it and read the code: about 1,590 lines in the main package, external communication was only for downloading models, and there were no commands to execute or delete files. If updated, I would need to read it again.
Commands to try
| Commands (copy as is) |
|---|
Install 1uv venv --python 3.12 .venv |
Install 2git clone --depth 1 https://github.com/xocialize/moss-soundeffect-mlx |
Install 3uv pip install --python .venv/bin/python -e moss-soundeffect-mlx mlx-lm ftfy regex tqdm |
Make a sound (Python)pipe = MossSoundEffectPipeline.from_pretrained(snapshot_download("mlx-community/MOSS-SoundEffect-v2.0-4bit")); audio = pipe(prompt="a big explosion with debris and deep rumble", seconds=3, num_inference_steps=50, cfg_scale=4.0, seed=0) |
Errors encountered during installation
The repository's dependency list is incomplete, so installing it directly causes errors to occur in succession.
| Symptom | Error Message | Solution |
|---|---|---|
| Install and run directly | ModuleNotFoundError: No module named 'mlx_lm' | Install mlx-lm as well |
| Run next | ModuleNotFoundError: No module named 'ftfy' | Install ftfy, regex, and tqdm together (see Installation 3 in the command table) |
The model card example uses from_pretrained("mlx-community/…"), but reading the code showed it only accepts folder paths (I did not run it with this path and only confirmed via code). So I downloaded the files with snapshot_download and passed that folder in.
Making 12 kinds of hit sounds
The owner listened to Korean voice samples and said they sounded like machine voices, so we excluded voices and decided to use them for sound effects like those made when hit. Since we release international versions together with the Korean one, we don't make sounds that mix in speech or text (no voice in the prompt).
I created 48 variations (12 types x 4) in 358 seconds (average 7.4 seconds per clip, 20 steps, max 12.18GB in model memory). I automatically filtered out silence and clipped sounds, leaving 43, with at least 2 remaining for each type.
| Sound | English Description | Successful Variations |
|---|---|---|
| Sword hitting armor | a sword strikes metal armor, short sharp metallic clang impact | 4/4 |
| Punch impact | a heavy punch impact, short dull thud with bass | 3/4 |
| When the player is hit | a short dull thump when the player takes damage, soft low impact, no voice | 3/4 |
| Arrow hitting | an arrow hits a wooden target, quick sharp thwack | 4/4 |
| Magic spell hit | a magic spell energy burst hits the target, bright zap and boom | 4/4 |
| Critical hit | a critical hit, very heavy impact with a short echo | 3/4 |
| Blocked by shield | a sword blocked by a metal shield, clang with a short ring | 4/4 |
| Defeating a monster | a small monster defeated, soft pop and sparkle | 2/4 |
| Picking up coins | a bright coin pickup chime, short sparkle, retro game | 4/4 |
| Level up | a level up jingle, bright ascending chime, short | 4/4 |
| Button press | a soft button click tap, short clean UI sound | 4/4 |
| Gate taking damage | a wooden gate takes damage, crunchy wood crack and thud | 4/4 |
Requesting short sounds directly resulted in silence
Initially, I requested 0.4~1.2 seconds and trimmed immediately, resulting in 6 out of 36 being completely silent. This model generates a 30-second clip and trims the front part, but sometimes the sound starts later (e.g., the arrow sound starts at about 2 seconds in a 4-second window).
So, I modified it to generate with a generous window (requested length + 3 seconds, min 4 seconds), find where the sound starts, trim the empty space before it, and leave only the requested length (time is independent of window length). Success increased from 30/36 to 43/48. Sounds starting at the end of the window with only 0.16 seconds left are also filtered out as failures.
The same description varied significantly between variations (e.g., sword sound center frequency 4,808~7,742Hz). The script only filters out broken files; picking the ones we like is up to human ears.
Speed: Reducing steps makes it faster
| Number of Steps | Time per Sound Effect |
|---|---|
| 10 steps | 5.9 seconds |
| 20 steps | 9.6 seconds |
| 50 steps (default) | 19.5 seconds |
Sound length does not affect time (it always calculates a 30-second clip and uses only the front part). Max model memory was 12.2GB (same as the value stated in the model card).
I could not hear the sounds
I only checked the files. Below are the metrics for the first 4 long sounds created, and the hit sound bundle was checked in the same way (metrics were saved to files).
| Sound | Length | Volume | Center Frequency | Shape |
|---|---|---|---|---|
| Explosion | 3.0 seconds | 0.63 (loud) | 1,568Hz (low) | Loud throughout |
| Sword swing | 1.5 seconds | 0.11 | 4,937Hz (high) | Sound only in first half, silence in back |
| Coin pickup | 1.5 seconds | 0.25 | 5,430Hz (very high) | Gradually decreasing |
| Creaking door | 3.0 seconds | 0.07 (quiet) | 3,556Hz | Gradually decreasing |
Our app's sound policy is to synthesize via code, so these sounds are for prototypes/video purposes. The owner will decide whether to include them directly in the app.