How to Have Working Speech Support in mIRC
By Veli-Pekka Tätilä
Alasdair - broken links and unavailable files have been removed from this page and are lost forever.
One of the greatest features in the popular IRC-client mIRC is the speech output support, especially for visually impaired and blind users. But speech output can be tricky to set up and voice selection still requires some witty workarounds. This page helps you to get working speech support in mIRC with Microsoft's TTS and L&H British English engines, especially in older mIRC releases as well as providing lots of info on speech support in mIRC in general.
You Might not Need to Read This After All
Setting up agents as detailed here is a bit of a hack and chances are that easier alternatives exist. Check out the following before reading on:
- Recent mIRC releases let you specify the language in which the agents should speak unlike earlier versions. This should work without special agent files, provided that you have a speech synth supporting the language you selected.
- The mainstream screen readers offer built-in or user created map, set and script files for mIRc support with a screen reader program.
- Mirc Speech is a blind friendly screen reader script pack and reader agnostic, accessible frontend to mIRC itself (search for TheFudge.NET downloads: to locate it on the page).
If none of these choices is satisfactory, let's go on with the agent files.
mIRC supports Microsoft's Agent technology which allows software developers to add animated, interactive characters to their programs. MS Agent, in turn, supports Microsoft's SAPI (speech application programming interface) which provides speech output capabilities for MS Agent characters with any SAPI compatible speech engine. So MS Agent support in mIRC means that mIRC will support SAPI compatible speech as well. So mIRCC is able to deliver all channel messages as well as warnings and other messages as speech. No need for a screen reader and virtual cursor for finding out what the others are saying.
In real life, having good speech support in mIRC is far from simple. Normaly, the application supporting agents, in this case mIRc, will have the final word on what speech engine and voice is used. Due to mIRC's current agent implementation, it only specifies the language for the speech engine but neither the voice to be used, nor the speech engine. So you need a custom agent file for selecting a given speech engine and voice. I have made some visually really minimalistic custom agents for using Microsoft's TTS (text to speech) engine as well as L&H British English in mIRC, more about them later.
Before You Begin
The first thing to do is to download mIRC. After installation you should launch the program and setup some basic IRC options such as your personal information (I am not going into details here, refer to mIRC help or e-mail me directly for more information).
You can always get the latest version of mIRC at http://www.mirc.com/get.html . On the mIRC download page you just select a downoad location nearest to you and the download should start automatically. The reason why I am not linking to a download server for easy downloading is that you would miss possible mIRC updates if I did so.
Installing MS Agent and SAPI Suppport
In order to have any agent characters at all in any application
supporting MS Agent technology, you must have the Microsoft Agent
core components installed. recent Microsoft operating systems (ME,
2k, XP) have these components built-in so only Windows 95 and 98
users need to download these components, and only if you don't
already have any apps supporting MS Agent. Anyway, here's the
direct download link from Microsoft's Web site:
Download MS Agent Core Components
The next component you might probably want to download is Microsoft's SAPI 4.0 runtime support (SAPI stands for speech application programming interface). Many commercial and free speech engines support SAPI and without Ms Agent and SAPI support as well as a SAPI compatible speech engine, mIRC will not speak anything.
I think Windows 2000 is the only operating system that has the SAPI 4.0 support already installed. XP has indeed SAPI 5.0 support built-in but no SAPI 4.0 support. And since the speech engines we are going to use require SAPI 4.0, you'll need to download it even if running XP. Don't worry, both version 4.0 and 5.0 can happily co-exist. In brief, Windows 9x, NT and XP users, Get SAPI 4.0 runtime support unless you already have a working SAPI compatible speech application installed.
As to the voices, I'd recommend Microsoft's SAPI voices or LH Brittish if you'll be using mIRC in English. Besides the special agent files I made will select these voices directly. So you need to get either one or more of Microsoft's american english voices (Mary, Mike and Sam) or the L&H British English TTS with one male and one female voice. Once again, Windows 2000 users will benefit in the sense that a SAPI 4.0 compatible voice Sam is already installed. If you have a slow Internet connection, du not wish to download additional Microsoft voices and have Windows 2000 installed, you may skip to the Custom Agents section directly. Note that Windows XP also has the MS voice Sam installed but unfortunately it's for SAPI 5.0 so you need at least one SAPI 4.0 compatible voice.
I've noticed the download links for the individual SAPI 4 voices
that used to be on this page went down some time ago. I'm guessing
MS wants everyone to move onto using SAPI 5 as they provide no SAPI
4 downloads on there site anymore and besides most MS speech engine
downloads on other sites seem to be for SAPI 5 these days. I did
some GOogle searching, however, and managed to find a site still
having all of the SAPI
4 voices in one package. .
As for the L&H British English it can still be found here:
As far as non-English, free speech synths are concerned, you've basically got two options. Firstly, I'd recommend browsing to Microsoft's agent download page in which you can choose to download free L&H speech synths in several languages.
As I mentioned earlier support for a specific speech engine and voice in mIRC requires a specific agent character. I have made up to five custom agents my self. The size of the agent files is only few kilobytes because I have replaced all animations with a single 64x16x256 bitmap. Minimalistic, eh? I felt that a single bitmap would do just fine as the only use for these agents is to select the right speech output engine and voice in mIRC.
Note that each voice requires it's own agent file. The reason why I didn't make agent files for the MS Robosoft voices was that I felt most people wouldn't seriously use them anyway.
At the moment, the following agent files are on this site:
- mary.acs An agent using the voice Ms Mary
- mike.acs This agent will pick MS Mike as the voice for speech output
- sam.acs This agent Chooses MS Sam
- lhbef.acs An agent for selecting the L&H British English female voice for speech output
- lhbem.acs The rather complicated name of this agent stands for L&H British English Male.
Once you have downloaded one or more agent characters it's time to copy them to the MS agent Character directory (also called a folder). If the installation of MS Agent support went all right, you should have the following directory: [drive]:\]Windows directory]\msagent\ where [drive] and [Windows directory] refer to your windows location (e.g. the drive could be c and the windows directory windows or winnt ). I think you should also have the sub-directory Chars under Msagent . If there is no such directory you have to create it yourself. Then just copy the agent character files you downloaded to the \chars directory (in most cases c:\windows\msagent\chars\ )and the next time you run an agent-aware app it will probably auto-detect your new agents. At least mIRC does.
Setting Up mIRC
This chapter is about setting up the speech support in mIRC. First start mIRc and choose to continue evaluating the program in the dialog that pops up. Now you should be in the preferences dialog at the connect category. Locate the tree control and press the letter s so that mIRC jumps to the sounds section. Then use the right arrow to expand that category and press the letter a to jump to the agents sub-category. If there is no such category, something went wrong with your agent installation.
The agents tab is the tab in which you can adjust all agent related settings. Use the agent character list box to select a desired character. For English use choose one that you have downloaded on this page, for non-English use select any agent file. Also, clear the following check boxes:
- Idle Effects
- Sounds (just agent sound FX, not related to speech)
- However, leave the auto-hide option on
The Enable Agent for group allows you to select what events are to be spoken. Generally, you should select all of them ( channels, private events, other events ) to maximize mIRC's speech output capabilities unless you specifically want something not to be spoken.
The agent tab in the preferences dialog has three important buttons called speech, events and lexicon . These buttons will each pop-up a modal child dialog in which you can make settings related to these categories. Let's talk about the events button first, it will allow you to have more control over what you want mIRC to speak. These options need no explaining and you should generally select them all particularly if you are new to IRC and are not sure what all those things mean.
The lexicon dialog. on the other hand, allows you to tell mIRC to replace a certain text with another one. For instance, you could replace IMHO with in my humble opinion. More importantly, the test button located in the dialog let's you listen to your speech settings.
Once you have selected an agent character there's little to do. You just have to tweak the pitch, speed and volume settings to your liking in the speech child dialog (remember that they won't take effect till you restart mIRC). For all Microsoft's voices you can try the speed of 240 and the pitch value 180 as a good starting point. I don't know about L& H TTS British English or other speech engines, though, you just have to experiment a little. one thing worthy of note is the new language list box. If you are using any of my custom agents, select English, otherwise select the language in which you want the agents to speak.
The Agent Character Editor
If you'd like to do other custom agents for selecting particular English synth voices, you'll need the Microsoft Agent Character Editor. In addition, you must have the desired speech engine installed. Otherwise it will not show up when selecting an engine for your Agent character. Basically you do one or more graphics and set up the animations, then you just specify that this agent should use that and that English speech engine and voice (I cannot go into details here as I don't have the editor installed, but anyway using it was quite easy). Note that only the currently installed speech engines are supported in the speech engine and voice selection dialog box. Oh, I almost forgot, you can Download MS Agent Character Editor Here Finally, I'd appreciate it if you could e-mail your custom speech related agent files to me for distributing them on this page.
This is the end of this mIRC with speech tutorial. If you want a light and simple IRC-client in stead, be sure to check out the chapter about iamC, also available on this site.
Microsoft tends to update it's web site quite often so some of the links in this page may be out-dated. Please let me know if you find any broken links.