www.pudn.com > cspeech.zip > cspeech.tex


\documentstyle[a4,makeidx,verbatim,texhelp,fancyhea,mysober,mytitle]{report} 
\definecolour{black}{0}{0}{0}% 
\definecolour{cyan}{0}{255}{255}% 
\definecolour{green}{0}{255}{0}% 
\definecolour{magenta}{255}{0}{255}% 
\definecolour{red}{255}{0}{0}% 
\definecolour{blue}{0}{0}{200}% 
\definecolour{yellow}{255}{255}{0}% 
\definecolour{white}{255}{255}{255}% 
\parindent 0pt 
\parskip 11pt 
\title{Manual for CSpeech 1.0: a SAPI wrapper class} 
\author{Julian Smart} 
\date{February 1998} 
% 
\makeindex 
\begin{document} 
\maketitle 
% 
\pagestyle{fancyplain} 
\bibliographystyle{plain} 
\pagenumbering{roman} 
\setheader{{\it CONTENTS}}{}{}{}{}{{\it CONTENTS}} 
\setfooter{\thepage}{}{}{}{}{\thepage} 
\tableofcontents% 
\newpage% 
\pagenumbering{arabic}% 
 
\chapter{Introduction}\label{intro} 
\pagenumbering{arabic}% 
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% 
\setfooter{\thepage}{}{}{}{}{\thepage} 
 
CSpeech is a class library that puts a very simple wrapper around the SAPI COM objects. 
SAPI is Microsoft's Speech API, which can be downloaded from: 
 
\begin{verbatim} 
http://www.research.microsoft.com/research/srg/install.htm 
\end{verbatim} 
 
SAPI is an API which mediates between an application and the currently-selected speech engine, 
provided by a third-party vendor. Microsoft bundle their experimental text-to-speech engine 
with the full SAPI Suite, but this engine may not be redistributed. Unless 
you already have a SAPI-compliant text-to-speech engine, make sure you download the 
SDK 3.0 (or above) Suite, not just the SDK, since the Suite also contains the Microsoft TTS 
and Command and Control engines. (Note: I tried one independent vendor's supposedly SAPI-compliant 
demo, and my SAPI sample crashed until I unloaded the demo and re-installed SAPI. So beware!) 
 
CSpeech deals with just text-to-speech, and currently not with the 
voice recognition side. Also, it doesn't wrap every capability, just the most useful 
ones. 
 
CSpeech works with both MFC and wxWindows. It should be easy to make it work with plain Windows 
and Borland's OWL, but I don't have time to look into those. 
 
\chapter{CSpeech compilation} 
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% 
\setfooter{\thepage}{}{}{}{}{\thepage} 
 
For MFC compilation, use the provided project file in the {\tt src} directory. 
Make sure that in cspeech.h, the __MFC__ symbol is defined, and the __WXWIN__ symbol is not defined. 
 
For wxWindows compilation, use the provided makefile.nt in the {\tt src} directory. 
Make sure that in cspeech.h, the __WXWIN__ symbol is defined, and the __MFC__ symbol is not defined. 
 
To test out CSpeech, compile and run one of the sample programs in samples/mfcsample or 
samples/wxsample. 
 
Note that programs compiled with CSpeech must also have a source file guidseg.cpp to initialize 
the appropriate COM GUIDs. 
 
\chapter{Bugs and future developments} 
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}% 
\setfooter{\thepage}{}{}{}{}{\thepage} 
 
\section{Bugs} 
 
These are the known bugs: 
 
\begin{enumerate}\itemsep=0pt 
\item The samples sometimes crash on exit, particularly after they have been 
run and quit several times. Probably this is something to do with bad OLE cleanup 
in the CSpeech code but I'm not a good enough OLE programmer to fix this. Contributions 
and suggestions very welcome. 
\item Not all TTS functions are wrapped. 
\item The dialog functions ignore the title parameter 
because I don't know how to convert a CString to a PWSTR. 
\end{enumerate} 
 
\section{Future developments} 
 
\begin{itemize}\itemsep=0pt 
\item The samples could be rather less naive. 
\item One could separate out the implementation of CSpeech into a DLL, so that CSpeech 
could support engines that are not SAPI-compliant (instead there would be a simple CSpeech 
DLL specification). 
\item More TTS functionality could be supported, plus MS Voice functionality. 
\item I wrote this class as a small step towards a free framework to help programmers 
add accessibility to their applications. By which I mean, the ability for the application 
to be used by (mainly visually) handicapped people. Anyone who is interested in collaborating 
on such a project please contact me at julian.smart@ukonline.co.uk. 
\end{itemize} 
 
\input classes.tex 
% 
\input changes.tex 
% 
\addcontentsline{toc}{chapter}{Index} 
\printindex 
\end{document}