Half-Life Guide

Speak And Spk Commands for Half-Life

Speak And Spk Commands

Overview

sv_cheats 1 is not required. Can be used in multiplayer, but other players can’t hear it.

START

These console commands emit sounds that are client side only.

“speak” is a goldsrc/source debug console command written for Half-Life 1, for more efficient sentence mixing tests that go into the game file sentences.txt.

“spk” is a goldsrc only debug console command written for Half-Life 1, although I’m not exactly sure what is the purpose of this command, it’s possibly a failed command because it’s barely used anywhere and unused in source engine games. However I’ve heard that it has been used in amxmodx plugins for playing client side sounds on all players.

“speak” console command meaning
Speak: Plays client side sounds from a game’s sound paths [sndpath]. By default, it is vox/[sndname] (speak [sndname])

“spk” console command meaning
Spk: Same as the above.

Syntax and punctuation.

speak “word word word”
speak “word, word. word”
speak word.word.word
speak word,word,word.

speak “word, word” <– comma
speak “word word. word” <– period (dot)
“,” plays the sound Comma.wav from the character’s voice path direction.
“.” plays the sound Period.wav from the character’s voice path direction.
Punctuation sounds are usually for stopping or clearing out sounds, so comma.wav or period.wav will play after the comma/period, in order to stop unwanted or looping sounds from playing. Comma waits a bit to play the next sound, period waits a little bit longer to play the next sound. If the comma.wav or period.wav doesn’t exist in the character’s voice path, it’ll play it from another path, or not play at all.
Speak/spk sounds are affected by the in-game DSP. DSP can be changed with console commands like room_type “value”.

All the sounds can be played from last sound path folder you typed:
speak “[sndpath]/word word word”
or
speak “[sndpath]/word word word [sndpath]/word word word”

Sound Paths

speak sound/[sndpath]/[sndname] <– WRONG.
speak [sndpath]/[sndname] <– RIGHT!
(Don’t use sound/ after speak/spk)
[sndpath] is already located at sound/
[sndpath] is unnecessary, as it is vox/[sndname] by default.
Sounds can’t be played from [Media] folder.
(mp3 sounds can’t be played by “speak” nor “spk”.)

If you use “speak” to play “sound1” then “sound2”, “sound2” gets in place of “sound1”.
“sound1” and “sound2” can be the same sound, and it still works this way.
It can’t play 2 sounds at the same time, and it can’t play 1 sound at the same time.
Then what does “spk” do?

This command can play sounds together.
If “sound1” is playing and “sound2” is playing, they play together. In singleplayer, when you open the menu and game pauses, it will play all sounds you’ve entered into the console at the same time once you unpause the game. This can become increasingly loud. In multiplayer, you could hear that in action by binding the command.
While “spk” plays a sound, “speak” can play it’s own sound and work as it works itself, it doesn’t interfere with “spk”. “spk” has a limit of playing sounds, so if you spammed looping sounds with “spk” you won’t be able to play more sounds with “spk”, so use console command “stopsound”, it’ll allow you to play sounds with “spk” again.

Functions

“speak” and “spk” have some functions. (func+value)
When using “speak” with a function, it plays sounds as it normally would, just with changes that a function does. When using “spk” with a function, it plays sounds as it normally would, just with changes that a function does, which means you can play the same sound with different functions, and also 2 different sounds with different or same functions.

(s) means start (At which point does the sound start?)
speak “barney/ambush(s50)” the sound will start at “…We better be careful”

(e) means end (At which point does the sound end?)
speak “barney/ambush(e50)” the sound will end after “I smell an ambush…”

Start value and end value are not seconds nor ticks. It’s a wave offset percentage (0-100) (sound’s length).
(s0/100) and (e0/100) do nothing; (s99) and (e1) plays 1% of the sound.
You can use single to clip the sound or both to trim the sound. It also works in source engine.

(p) means pitch
speak “hello(p150)” – high pitch
speak “hello(p100)” – default pitch
speak “hello(p50)” – low pitch
It also works in source engine.
(p0) does nothing; (p1) is the lowest pitch, there’s no highest pitch because there’s no high pitch limit i.e. you can use (p1000). However in source engine, the limit is 800.

(t) means time compression (tempo/speed/rate)
Time compression has been picked as the goldsrc engine’s speed change function as it has the best performance. It can only speed up. What it does, as the value gets higher, it cuts out more “even/odd” sound bits and welds the others together.
speak “scientist/scream07(t30)” – fast scream
speak “scientist/scream07(t50)” – faster scream
If the sound itself is long, it starts to sound blatantly compressed, so I recommend using smaller value. Bigger value sounds more natural with short sounds.
(t0) does nothing. (t99) is the limit, I think. Because at 100 and so on it plays the sound normally then stops early and the bigger value makes it stop more lately.
It doesn’t work in source engine.

(v) means volume (amplitude)
speak “ambience/siren(v100)” normal volume siren
speak “ambience/siren(v30)” low volume siren
(v0) plays the sound without any amplitude. The game is still aware of this sound playing.
(v100) is the highest volume. It also works in source engine.

Tips

1st. speak “hgrunt/(t50) fire! in! the! hole!”
Now human grunt will say “Fire in the hole!” a bit faster. You can replace (t50) with something else, and also without hgrunt/ and !, the default sound path vox/[sndname] will be used.

2nd. speak “[sndpath]/(func+value) word word (func+value) word”
All sounds will play with the function which you’ve typed at the start of [sndpath] or string.
Example:
speak “hello (t50) gordon freeman (t0) go to sector c”
“Hello gordon freeman, go to sector c.”

3rd. speak “scientist/scream01(p50 t50)”
This connects 2 functions together and processes multiple functions. That scientist’s scream sound becomes fast yet low pitched.

4th. Multiple functions with 2 connected functions, also can be as the 1st and 2nd tip:
speak “(s50 p150) barney/c1a4_ba_octo3.wav”

5th. The structure can be whatever you want, in both goldsrc and source engine.
speak “vo/npc/male01/hacks01(p200), (p50) hacks01 (e50) hacks02 (p200 s50) hacks01”
speak “barney/ambush(p200), (p50) ba_attack1 (e50) ba_bring (p200 s50) ba_attack1”
So, play around with it.

Binding

Speak/spk commands used as a sentence/sound mixing i.e. the ones that require quotes to have spaces in between instead of punctuation can’t be bound to a key. But you can bind it anyway, with a configuration file aka config format of .cfg
bind [key] “exec [cfg]” <– To execute a configuration file that has a row of console command lines in one text file located at steamapps/half-life/valve/.
(Not config.cfg, create a new one with unique name.)

Have fun.

SteamSolo.com