mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
Mirc & Vocal Synthesis #152153 27/06/06 09:12 PM
Joined: Oct 2003
Posts: 68
Y
yamaz Offline OP
Babel fish
OP Offline
Babel fish
Y
Joined: Oct 2003
Posts: 68
Is there a way to make Mirc interact with windows built-in vocal synthesis (eg. Microsoft Sam or whatever else is installed)?

I don't mean to do it in the usual way (with the agent) but like this:

I send to "nick" a special CTCP (e.g. /ctcp nick SPEECH hey, how you doin?).

nick's Microsoft Sam (or whatever else installed in nick's PC) says "hey, how you doin?".

How can I get this stuff work? Thanks a lot

Re: Mirc & Vocal Synthesis #152154 27/06/06 09:24 PM
Joined: Apr 2006
Posts: 400
K
Kurdish_Assass1n Offline
Fjord artisan
Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
well, to make you happy, I'm pretty sure you can do it, I just don't know how to, if noone replies to your thread soon, I'll look into it.


-Kurdish_Assass1n
Re: Mirc & Vocal Synthesis #152155 28/06/06 03:25 PM
Joined: Apr 2006
Posts: 400
K
Kurdish_Assass1n Offline
Fjord artisan
Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
wow, I guess noone replied to this thread, I tried to look for it, but, couldn't find anything on it. sorry, maybe someone will still reply to this thread :P


-Kurdish_Assass1n
Re: Mirc & Vocal Synthesis #152156 28/06/06 06:16 PM
Joined: Oct 2003
Posts: 68
Y
yamaz Offline OP
Babel fish
OP Offline
Babel fish
Y
Joined: Oct 2003
Posts: 68
Thanks smile

Come on guys... any idea? smile

Re: Mirc & Vocal Synthesis #152157 30/06/06 03:27 PM
Joined: Oct 2003
Posts: 68
Y
yamaz Offline OP
Babel fish
OP Offline
Babel fish
Y
Joined: Oct 2003
Posts: 68
up

Re: Mirc & Vocal Synthesis #152158 01/07/06 06:06 PM
Joined: Oct 2003
Posts: 68
Y
yamaz Offline OP
Babel fish
OP Offline
Babel fish
Y
Joined: Oct 2003
Posts: 68
up frown

Re: Mirc & Vocal Synthesis #152159 01/07/06 10:19 PM
Joined: Dec 2002
Posts: 1,527
L
landonsandor Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,527
There's no need to bump threads (ESPECIALLY this soon). If somebody has any hint, tips, suggestions or ideas, they'd offer them to you laugh


Those who fail history are doomed to repeat it
Re: Mirc & Vocal Synthesis #152160 07/07/06 08:43 AM
Joined: Oct 2003
Posts: 68
Y
yamaz Offline OP
Babel fish
OP Offline
Babel fish
Y
Joined: Oct 2003
Posts: 68
Quote:
There's no need to bump threads (ESPECIALLY this soon). If somebody has any hint, tips, suggestions or ideas, they'd offer them to you laugh


After 5 days... up frown

Re: Mirc & Vocal Synthesis #152161 15/10/06 10:29 AM
Joined: Oct 2003
Posts: 68
Y
yamaz Offline OP
Babel fish
OP Offline
Babel fish
Y
Joined: Oct 2003
Posts: 68
any help? come on I seen it done in javascript!

