🎙️ Voice Commands
Players can open the phone, answer calls, toggle the flashlight and more by voice. Recognition runs locally in the player's game, with no API key and no audio uploads.
Install the optional model
The phone does not include a voice model and never downloads one by itself. The server owner installs it once. Players cannot install server files, so send this section to the owner.
-
Download vosk-model-small-en-us-0.15.tar.gz (English). All models and notes are on the voice models release.
-
Upload the file without extracting or renaming it to the
ui/build/voice/folder of your phone resource:Use your real folder name if you renamed the resource. Do not put models in the props resource.
-
In
config/config.voiceCommands.lua, keep the defaults:luaIf you already saved settings in the admin dashboard, enable English there too.
-
Restart the phone resource (
restart yseries,restart yphoneorrestart yflip-phone). -
Test in game: open Settings > Voice commands, choose English, enable it and wait for Ready. Hold your talk key and say
phone open.
The feature is on by default. If the selected model is missing, players see setup instructions and recognition does not start. Set Config.VoiceCommands.Enabled = false to hide and disable it.
Spanish
Spanish profiles and saved preferences still work. Put vosk-model-small-es-0.42.tar.gz unchanged in the same ui/build/voice/ folder before players select Spanish. If you only offer English, disable Spanish in the dashboard.
Checksums
Building the UI from source
Rebuilding replaces ui/build, including any models in it.
- Back up your model archives outside
ui/public,ui/buildand any release folder. - Run
npm ciandnpm run buildinui. - Upload the models to
ui/build/voice/again.
The build rejects archives in ui/public/voice, and release packaging skips model files. Do not add models to a distributed source ZIP.
Privacy and licensing
- Recognition uses vosk-browser on the player's machine. Audio and transcripts are never uploaded.
- The server only receives the action ID, the language and the config revision.
- Both models use the Apache License 2.0. They are the original files, repackaged as
.tar.gzfor vosk-browser. Attribution is inui/build/voice/NOTICE.txtandLICENSE-2.0.txt, and on the download release.
Player and admin controls
- Open Settings > Voice commands on YOS or Humanoid.
- Enable Voice commands, pick a language and allow microphone access if asked.
- Wait for Ready. Hold your talk key, say
phone openorphone close, then release it.
Default English commands (replace phone with your keyword):
To change your keyword, type a new one in the same settings and press Save. With assistant, phone open becomes assistant open. Reset restores the default. The keyword alone does nothing; say the full command.
Good to know:
- Preferences are saved on your machine.
- You use one recognition language at a time. It is separate from the phone's display language.
- Turning the feature off releases the microphone.
- Nearby players still hear your commands through voice chat.
If recognition fails, check the error in Settings, your microphone permission, the selected language and the example commands shown there.
Open the admin dashboard (access command) and select Voice commands. From there you can:
- enable or disable the feature for the whole server
- choose available languages, the default language and default keywords
- add, edit, disable or remove commands
Add a command: enter a unique ID, pick its function, add a phrase such as {keyword} help, enable it and save. {keyword} becomes each player's keyword. Phrases without it are used as written.
Tips:
- Give each command its own phrases.
- Every enabled language needs at least one enabled command.
- Add rejection phrases for speech to ignore, such as
do not open {keyword}. - Start with the default confidence of
0.60. Raising it can reject valid speech.
Saved changes apply right away. New Lua functions and new language models need a resource restart. If another admin saved first, refresh before saving.
Where settings live. The dashboard saves to server/custom/voiceCommands.runtime.json, which overrides config/config.voiceCommands.lua. One exception: Config.VoiceCommands.Enabled = false always disables the feature and hides it in Settings on both phone systems.
When updating, keep the runtime file, your custom functions and your models. Saved configs keep their command list after an update, so add any new default commands yourself in the dashboard.
Add functions to the existing YSeriesVoiceActions table in:
Keep the existing entries. Example:
Restart yseries, pick show_help in the admin function dropdown and give it a phrase such as {keyword} help.
- Functions receive the player's server source.
- Return
trueon success, orfalse, 'Reason'when the action is unavailable. - Check permissions and gameplay conditions inside the function.
- For client behaviour, trigger an event handled in
client/custom.
The function list loads at resource start. Before removing a function, remove or reassign the commands that use it. This file is outside escrow, so you need no extra resource and no UI rebuild.
Each language needs a Vosk model, a ready-made pack that turns speech into text. You do not train it or record samples.
-
Download a small model for your language from the official Vosk list. It must support dynamic vocabulary (configurable phrases). Not every model does.
-
Convert it to
.tar.gz. Vosk usually ships ZIP files, which the phone cannot load. Extract the ZIP outside the resource, open a terminal in the folder that contains the extracted model folder, and run:shReplace
model-folderwith the folder's name. The archive must hold one model folder witham/final.mdl,conf/model.conf,conf/mfcc.conf, the graph files and anyivectorfiles. Renaming a.zipto.tar.gzdoes not convert it. Keep the model's license with its files. -
Install the archive in
ui/build/voice/. For source builds, upload it after building. Never useui/public/voice/. -
Register the language in
Config.VoiceCommands.Languagesinconfig/config.voiceCommands.lua. Copy the English profile, then change the language ID,Label,ModelUrl(for examplevoice/my-model.tar.gz),KeywordandRejectionPhrases. LeaveEnabled = falsewhile you prepare it. -
Restart
yseries. In the dashboard, add the language, enter translated phrases, assign their actions, enable it and save.
Players can now pick it in Settings.
Keywords and phrases must use words the model knows. Adding phrases does not teach it new words. Custom local voice/*.tar.gz filenames work; remote model URLs are not supported.