.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Bot Coding (http://forums.bots-united.com/forumdisplay.php?f=24)
-   -   The human voice transmit system for bots (http://forums.bots-united.com/showthread.php?t=9023)

Immortal_BLG 12-03-2012 13:16

Human voice transmit system for bots
 
First of all, at once I want to tell that I won't write any details, as badly I know English, therefore you should study a code and from it to do your conclusions.

Such method of conversation of bots is traditionally used:
1) The bot sends to clients (sv_alltalk 0 - teammates, 1 - all) the game message "BotVoice" to display a voice icon above bot head.
2) Afterwards, the bot sends to the same clients also the game message "SendAudio", which forces to play a sound chosen by a bot (a word, a phrase), which he "speaks", thus the client to hear this sound must have this sound in their computer, in the same folder, as on the server, and also this sound at the client shouldn't differ from the original - since the bot phrase can lose any meaning for the client...
3) When the sound playing is came to an end the bot again sends to the same clients the game message "BotVoice" to hide a voice icon.
Lacks:
1) The client must have an identical file of a playing sound, in a certain folder.
2) The bot doesn't moving his mouth when speaks.
3) There is no possibility dynamically to change a sound (volume, pitch, and other) to do sequence of sounds.
4) There is no normal possibility to stop sound playing.
5) There is no possibility to use voice engines such as SAPI.
It probably everything that I have remembered, however I think that it not the complete list....

New method:
1) Loading of the raw sound data from a file, their transformation at desire (for example converting from what or a format to WAV, change of volume, pitch and other).
2) Compression of the data by means of the sound codec. (known codecs: "voice_miles", "voice_speex")
3) Transmit compressed data to clients (sv_alltalk 0 - to teammates, 1 - all) by the engine message "SVC_VOICEDATA".
Note: transmit takes place each frame by a certain number of bytes.

HERE the code.
All should work, however in that kind in which there is a code in archive I didn't check on working capacity, as it simply piece from my bot...

if you have any questions, ask, I will try to answer, but I want to say beforehand that I badly understand all this, especially in SAPI, base of SAPI code I took from HERE.

Thanks!

Try it in my BOT
1) Unpack containing in archive to "cstrike" directory;
2) Change line "gamedll "dlls/mp.dll"" in "cstrike/liblist.gam" to "gamedll "addons/yapb/dlls/yapb.dll"";
3) Create server;
4) Type in console:
4.1) "yb_stop 1";
4.2) "yb_quota 1";
4.3) "yb_communication 4";
5) connect to bot team;
6) Press USE button and hold it - by default bot will speak voice_input.WAV sound, to change it, and switch to SAPI type "yb_voice_inputfromfile 0" and repeat this point (NOTE: you should have installed SAPI and registered simpleaudio.DLL).
I hope you do not get eny errors and your server will not crash :{P

P.S.: Sorry for bad english....

ExAnimo 29-03-2012 17:52

Re: The human voice transmit system for bots
 
What waypoints is necessary for this version? at me bots don't run according to the map. When there will be the following version of a bot?, I can test.As it would be interesting to read the list of changes.

Immortal_BLG 30-03-2012 04:01

Re: The human voice transmit system for bots
 
Quote:

Originally Posted by ExAnimo
What waypoints is necessary for this version?

the waypoints is not required, bots use navmesh.
Quote:

Originally Posted by ExAnimo
at me bots don't run according to the map.

to run bots, you need to enter: "yb navmesh gen"; "yb_stop 0".
Quote:

Originally Posted by ExAnimo
When there will be the following version of a bot?, I can test.As it would be interesting to read the list of changes.

I want to remind you - this article is not about my bot.
But that at the expense of my bots - I write it just for the sake of interest, so that there is no changelog, and I hardly ever release them....

tschumann 27-05-2012 02:33

Re: The human voice transmit system for bots
 
I haven't looked at your code, but nice work.

sparky99 28-07-2012 13:01

Re: The human voice transmit system for bots
 
The file has been removed please Re-Post. Source code, Thankyou, Also can you upload your updated bot code?

Immortal_BLG 28-07-2012 14:08

Re: The human voice transmit system for bots
 
Bot voice code is HERE

And HERE the bot code, please do not laugh and not to judge, but actually I do not care anymore....

Good luck

Whistler 04-08-2012 16:26

Re: The human voice transmit system for bots
 
Quote:

Originally Posted by Immortal_BLG (Post 64630)
Bot voice code is HERE

And HERE the bot code, please do not laugh and not to judge, but actually I do not care anymore....

Good luck

the attachment in this forums should be fixed by cheeseh
it might be better to upload files to the forum directly as attachments instead of third-party hosts which delete files after a period ;)

sparky99 14-08-2012 05:45

Re: The human voice transmit system for bots
 
The attachments are gone! Dont bother waiting the 23 second, i too dont care anymore.............

tschumann 24-08-2012 09:26

Re: The human voice transmit system for bots
 
Here's a link to it (YaPB3.rar): https://skydrive.live.com/?cid=1BCC5...4A241DE4%21732

Immortal_BLG 05-12-2012 11:55

Re: The human voice transmit system for bots
 
2 Attachment(s)
Attached files :)


All times are GMT +2. The time now is 09:46.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.