Speech
constSpeech:object
Defined in: client/api.d.ts:8764
Spoken incantations from a fixed list built into the client, heard on the voice chat’s microphone. Nothing is cast: a resource listens for ids and decides what each does. A push-to-talk player is heard only while transmitting, a voice-activated one whenever a resource listens. Recognition runs on this machine and sends nothing. A resource’s list ends when it stops.
Type Declaration
Section titled “Type Declaration”incantations()
Section titled “incantations()”incantations():
string[]
Every incantation id this client can hear: the spell’s gameplay name, as Spells.loadout() names it. Expulso is said “Bombarda”, Imperius “Imperio” and Wingardium “Wingardium Leviosa”. Fixed in the client.
Returns
Section titled “Returns”string[]
isAvailable()
Section titled “isAvailable()”isAvailable():
boolean
Whether this client can hear incantations now: the speech model is installed and has not failed to load, and the voice chat microphone is open. False outside a session and with voice chat off or no microphone.
Returns
Section titled “Returns”boolean
listen()
Section titled “listen()”listen(
ids):void
Listens for these incantations, replacing this resource’s list. Throws a TypeError for an id Speech.incantations() does not list.
Parameters
Section titled “Parameters”string[]
Ids from Speech.incantations(); an empty list stops.
Returns
Section titled “Returns”void
stop()
Section titled “stop()”stop():
void
Stops this resource listening, as Speech.listen([]) does.
Returns
Section titled “Returns”void