Re: Mirc & Vocal Synthesis #152162 15/10/06 01:32 PM
Joined: Jun 2006
Posts: 508
D
deegee Offline
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2006
Posts: 508
Here's my attempt at it, there's no setting of any options, but speech works (if it's installed of course)
Code:
ctcp *:speech:*:{
  echo -atic ctcp $+([,$nick SPEECH]:) $2-
  sapi.talk $regsubex($nick,/[^\w]/g,) says: $iif($2,$2-,nothing)
}
alias sapi.talk {
  var %s = Spk. $+ $ticks,%a = $iif($1,$1-,I've got nothing to say!)
  .comopen %s SAPI.SpVoice
  if !$comerr { .comclose %s $com(%s,Speak,3,bstr,%a) }
}

Re: Mirc & Vocal Synthesis #152163 15/10/06 01:49 PM
Joined: Apr 2006
Posts: 400
K
Kurdish_Assass1n Offline
Fjord artisan
Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
lol, nice work deegee, I just tested it, and, it worked perfect, laugh, nice going.


-Kurdish_Assass1n
Re: Mirc & Vocal Synthesis [Re: Kurdish_Assass1n] #166617 13/12/06 12:35 AM
Joined: Oct 2003
Posts: 68
Y
yamaz Offline OP
Babel fish
OP Offline
Babel fish
Y
Joined: Oct 2003
Posts: 68
Yeah thanks a lot! It's perfect smile Way to go man, way to go!

Re: Mirc & Vocal Synthesis [Re: yamaz] #166641 13/12/06 12:54 PM
Joined: Oct 2003
Posts: 68
Y
yamaz Offline OP
Babel fish
OP Offline
Babel fish
Y
Joined: Oct 2003
Posts: 68
There's only one problem: while a sentence is played, mirc is totally locked. You can't even type a char. Is there a way to avoid that?

In the meantime I edited the deegee script and added some options (like On o Off and stuff like that):

alias spon { /set %speech 1 | echo -a Speech is now ON }
alias spoff { /set %speech 0 | echo -a Speech is now OFF }
alias sp { .ctcp $active SPEECH $1- | echo -ati $me $+ : «7 $1- » | sapi.talk $iif($1,$1-,nothing) }
alias sps { .ctcp $active SPEECH $1- | echo -ati $me $+ : «7 $1- » }

ctcp *:speech:*:{
if %speech == 1 {
if # { echo # $timestamp $nick $+ 7@ $+ # $+ : «7 $2- » | .halt }
else { echo -ati $nick $+ : «7 $2- »
sapi.talk $regsubex($nick,/[^\w]/g,) : $iif($2,$2-,nothing)
.halt }
}
else echo -ati $nick $+ : «14 $2- » (/spon to activate Speech) | .halt
}

alias sapi.talk {
var %s = Spk. $+ $ticks,%a = $iif($1,$1-,nothing to say!)
.comopen %s SAPI.SpVoice
if !$comerr { .comclose %s $com(%s,Speak,3,bstr,%a) }
}

/spon to activate this shit, /spoff to set it off
With /sp you hear the voice reading the sentence you send, with /sps you hear nothing

P.S.
with high quality voices like AT&T or Loquendo this stuff is GREAT smile

Re: Mirc & Vocal Synthesis [Re: yamaz] #166694 14/12/06 03:45 AM
Joined: May 2005
Posts: 449
bwr30060 Offline
Fjord artisan
Offline
Fjord artisan
Joined: May 2005
Posts: 449
Yeah, you need to multithread applications to stop that from happening. I can't work on this right now, or during the day tomorrow, but if you can wait until over the weekend, I can write you a DLL that uses Microsoft Speech and would be multithreaded to avoid that problem. Let me know. smile

Also, let me know what other functions you want in the dll like "on" and "off" features and I'll see what I can do.

Last edited by bwr30060; 14/12/06 03:46 AM.
Re: Mirc & Vocal Synthesis [Re: bwr30060] #166722 14/12/06 03:30 PM
Joined: Oct 2003
Posts: 68
Y
yamaz Offline OP
Babel fish
OP Offline
Babel fish
Y
Joined: Oct 2003
Posts: 68
Originally Posted By: bwr30060
Yeah, you need to multithread applications to stop that from happening. I can't work on this right now, or during the day tomorrow, but if you can wait until over the weekend, I can write you a DLL that uses Microsoft Speech and would be multithreaded to avoid that problem. Let me know. smile

Also, let me know what other functions you want in the dll like "on" and "off" features and I'll see what I can do.


It would be useful to choose if a sentence sent while another one is still playing can interrupt the first one or goes on queue. I hope it's clear, english is not my mother language smile

Re: Mirc & Vocal Synthesis [Re: yamaz] #166769 14/12/06 11:50 PM
Joined: May 2005
Posts: 449
bwr30060 Offline
Fjord artisan
Offline
Fjord artisan
Joined: May 2005
Posts: 449
I understand what you're saying. I'll have to think about how to do this. I got the basic part of the DLL done, but it's crashing mIRC even though it's threaded. I can't figure out why it's doing that yet. I'm not sure how I'd make a queue system either, but I'll think about it.

I'm currently using the DLL to read everything ON TEXT, so the problem could be that it's just too much text for the DLL to handle. If you wanted mIRC to say everything, you could just use the built in speech agent. Maybe this DLL will still work if I only use it in scripts that trigger on specific words. It depends on how you want to use this.

Last edited by bwr30060; 14/12/06 11:52 PM.
Re: Mirc & Vocal Synthesis [Re: deegee] #166770 15/12/06 12:04 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
I liked this thing, but any way to speed up the text spoken a bit? smile "make it sound less robotic" smile playing around a bit with it, but cant figure out how to speed it up smile


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: Mirc & Vocal Synthesis [Re: sparta] #166771 15/12/06 12:54 AM
Joined: May 2005
Posts: 449
bwr30060 Offline
Fjord artisan
Offline
Fjord artisan
Joined: May 2005
Posts: 449
Yeah, you can change the speed. I'll have to add a new subroutine to the DLL to do that, but it shouldn't be hard. I don't think you can change the speed of the voice while it is talking, but you can change it and the change will take effect the next time it speaks. I'm looking at these new boards and wondering if there's a way to attach a file to the post, but I don't see it. I host a website on this computer, mostly for online avatars and sharing files like this, so I can just put a link to the two files you'll need once I add that other part.
I've been running this DLL some more and it hasn't crashed on me again. Maybe I'll post again with a link to it and the instructions on how to use it and anyone who wants to can get it and "beta test" it for me. smile

Re: Mirc & Vocal Synthesis [Re: bwr30060] #166774 15/12/06 02:00 AM
Joined: May 2005
Posts: 449
bwr30060 Offline
Fjord artisan
Offline
Fjord artisan
Joined: May 2005
Posts: 449
I seem to be having problems using the DLL on the laptop. I wrote and published the DLL on this computer and I guess it automatically registered it with COM when it built. I used regasm, but /comopen still won't work on the laptop. Maybe it's because I haven't installed that specific version of the speech agent on the laptop. That seems like it shouldn't matter though, because I'm not even trying to use the speech agent DLL at that point, just trying to /comopen my own DLL. I'll look into it some more. I'd like to be able to write an installer package that you can run that would register the DLL on your computer, but I don't know if it can be done and how. Maybe tomorrow evening or this weekend, I'll install the speech software and try again to register the DLL.

If anyone wants to give this a try, you can get my DLL at My Microsoft Speech Agent DLL
You may also want the other DLL that goes with it, the Microsoft DLL for the Speech Agent. I don't know if that will even work. You might have to register both DLLs, or you may be better off installing the Microsoft SAPI seperately. If you want to get the Speech Agent DLL from me, you can get that here

I guess I should show you an example of how to use it. You'll get the idea from this small section.
Code:
on *:text:*:*:{
  if ($com(speech)) { noop $com(speech,speak,3,bstr,$1-)) }
}

On the START event, you'll need "comopen speech speech.speech". I haven't tested the section about changing the speed, but here's an example alias that should work.
Code:
alias changespeed {
noop $com(speech,speed,3,bstr,$2))
}


The values for speed are from -10 to 10.

Last edited by bwr30060; 15/12/06 02:11 AM.
Re: Mirc & Vocal Synthesis [Re: bwr30060] #166776 15/12/06 02:34 AM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
You don't need a dll for that, one just has to use $comcall instead of $com. All objects and methods are accessible via $comcall, including things like Rate (mentioned earlier under a different name).


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Page 1 of 2 1 2