‘Local AI’ is a collection of AI tools that run entirely on your computer.
There is no cloud account, no subscription, no usage fees, and no per-prompt limits.
Your prompts and results stay on your machine.
It consists of the following assets:
All ‘Local AI’ assets are developed for Unity 6 (version 6000.0 or higher).
Music and Voice run in the Windows x86_64 Editor. They are not added to a player build unless you import the generated audio yourself.
Moderator is a runtime component: it runs in play mode and in player builds (including WebGL).
A GPU is recommended. It is much faster than CPU.
If you donβt know how to install Unity 6, follow this official tutorial.
*.gguf and *.gguf.part to your .gitignore file.
‘Local AI: Music’ generates songs offline inside the Unity Editor. Describe style and arrangement, optionally write sectioned lyrics, then render a WAV on your machine.
To ensure optimal performance and compatibility, your project must meet the following requirements:
Generate.
A Style is a MusicPreset asset: a structured description of genre, mood, vocals, and arrangement. The generator turns this text into the caption sent to the model.
Create one with New, pick an existing asset in the object field, or start from a preset under Editor/Presets/. Changes are saved on the asset when you edit it.
| Style | Genre and subgenre, for example synthwave or acoustic folk. |
| Tempo | Speed of the track, for example 96 BPM. |
| Key | Key and scale, for example C major. |
| Global Emotional Progression | How the mood should evolve from the start of the song to the end. |
| Scenarios & Imagery | Listening context, pictures, and intended use (menu, trailer, in-game bed, and so on). |
| Sonics & Production Profile | Mix, soundstage, frequency balance, and dynamics. |
These fields describe a singer. If you generate without lyrics (or with empty section text), the generator builds an instrumental request and does not write these fields back onto the asset.
| Vocal Gender & Timbre | Who sings and how they sound (gender, range, timbre). |
| Vocal Style | Delivery, phrasing, and how the performance evolves. |
| Harmony Vocals | Backing vocals, choir, and stacks. |
| Vocal FX | Reverb, delay, widening, and other vocal processing. |
| Primary | Main instruments present for most of the song. |
| Secondary | Supporting instruments and when they enter or drop out. |
| Groove & Foundation Progression | Rhythm, bass, drums, and how the groove changes over time. |
| Textures & Spatial FX | Atmosphere, spatial FX, and section transitions. |
A Lyrics asset is a MusicLyric: a title plus reorderable sections. Lyrics are optional. If you skip this asset, or every section has empty text, the generator treats the song as instrumental.
| Title | Name of the lyric sheet (also used as the default file name when you click New). |
| Sections | Ordered list of parts. Drag to reorder. Use + to add a template, duplicate, or delete. |
| Section | Kind of part: Intro, Verse, Pre-Chorus, Chorus, Post-Chorus, Bridge, Instrumental, Solo, Outro, or Custom (your own heading). |
| Text | Sung lines for that section. Leave empty to emit [instrumental] for that part. |
| Preview | Opens a window with the tagged lyric sheet sent to the model ([Verse], [Chorus], and so on). |
To assign different singers to different sections (for example, a duet) describe both voices in Style β Vocal Details (gender, timbre, and who sings which part).
Add short voice tags on their own lines inside the section text: [male vocal], [female vocal], or [duet].
Caption-only instructions are usually not enough, tags in the lyrics matter too. Keep each tag to one or two words, longer tags may be sung aloud.
[Verse]
[male vocal]
I walked alone through midnight rain
Every street remembers your name
[Verse]
[female vocal]
You left a letter by the door
Said you weren't coming back no more
[Chorus]
[duet]
We were fire, we were flame
Nothing left but ash and shameIn the Style, name both singers and state who opens, for example, a deep male baritone on the first verse, a bright female soprano on the second, both joining the chorus, with no choir or doubled backing vocals.
Section-level switching works best; line-by-line alternation usually fails. Casting is not deterministic, try different seeds and check the first few seconds; if the wrong voice opens, generate again.
Assign a style, optionally lyrics, then Generate. Native backends are tried in order: CUDA β Vulkan β CPU.
| Seed | DiT noise seed. -1 picks a random seed. |
| CFG [1.0-3.5] | Diffusion guidance. Higher follows the style more strictly. Default: 1.7. |
| Peak clip [0-100] | Limits output peaks to reduce distortion. Default: 10. |
| Seed | Language-model sampling seed. -1 picks a random seed. |
| CFG [1.0-3.0] | Language-model guidance. Default: 1.5. |
| Top-k [1-200] | Sampling is limited to the k most likely tokens. Default: 50. |
| Keep models loaded | If enabled, GGUF weights stay in memory between runs (faster repeats, more RAM/VRAM). |
| Preset | The MusicPreset (style) to generate from. New creates an asset; Edit opens Style. |
| Lyrics | Optional MusicLyric. New creates an asset; Edit opens Lyrics. |
| Duration [5-300 s] | Length of the WAV. Default: 60. Output is always stereo 44.1 kHz 16-bit PCM. |
| DiT steps [8-50] | Diffusion transformer steps. Higher is slower and can be cleaner. Default: 30. |
| Seamless loop | After generate, search for a loopable wrap and mark the imported AudioClip as loopable. |
| Models | Folder that contains the five GGUF files. Download fetches them. |
| Output | Destination .wav path (stereo, 44.1 kHz, 16-bit PCM). Pin highlights the clip in the Project window if it is inside the project. |
| Generate | Starts generation. Disabled until a style is assigned and the model files are valid. |
Powered by MiniMax Music 3.
‘Local AI: Voice’ generates speech offline inside the Unity Editor. Invent a speaker (or clone a clip), bake it onto a Voice Preset, then speak lines in Voice Generator. Optional emotion tags change delivery without changing the speaker.
To ensure optimal performance and compatibility, your project must meet the following requirements:
Voice.gguf.
A Voice Preset is a VoicePreset asset: the speaker definition plus baked 24 kHz samples. Create one with New, or pick an existing asset in the object field (+150). Changes are saved on the asset when you edit it.
Generate speaks a fixed test line and stores the dry samples on the preset. Play previews those samples with the presetβs post-FX. The stored bake stays dry for cloning.
| Mode | Instruction invents a speaker. Clone copies a reference clip. Switching mode sets CFG to 4 (Instruction) or 1 (Clone). |
| Gender | Instruction only. Male, Female, or Neutral. |
| Instruction | Natural-language voice description. Do not wrap it in parentheses. Match the instruction language to the spoken text. |
| Audio clip | Clone only. Reference speaker. Required with a transcript. |
| Transcript | Clone only. Exact words spoken in the clip. Required. |
| Seed | Sampling seed. Official examples use 42. -1 picks a random seed each bake (Each take). Random picks a seed now and keeps it. |
How the bake samples the speaker. Stable take (temperature 0, depth temp 0, top-k 1) repeats more closely with a fixed seed. Default uses CFG for this mode, temperature 0.9, depth temp 0.9, top-k 50, top-p 1, and invents more variation.
| CFG [0-8] | Classifier-free guidance. Instruction uses 4. Clone uses 1. |
| Temperature [0-1.5] | Backbone sampling. Official default is 0.9. 0 is greedy. |
| Depth temp [0-1.5] | Depth-decoder sampling. Official default is 0.9. Set to 0 with Temperature 0 for a stable take. |
| Top-k [0-200] | Keep the k most likely tokens. Official default is 50. 0 disables top-k. Use 1 with temperature 0 for greedy. |
| Top-p [0.05-1] | Nucleus sampling. Official default is 1 (off). |
| Stable take | Temperature 0, depth temp 0, top-k 1. |
| Default | CFG for this preset mode, temperature 0.9, depth temp 0.9, top-k 50, top-p 1. |
| Keep models loaded | If enabled, model files stay in memory between runs (faster repeats, more RAM/VRAM). |
| Models | Folder that contains Voice.gguf. Download fetches it. |
| Bake voice preset | Speaks a fixed test line and stores mono 24 kHz samples on this preset. Does not apply post-FX. |
| Play | Previews the baked neutral voice with this presetβs post-FX. |
Optional post-FX stored on the Voice Preset. Voice Generator applies them after creation. Play in Voice Preset applies them to the preview. The bake stays dry.
| Normalize volume | Peak-normalize spoken lines so emotion blocks share a similar level, then the finished take. Default: on. |
| Loudness (LUFS) | Match integrated loudness after FX. Typical speech is around -16 LUFS. |
| Peak limiter | Scale so peaks stay under the ceiling. Default ceiling: 0.99. |
| Compressor | Even out loud and quiet parts. Threshold default -18 dB, ratio 3. |
| Deesser | Tame harsh sibilants. |
| High-pass (Hz) | Cut rumble below the cutoff. |
| Reverb | Short room tail. Mix and decay. |
| Delay / echo | Slap delay. Keep mix low for dialogue. |
| Gain (dB) | Presence boost around 3.5 kHz. |
| Saturation | Soft clip for warmth. |
| Bus compression | Gentle glue on the finished mix. |
| Chorus | Modulated delay. Usually off for dialogue. |
| Bitcrush | Lower bit depth and sample hold. |
| Pitch | Resample by semitones. Changes duration. Positive is higher and shorter. |
| Noise bed | Soft gated crackle under the voice. |
Assign a baked Voice Preset, write the spoken text, then Generate voice. Emotion tags are applied per block. Unknown names and unclosed tags are errors. Tags are not nested. These are the supported tags:
neutral |
calm |
content |
relieved |
happy |
joyful |
amused |
playful |
excited |
enthusiastic |
proud |
confident |
hopeful |
tender |
romantic |
warm |
friendly |
sympathetic |
sad |
melancholy |
lonely |
grieving |
disappointed |
angry |
irritated |
frustrated |
furious |
resentful |
fearful |
anxious |
nervous |
panicked |
surprised |
shocked |
amazed |
curious |
disgusted |
contemptuous |
sarcastic |
cynical |
bored |
tired |
embarrassed |
guilty |
ashamed |
serious |
stern |
authoritative |
determined |
dramatic |
intense |
mysterious |
cold |
detached |
suspicious |
triumphant |
Insert a pause with <silence>1</silence> (greater than 0, up to 5 seconds). Example:
Welcome to the keep.
<calm>The next checkpoint is quiet.</calm>
<silence>1</silence>
<happy>The reward is yours.</happy>| Preset | Baked VoicePreset. Edit opens Voice Preset. |
| Text | Spoken line, optional <emotion> tags, <silence>, and vocal events. |
| Keep models loaded | If enabled, GGUF weights stay in memory between runs. |
| Models | Folder that contains Voice.gguf. Download fetches it. |
| Output | Destination .wav path (mono, 24 kHz, 16-bit PCM). Pin highlights the clip in the Project window if it is inside the project. |
| Generate voice | Speaks from the baked speaker, concatenates segments, then applies the presetβs post-FX. |
Powered by a LORA of Vox CPM 2.
‘Local AI: Moderator’ classifies chat text on-device in runtime. Drop a Moderator component on a GameObject, then call Evaluate, IsFlagged, or Filter to score hateful, abusive, and threat content plus the protected group it appears to target.
.sentis model and tokenizer.json.Flagged as a hint, not a guarantee.
To ensure optimal performance and compatibility, your project must meet the following requirements:
com.unity.ai.inference). The package pulls this in as a dependency.Assets/FronkonGames/LocalAI/Moderator/Demo/Moderator_demo.unity, or try the WebGL demo.Default thresholds are 0.40 (hateful / target) and 0.50 (abusive / threat). Input is truncated at 128 tokens.
| Sentis model | Quantized Moderator .sentis asset. |
| Tokenizer | tokenizer.json as a TextAsset. |
| Backend | GPU Compute is recommended on desktop. CPU always works. On WebGL, GPUCompute is not used. |
| Load on awake | Loads the model when the component wakes up. Disable this if you want to call Load() yourself. |
A category is flagged when its score is at or above the slider. Flagged is true when any content score (hateful, abusive, or threat) is over its limit.
| Hateful | Hate directed at a protected group. Default: 0.40. |
| Abusive | Insults and abuse. Default: 0.50. |
| Threat | Threats of violence. Default: 0.50. |
| Target | Used when you query a target group (Contains / GetScore with ModeratorTarget). Default: 0.40. |
| Log results | Writes each evaluation to the Console. |
The documentation link at the bottom of the inspector opens this page.
Namespace: FronkonGames.LocalAI.Moderator.
using FronkonGames.LocalAI.Moderator;
Moderator moderator = GetComponent<Moderator>();
if (moderator.IsReady == false)
moderator.Load();
if (moderator.IsFlagged(message) == true)
{
// Drop, mute, or replace the line.
}
ModeratorResult result = moderator.Evaluate(message);
if (result.Flagged == true)
{
float hate = result.GetScore(ModeratorContent.Hateful);
ModeratorTarget target = result.TopTarget;
}
string shown = moderator.Filter(message, "[blocked]");Non-blocking (yields one frame so UI can show a busy state):
ModeratorResult result = await moderator.EvaluateAsync(message);| Evaluate | Runs inference and returns a ModeratorResult (scores, Flagged, strongest content and target). |
| EvaluateAsync | Same result, without stalling the current frame before the run. |
| IsFlagged / IsSafe | Convenience over Evaluate. Each call still runs inference. |
| Filter / TryFilter | Returns the original text when safe, otherwise a replacement (empty string hides the message). |
| Contains / GetScore | Query one content category or one target group. Prefer Evaluate if you need several scores. |
| Load / Unload | Load or release the Sentis worker. Safe to call Load more than once. |
| ActiveBackend | Backend the worker is actually using (may differ from Backend on WebGL). |
| Evaluated | Event raised after every successful evaluation. |
IsBusy is true while an evaluation is running. A second call at the same time throws.
Moderator.Evaluate returns scores. result.Flagged is only one policy: any content head (hateful, abusive, threat) at or above its threshold.
The included demo does not stop there. It applies a small extra rule on top of those scores (if a content score is close to its limit, or a target group is very high, it boosts the strongest content score using how many target heads also fire). That is demo-only. It is not used by IsFlagged, Filter, or result.Flagged on the component.
There is no perfect way to turn scores into a yes/no. Chat, lobbies, kidsβ games, and competitive servers all need different trade-offs (catch more hate vs. fewer false positives). Use the scores, thresholds, and target heads to write your own algorithm for that environment. The demo is an example, not a recommendation for shipping.
Trained for 23 languages. The demo and HateCheck eval cover English, German, French, Dutch, Portuguese, Spanish, Italian, and Polish. Other listed languages can work but are not scored in that suite.
| English | German | French | Dutch |
| Portuguese | Spanish | Italian | Polish |
| Danish | Swedish | Finnish | Hungarian |
| Czech | Slovak | Slovenian | Croatian |
| Bulgarian | Greek | Romanian | Lithuanian |
| Latvian | Estonian | Irish |
WebGL cannot create a GPUCompute worker. The component tries GPUPixel, then CPU. Expect several seconds per message in the browser. On desktop GPUCompute it is about 15 ms.
No. Inference runs on the device with Unity Inference Engine. Nothing is sent to a server.
WebGL has no compute shaders, so GPUCompute is not used. The demo falls back to GPUPixel or CPU. Expect several seconds per message in the browser. On a desktop GPU it is about 150 ms.
Generated files are yours to ship in games or media (commercial or not).
You shouldn’t use this assets for other purposes besides generating assets for games or promotional material.
You cannot impersonate real people, plagiarize copyrighted works, or use it for illegal purposes.
It’s your responsibility.
It depends on the platform.
For example, on Steam you must disclose the use of generative AI if any AI-generated content or assets actually ship with your game or appear in your store and marketing materials.
Do you have any problem or any suggestions? Send me an email to fronkongames@gmail.com and I’ll be happy to help you.
If you want to report an error, it helps a lot if you include the Unity log file.
If you are happy with this asset, consider writing a review in the store.
Thanks!