AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How do I use VOX speech engine? (https://forums.alliedmods.net/showthread.php?t=302831)

suhdude 11-12-2017 08:55

How do I use VOX speech engine?
 
I want to use the vox speech engine in my plugin, to play sentances on round start etc.
I have tried to copy spk \'vox/hello and die\' and paste it in console, but it only says "hello"

How do I use this?

Bonus question, how do I precache multiple sounds?

Thanks

aron9forever 11-12-2017 09:22

Re: How do I use VOX speech engine?
 
okay, so first of all, there is no precaching required for vox, as you are merely executing spk commands on clients (which work even in main menu of game with no precache whatsoever)

it only supports a dictionary of words, not everything, here is a decent dictionary of words and sentences supported https://pastebin.com/F7BicjiD

to execute these in a chain, you need to use double quotes, so in console it would be spk "ass ass hello"
with amxx it would be client_cmd(id, "spk ^"ass ass hello^""); as ^ is used by default instead of \ for escaping (in PAWN)

suhdude 11-12-2017 09:53

Re: How do I use VOX speech engine?
 
Quote:

Originally Posted by aron9forever (Post 2560002)
okay, so first of all, there is no precaching required for vox, as you are merely executing spk commands on clients (which work even in main menu of game with no precache whatsoever)

it only supports a dictionary of words, not everything, here is a decent dictionary of words and sentences supported https://pastebin.com/F7BicjiD

to execute these in a chain, you need to use double quotes, so in console it would be spk "ass ass hello"
with amxx it would be client_cmd(id, "spk ^"ass ass hello^""); as ^ is used by default instead of \ for escaping (in PAWN)

Thank you, the first two things were understood.
I wanted to know about precaching because I can only put one of these in my script:
public plugin_precache() precache_sound("radio/bombpl.wav");

Thank you for clearifying the usage, I laught quite hard at "ass ass hole" btw.

wickedd 11-12-2017 10:18

Re: How do I use VOX speech engine?
 
Quote:

Originally Posted by suhdude (Post 2560009)
I wanted to know about precaching because I can only put one of these in my script:
public plugin_precache() precache_sound("radio/bombpl.wav");

Read this

HamletEagle 11-12-2017 11:11

Re: How do I use VOX speech engine?
 
Quote:

Originally Posted by suhdude (Post 2560009)
Thank you, the first two things were understood.
I wanted to know about precaching because I can only put one of these in my script:
public plugin_precache() precache_sound("radio/bombpl.wav");

Thank you for clearifying the usage, I laught quite hard at "ass ass hole" btw.

Add { } after plugin_precache: BOOM, you can add as many lines as you want.

aron9forever 11-12-2017 12:16

Re: How do I use VOX speech engine?
 
Quote:

Originally Posted by wickedd (Post 2560015)

I wouldn't link this just because it might make someone think you need arrays and iteration to precache multiple files

This should do for his question
Code:
public plugin_precache() { precache_sound("misc/opera.wav"); precache_generic("sound/misc/music.mp3"); //... }

DarthMan 11-12-2017 12:35

Re: How do I use VOX speech engine?
 
Quote:

Originally Posted by aron9forever (Post 2560002)
okay, so first of all, there is no precaching required for vox, as you are merely executing spk commands on clients (which work even in main menu of game with no precache whatsoever)

it only supports a dictionary of words, not everything, here is a decent dictionary of words and sentences supported https://pastebin.com/F7BicjiD

to execute these in a chain, you need to use double quotes, so in console it would be spk "ass ass hello"
with amxx it would be client_cmd(id, "spk ^"ass ass hello^""); as ^ is used by default instead of \ for escaping (in PAWN)

EMIT_SOUND can be used as well, I guess. On TFC it works ffine, but it must be set on the right channel.

Hectik17 11-13-2017 01:10

Re: How do I use VOX speech engine?
 
What if you wanted to have a spk sentence play in the speach menu. I have a sentence that needs to be in quotes but it won't play the whole sentence. Only the first word plays. spk "i have no i nice(s40) left _comma _period five(e40) back(s75), yourself call(e25) us(e50) coolant(s60)"

Or when trying to bind it won't work: bind "p" spk "i have no i nice(s40) left _comma _period five(e40) back(s75), yourself call(e25) us(e50) coolant(s60)"


All times are GMT -4. The time now is 17:19.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.