From 5d3fc7ffacbff47c99ba430e2570ab92cbc968a9 Mon Sep 17 00:00:00 2001 From: jonsd Date: Fri, 8 Jun 2007 15:19:40 +0000 Subject: [PATCH] Added directory "windows" - Windows specific source files and build data. git-svn-id: https://espeak.svn.sourceforge.net/svnroot/espeak/trunk@40 d46cf337-b52f-0410-862d-fd96e6ae7743 --- windows/make_espeak.iss | 309 ++++++++++++ windows/make_espeakedit.iss | 21 + windows/windows_cmd/!ReadMe.txt | 11 + windows/windows_cmd/PAStaticWMME.lib | Bin 0 -> 30392 bytes windows/windows_cmd/StdAfx.cpp | 8 + windows/windows_cmd/StdAfx.h | 22 + windows/windows_cmd/espeak.dsp | 206 ++++++++ windows/windows_cmd/espeak.dsw | 29 ++ windows/windows_cmd/src/speech.h | 83 ++++ windows/windows_cmd/src/stdint.h | 4 + windows/windows_dll/!ReadMe.txt | 16 + windows/windows_dll/StdAfx.cpp | 8 + windows/windows_dll/StdAfx.h | 24 + windows/windows_dll/espeak.dsp | 225 +++++++++ windows/windows_dll/espeak.dsw | 29 ++ windows/windows_dll/src/StdAfx.h | 24 + windows/windows_dll/src/speak_lib.h | 576 ++++++++++++++++++++++ windows/windows_dll/src/speech.h | 84 ++++ windows/windows_dll/src/stdint.h | 4 + windows/windows_sapi/!ReadMe.txt | 11 + windows/windows_sapi/TtsEng.aps | Bin 0 -> 2680 bytes windows/windows_sapi/TtsEng.h | 94 ++++ windows/windows_sapi/TtsEng.tlb | Bin 0 -> 13976 bytes windows/windows_sapi/TtsEng_i.c | 47 ++ windows/windows_sapi/resource.h | 18 + windows/windows_sapi/sapi.lib | Bin 0 -> 39424 bytes windows/windows_sapi/src/StdAfx.h | 3 + windows/windows_sapi/src/speech.h | 88 ++++ windows/windows_sapi/src/stdint.h | 4 + windows/windows_sapi/stdafx.cpp | 14 + windows/windows_sapi/stdafx.h | 32 ++ windows/windows_sapi/ttseng.cpp | 77 +++ windows/windows_sapi/ttseng.def | 5 + windows/windows_sapi/ttseng.dsp | 276 +++++++++++ windows/windows_sapi/ttseng.dsw | 29 ++ windows/windows_sapi/ttseng.idl | 50 ++ windows/windows_sapi/ttseng.rc | 91 ++++ windows/windows_sapi/ttsengobj.cpp | 693 +++++++++++++++++++++++++++ windows/windows_sapi/ttsengobj.h | 121 +++++ windows/windows_sapi/ttsengobj.rgs | 25 + windows/windows_sapi/ttsengver.h | 78 +++ windows/windows_sapi/version.rc2 | 44 ++ 42 files changed, 3483 insertions(+) create mode 100755 windows/make_espeak.iss create mode 100755 windows/make_espeakedit.iss create mode 100755 windows/windows_cmd/!ReadMe.txt create mode 100755 windows/windows_cmd/PAStaticWMME.lib create mode 100755 windows/windows_cmd/StdAfx.cpp create mode 100755 windows/windows_cmd/StdAfx.h create mode 100755 windows/windows_cmd/espeak.dsp create mode 100755 windows/windows_cmd/espeak.dsw create mode 100755 windows/windows_cmd/src/speech.h create mode 100755 windows/windows_cmd/src/stdint.h create mode 100644 windows/windows_dll/!ReadMe.txt create mode 100755 windows/windows_dll/StdAfx.cpp create mode 100755 windows/windows_dll/StdAfx.h create mode 100755 windows/windows_dll/espeak.dsp create mode 100755 windows/windows_dll/espeak.dsw create mode 100755 windows/windows_dll/src/StdAfx.h create mode 100644 windows/windows_dll/src/speak_lib.h create mode 100755 windows/windows_dll/src/speech.h create mode 100755 windows/windows_dll/src/stdint.h create mode 100644 windows/windows_sapi/!ReadMe.txt create mode 100755 windows/windows_sapi/TtsEng.aps create mode 100755 windows/windows_sapi/TtsEng.h create mode 100755 windows/windows_sapi/TtsEng.tlb create mode 100755 windows/windows_sapi/TtsEng_i.c create mode 100755 windows/windows_sapi/resource.h create mode 100755 windows/windows_sapi/sapi.lib create mode 100755 windows/windows_sapi/src/StdAfx.h create mode 100755 windows/windows_sapi/src/speech.h create mode 100755 windows/windows_sapi/src/stdint.h create mode 100755 windows/windows_sapi/stdafx.cpp create mode 100755 windows/windows_sapi/stdafx.h create mode 100755 windows/windows_sapi/ttseng.cpp create mode 100755 windows/windows_sapi/ttseng.def create mode 100755 windows/windows_sapi/ttseng.dsp create mode 100755 windows/windows_sapi/ttseng.dsw create mode 100755 windows/windows_sapi/ttseng.idl create mode 100755 windows/windows_sapi/ttseng.rc create mode 100755 windows/windows_sapi/ttsengobj.cpp create mode 100755 windows/windows_sapi/ttsengobj.h create mode 100755 windows/windows_sapi/ttsengobj.rgs create mode 100755 windows/windows_sapi/ttsengver.h create mode 100755 windows/windows_sapi/version.rc2 diff --git a/windows/make_espeak.iss b/windows/make_espeak.iss new file mode 100755 index 00000000..0de7f772 --- /dev/null +++ b/windows/make_espeak.iss @@ -0,0 +1,309 @@ +; This is the script for "Inno Setup 5" to create the setup_espeak.exe installer for Windows + +[Setup] +AppName=eSpeak +AppVerName=eSpeak version 1.26 +DefaultDirName={pf}\eSpeak +DefaultGroupName=eSpeak +OutputBaseFilename=setup_espeak +Compression=lzma +SolidCompression=yes + +[InstallDelete] +Type: files; Name: "{app}\espeak.dll" + +[Dirs] +Name: "{app}\espeak-data\soundicons" +Name: "{app}\espeak-data\mbrola" + +[Files] +Source: "espeak_sapi.dll"; DestDir: "{app}"; Flags: regserver promptifolder replacesameversion +Source: "TTSApp.exe"; DestDir:"{app}" +Source: "espeak-data\*"; DestDir: "{app}\espeak-data"; Flags: recursesubdirs +Source: "dictsource2\*"; DestDir: "{app}\dictsource" +Source: "docs\*"; DestDir: "{app}\docs"; Flags: recursesubdirs +Source: "command_line\*"; DestDir: "{app}\command_line" +Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme + +[Registry] +Root: HKLM; Subkey: "Software\Microsoft\Speech\Voices\Tokens\eSpeak"; Flags: deletekey uninsdeletekey +Root: HKLM; Subkey: "Software\Microsoft\Speech\Voices\Tokens\eSpeak_1"; Flags: deletekey uninsdeletekey +Root: HKLM; Subkey: "Software\Microsoft\Speech\Voices\Tokens\eSpeak_2"; Flags: deletekey uninsdeletekey +Root: HKLM; Subkey: "Software\Microsoft\Speech\Voices\Tokens\eSpeak_3"; Flags: deletekey uninsdeletekey +Root: HKLM; Subkey: "Software\Microsoft\Speech\Voices\Tokens\eSpeak_4"; Flags: deletekey uninsdeletekey +Root: HKLM; Subkey: "Software\Microsoft\Speech\Voices\Tokens\eSpeak_5"; Flags: deletekey uninsdeletekey +Root: HKLM; Subkey: "Software\Microsoft\Speech\PhoneConverters\Tokens\eSpeak"; Flags: deletekey uninsdeletekey + + + +[Code] +var + UILanguage: Integer; + UIVoice: String; + Page: TInputQueryWizardPage; + +const + sEspeak = 'eSpeak-'; + RegVoice1 = 'Software\Microsoft\Speech\Voices\Tokens\eSpeak'; + RegPhConv = 'Software\Microsoft\Speech\PhoneConverters\Tokens'; + + +function VoiceFromLanguage(language: Integer): String; +var + lang_main: Integer; + +begin + lang_main := language and $3ff; + Result := 'af'; + + // translation from microsoft codes to language codes + case lang_main of + $05: Result := 'cs'; + $07: Result := 'de'; + $08: Result := 'el'; + $0a: Result := 'es'; + $0b: Result := 'fi'; + $0c: Result := 'fr'; + $0e: Result := 'hu'; + $10: Result := 'it'; + $13: Result := 'nl'; + $14: Result := 'no'; + $15: Result := 'pl'; + $16: Result := 'pt'; + $18: Result := 'ro'; + $19: Result := 'ru'; + $1a: Result := 'hr'; + $1b: Result := 'sk'; + $1d: Result := 'sv'; + $2a: Result := 'vi'; + $36: Result := 'af'; + $39: Result := 'hi'; + $41: Result := 'sw'; + $52: Result := 'cy'; + end; +end; + + +function LanguageFromVoice(voice: String): String; +var + value: Integer; + lang1: String; + len: Integer; +begin + value := $409; // default en-us + + lang1 := Copy(voice,0,2); + if lang1 = 'mb' then + begin + lang1 := Copy(voice,3,3); + len := Length(voice); + if len > 8 then + lang1 := Copy(voice,8,6); // eg. mb-de4-en, return 'en' + end; + + case lang1 of + 'af': value := $436; + 'cs': value := $405; + 'cy': value := $452; + 'de': value := $407; + 'el': value := $408; + 'en': value := $409; + 'es': value := $40a; + 'fi': value := $40b; + 'fr': value := $40c; + 'hi': value := $439; + 'hr': value := $41a; + 'hu': value := $40e; + 'is': value := $40f; + 'it': value := $410; + 'nl': value := $413; + 'no': value := $414; + 'pl': value := $415; + 'pt': value := $416; + 'ro': value := $418; + 'ru': value := $419; + 'sk': value := $41b; + 'sv': value := $41d; + 'sw': value := $441; + 'vi': value := $42a; + // mbrola voices + '-af': value := $436; + '-br': value := $416; + '-ca': value := $c0c; + '-cr': value := $41a; + '-cz': value := $405; + '-de': value := $407; + '-en': value := $809; + '-es': value := $40a; + '-fr': value := $40c; + '-gr': value := $408; + '-hu': value := $40e; + '-ic': value := $40f; + '-in': value := $439; + '-it': value := $410; + '-mx': value := $80a; + '-nl': value := $413; + '-pl': value := $415; + '-pt': value := $816; + '-ro': value := $418; + '-sw': value := $41d; + '-us': value := $409; + '-vz': value := $200a; + end; + + // check for specific voices + case voice of + 'pt-pt': value := $816; + end; + + Result := Format('%X',[value]); +end; + + +// is the language number already in a PhoneConvertor ? +function CheckPhoneConvertors(Lcode: String): Integer; +var + Convertors: TArrayOfString; + ix: Integer; + len: Integer; + s1: String; + s2: String; + sLangs: String; +begin + Result := 0; + len := Length(Lcode); + if RegGetSubkeyNames(HKEY_LOCAL_MACHINE, RegPhConv, Convertors) then + begin + for ix := 0 to GetArrayLength(Convertors) - 1 do + begin + s1 := RegPhConv + '\' + Convertors[ix] + '\Attributes'; + if RegQueryStringValue(HKEY_LOCAL_MACHINE, s1, 'Language', sLangs) then + begin + s2 := Copy(sLangs, 1, len); + if s2 = Lcode then + Result := 1; + if sLangs = Lcode then + Result := 1; + if Pos(';' + Lcode, sLangs) > 0 then + Result := 1; + end; + end; + end; +end; + +// ensure the language number is included in a PhoneConvertor +procedure SetPhoneConvertor(Lcode: String); +var + done: Boolean; + s1: String; + sLangs: String; +begin + if CheckPhoneConvertors(Lcode) = 0 then + begin + done := False; + s1 := RegPhConv + '\Universal\Attributes'; + if RegQueryStringValue(HKEY_LOCAL_MACHINE, s1, 'Language', sLangs) then + begin + done := RegWriteStringValue(HKEY_LOCAL_MACHINE, s1, 'Language', Lcode + ';' + sLangs); + end; + + if done = False then + begin + s1 := RegPhConv + '\eSpeak\Attributes'; + if RegQueryStringValue(HKEY_LOCAL_MACHINE, s1, 'Language', sLangs) = False then + begin + // add 'eSpeak' dummy PhoneConvertor + RegWriteStringValue(HKEY_LOCAL_MACHINE, RegPhConv + '\eSpeak', 'CLSID','{9185F743-1143-4C28-86B5-BFF14F20E5C8}'); + RegWriteStringValue(HKEY_LOCAL_MACHINE, RegPhConv + '\eSpeak', 'PhoneMap','- 0001'); + RegWriteStringValue(HKEY_LOCAL_MACHINE, s1, 'Language',''); + end; + + if RegQueryStringValue(HKEY_LOCAL_MACHINE, s1, 'Language', sLangs) then + begin + done := RegWriteStringValue(HKEY_LOCAL_MACHINE, s1, 'Language', Lcode + ';' + sLangs); + end; + end; + end; +end; + + +procedure SetupVoice(Voice, Lcode: String; Index: Integer); +var + RegVoice2: String; + RegVoice2a: String; + VoiceUC: String; + +begin + if Index = 0 then + RegVoice2 := RegVoice1 + else + RegVoice2 := RegVoice1 + Format('_%d',[Index]); + + RegVoice2a := RegVoice2 + '\Attributes'; + + if Voice = 'default' then + VoiceUC := 'default' + else + VoiceUC := Uppercase(Voice); + + RegWriteStringValue(HKEY_LOCAL_MACHINE,RegVoice2,'',sEspeak+VoiceUC); + RegWriteStringValue(HKEY_LOCAL_MACHINE,RegVoice2,'CLSID','{BE985C8D-BE32-4A22-AA93-55C16A6D1D91}'); + RegWriteStringValue(HKEY_LOCAL_MACHINE,RegVoice2,'Path',ExpandConstant('{app}')); + RegWriteStringValue(HKEY_LOCAL_MACHINE,RegVoice2,'VoiceName',Voice); + + RegWriteStringValue(HKEY_LOCAL_MACHINE,RegVoice2a,'Name',sEspeak+Voice); + RegWriteStringValue(HKEY_LOCAL_MACHINE,RegVoice2a,'Gender','Male'); + RegWriteStringValue(HKEY_LOCAL_MACHINE,RegVoice2a,'Age','Adult'); + RegWriteStringValue(HKEY_LOCAL_MACHINE,RegVoice2a,'Language',Lcode); + RegWriteStringValue(HKEY_LOCAL_MACHINE,RegVoice2a,'Vendor','Jonathan Duddington'); + + SetPhoneConvertor(Lcode); +end; + + + +procedure CurStepChanged(CurStep: TSetupStep); +var + ix: Integer; +begin + if CurStep = ssPostInstall then + begin + + for ix := 0 to 5 do begin + if Page.Values[ix] <> '' then + SetUpVoice(Page.Values[ix],LanguageFromVoice(Page.Values[ix]),ix); + end; + end; +end; + + +procedure InitializeWizard; +var + lang: String; +begin + // Create the language selection page + lang := ActiveLanguage; + Page := CreateInputQueryPage(wpSelectDir, + 'Select which voices to install', 'or press Enter to accept defaults', + 'Enter voice names, eg: (for Portuguese) pt, or with a variant, eg: pt+13'); + + // Add items (False means it's not a password edit) + Page.Add('', False); + Page.Add('', False); + Page.Add('', False); + Page.Add('', False); + Page.Add('', False); + Page.Add('', False); + + UILanguage := GetUILanguage; + UIVoice := VoiceFromLanguage(UILanguage); + + // Set initial values (optional) + Page.Values[0] := 'en'; + Page.Values[1] := UIVoice; + Page.Values[2] := 'en-r'; + +end; + + + diff --git a/windows/make_espeakedit.iss b/windows/make_espeakedit.iss new file mode 100755 index 00000000..095f111a --- /dev/null +++ b/windows/make_espeakedit.iss @@ -0,0 +1,21 @@ + +[Setup] +AppName=eSpeakEdit +AppVerName=eSpeakEdit version 1.26 +DefaultDirName={pf}\eSpeak +DefaultGroupName=eSpeak +OutputBaseFilename=setup_espeakedit +Compression=lzma +SolidCompression=yes +DirExistsWarning=no + +[Files] +Source: "espeakedit.exe"; DestDir: "{app}" +Source: "dictsource\*"; DestDir: "{app}\dictsource"; Flags: recursesubdirs +Source: "espeakedit\*"; DestDir: "{app}\espeakedit"; Flags: recursesubdirs +Source: "phsource\*"; DestDir: "{app}\phsource"; Flags: recursesubdirs +Source: "docs\*"; DestDir: "{app}\docs"; Flags: recursesubdirs +;Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme + + + diff --git a/windows/windows_cmd/!ReadMe.txt b/windows/windows_cmd/!ReadMe.txt new file mode 100755 index 00000000..d1d456f9 --- /dev/null +++ b/windows/windows_cmd/!ReadMe.txt @@ -0,0 +1,11 @@ +======================================================================== + CONSOLE APPLICATION : espeak +======================================================================== + +This is a Virtual C++ project to make a command-line version +of eSpeak for Windows. + +Copy the source files from the Linux "src" directory into this +"src" directory, EXCEPT for speech.h. Keep the original Windows +command-line version iof speech.h. + diff --git a/windows/windows_cmd/PAStaticWMME.lib b/windows/windows_cmd/PAStaticWMME.lib new file mode 100755 index 0000000000000000000000000000000000000000..6ddf55964f443984cef4ee889bd7da3ddc77c19f GIT binary patch literal 30392 zcmeHweOR2;weJf|$OKU)DJm+_QHjQ?2?P?r#AYB&0x6>qn3&o`GJzos!hrJ;lbjI2 zNo-z6j%k~yZM|)5ZL7VuT956Me%L~c9kpqnn8P`u5+yn5xxu05Qj3*ivE1KU`~94O znD+6H``qWgn&J1Zz4qE`uf6ui`_9^Xu3q5@G`4&$W3kMRQY`&?dJAQufNLQ84e`~ zCi?B+(DVrjymcW@AmsFK_4&P;T&A&LGfBua&^kJka&~kkX6)!p%134>YYh3e>1Eb? z18kXwRUKh}sKUF=*C?vp0DDw;n?2#S5K9(GRTZR$Ax)H#oJex2{LLLIJ2jLu5a5?I8iN};?%!|~ejR~1ed5fD9GMiFM z&Y4=eWs6y~p0_bSzp=D2AAj^KF|~lLpr(^yS9SQec>|$_`hd^l-x_Z71S))?7B9C6 z_oUT6e-n3^V5r`+rOoT~hYXzw9wAz0owqaK4SM|{PsrEdC&`?qJ{P27GFX@?N%z`$``PdCpb^yyD=+DRH7&SM_>lm-#QY=)`cG=7|WI1#L3_QPEJDUUAye;(CG;u*$T zZO!oy%(9CU2I@~*vlkVsYx&I?i#D$Fws}24@5W9~!@WL#!@ce8-bEc-S|w9Tn{Nvf zGZw20e|7z@J|7gRGR0raLRkCQ?UXEv+niCIVv{BgO*tP}BuP(TexPenQ^4C8!s1Z5 zFkMIoX!0;#88+~FLLLKcdx|8TN#Jux`F)E5X2wg9XQRcC5fFTiMO%VFBQ@K2qu_3m z7ovGyzn;2Ek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rarely-used stuff from Windows headers + +#include + +// TODO: reference additional headers your program requires here + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__6C2D1701_32D2_4335_A2C8_C6A23021ADBE__INCLUDED_) diff --git a/windows/windows_cmd/espeak.dsp b/windows/windows_cmd/espeak.dsp new file mode 100755 index 00000000..381b02cf --- /dev/null +++ b/windows/windows_cmd/espeak.dsp @@ -0,0 +1,206 @@ +# Microsoft Developer Studio Project File - Name="espeak" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=espeak - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "espeak.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "espeak.mak" CFG="espeak - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "espeak - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "espeak - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "espeak - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib winmm.lib user32.lib gdi32.lib winspool.lib comdlg32.lib PAStaticWMME.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"espeak.exe" + +!ELSEIF "$(CFG)" == "espeak - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "espeak - Win32 Release" +# Name "espeak - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\src\compiledict.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\dictionary.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\intonation.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\numbers.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\phonemelist.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\readclause.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\setlengths.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\speak.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\src\synth_mbrola.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\synthdata.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\synthesize.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\tr_english.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\tr_languages.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\translate.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\voices.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\wavegen.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\src\phoneme.h +# End Source File +# Begin Source File + +SOURCE=.\src\sintab.h +# End Source File +# Begin Source File + +SOURCE=.\src\speak_lib.h +# End Source File +# Begin Source File + +SOURCE=.\src\speech.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=.\src\synthesize.h +# End Source File +# Begin Source File + +SOURCE=.\src\tr_languages.h +# End Source File +# Begin Source File + +SOURCE=.\src\translate.h +# End Source File +# Begin Source File + +SOURCE=.\src\voice.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/windows/windows_cmd/espeak.dsw b/windows/windows_cmd/espeak.dsw new file mode 100755 index 00000000..3db315d0 --- /dev/null +++ b/windows/windows_cmd/espeak.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "espeak"=.\espeak.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/windows/windows_cmd/src/speech.h b/windows/windows_cmd/src/speech.h new file mode 100755 index 00000000..ed893f65 --- /dev/null +++ b/windows/windows_cmd/src/speech.h @@ -0,0 +1,83 @@ +/*************************************************************************** + * Copyright (C) 2005,2006 by Jonathan Duddington * + * jsd@clara.co.uk * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +// Windows command-line version of eSpeak + + +// conditional compilation options + +#define PLATFORM_WINDOWS +#define __WIN32__ +#define NEED_WCSTOF +#define NEED_GETOPT + +#define PATHSEP '\\' +#define USE_PORTAUDIO +#define ESPEAK_API + +// will look for espeak_data directory here, and also in user's home directory +#define PATH_ESPEAK_DATA "/usr/share/espeak-data" + +typedef unsigned short USHORT; +typedef unsigned char UCHAR; +typedef double DOUBLEX; + + + +#define N_PEAKS 9 +#define N_MARKERS 7 + + +typedef struct { + const char *mnem; + int value; +} MNEM_TAB; +int LookupMnem(MNEM_TAB *table, char *string); + + +typedef struct { + short pkfreq; + short pkheight; + short pkwidth; + short pkright; +} peak_t; + +typedef struct { + short frflags; + unsigned char length; + unsigned char rms; + short ffreq[9]; + unsigned char fheight[9]; + unsigned char fwidth[6]; // width/4 + unsigned char fright[6]; // width/4 +} frame_t; + + +int GetFileLength(const char *filename); +char *Alloc(int size); +void Free(void *ptr); + + +extern void strncpy0(char *to,const char *from, int size); +extern char path_home[]; + +extern const int version_phdata; +extern const char *version_string; + diff --git a/windows/windows_cmd/src/stdint.h b/windows/windows_cmd/src/stdint.h new file mode 100755 index 00000000..6b162070 --- /dev/null +++ b/windows/windows_cmd/src/stdint.h @@ -0,0 +1,4 @@ + +// dummy stdint.h file for Windows + +typedef unsigned int uint32_t; diff --git a/windows/windows_dll/!ReadMe.txt b/windows/windows_dll/!ReadMe.txt new file mode 100644 index 00000000..812f6338 --- /dev/null +++ b/windows/windows_dll/!ReadMe.txt @@ -0,0 +1,16 @@ + +This is a Virtual C++ project for the Windows dll +version of eSpeak. This provides the API which is +defined in speak_lib.h, using the +AUDIO_OUTPUT_SYNCHRONOUS mode only. + +This is not the sapi5 version of eSpeak. + +Copy the program source files from the Linux "src" +directory into this "src" directory, EXCEPT for: + speak_lib.h + speech.h + StdAfx.h + stdint.h +Keep the Windows versions of these files. + diff --git a/windows/windows_dll/StdAfx.cpp b/windows/windows_dll/StdAfx.cpp new file mode 100755 index 00000000..e680b910 --- /dev/null +++ b/windows/windows_dll/StdAfx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// espeak.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff --git a/windows/windows_dll/StdAfx.h b/windows/windows_dll/StdAfx.h new file mode 100755 index 00000000..15759d58 --- /dev/null +++ b/windows/windows_dll/StdAfx.h @@ -0,0 +1,24 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__55502A81_7778_46B7_B400_FD19199C842B__INCLUDED_) +#define AFX_STDAFX_H__55502A81_7778_46B7_B400_FD19199C842B__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +// Insert your headers here +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers + +#include + +// TODO: reference additional headers your program requires here + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__55502A81_7778_46B7_B400_FD19199C842B__INCLUDED_) diff --git a/windows/windows_dll/espeak.dsp b/windows/windows_dll/espeak.dsp new file mode 100755 index 00000000..32f86c59 --- /dev/null +++ b/windows/windows_dll/espeak.dsp @@ -0,0 +1,225 @@ +# Microsoft Developer Studio Project File - Name="espeak" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +CFG=espeak - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "espeak.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "espeak.mak" CFG="espeak - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "espeak - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "espeak - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "espeak - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ESPEAK_EXPORTS" /Yu"stdafx.h" /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ESPEAK_EXPORTS" /Yu"stdafx.h" /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x809 /d "NDEBUG" +# ADD RSC /l 0x809 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"Release/espeak_lib.dll" +# SUBTRACT LINK32 /pdb:none + +!ELSEIF "$(CFG)" == "espeak - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ESPEAK_EXPORTS" /Yu"stdafx.h" /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "ESPEAK_EXPORTS" /Yu"stdafx.h" /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x809 /d "_DEBUG" +# ADD RSC /l 0x809 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"Debug/espeak_lib.dll" /pdbtype:sept + +!ENDIF + +# Begin Target + +# Name "espeak - Win32 Release" +# Name "espeak - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=.\src\compiledict.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\dictionary.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\intonation.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\numbers.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\phonemelist.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\readclause.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\setlengths.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\speak_lib.cpp +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.cpp +# ADD CPP /Yc"stdafx.h" +# End Source File +# Begin Source File + +SOURCE=.\src\synth_mbrola.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\synthdata.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\synthesize.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\tr_english.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\tr_languages.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\translate.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\voices.cpp +# End Source File +# Begin Source File + +SOURCE=.\src\wavegen.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=.\espeak.h +# End Source File +# Begin Source File + +SOURCE=.\src\phoneme.h +# End Source File +# Begin Source File + +SOURCE=.\src\portaudio.h +# End Source File +# Begin Source File + +SOURCE=.\src\sintab.h +# End Source File +# Begin Source File + +SOURCE=.\src\speak_lib.h +# End Source File +# Begin Source File + +SOURCE=.\src\speech.h +# End Source File +# Begin Source File + +SOURCE=.\StdAfx.h +# End Source File +# Begin Source File + +SOURCE=.\src\stdint.h +# End Source File +# Begin Source File + +SOURCE=.\src\synthesize.h +# End Source File +# Begin Source File + +SOURCE=.\src\tr_languages.h +# End Source File +# Begin Source File + +SOURCE=.\src\translate.h +# End Source File +# Begin Source File + +SOURCE=.\src\voice.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# End Group +# Begin Source File + +SOURCE=.\ReadMe.txt +# End Source File +# End Target +# End Project diff --git a/windows/windows_dll/espeak.dsw b/windows/windows_dll/espeak.dsw new file mode 100755 index 00000000..3db315d0 --- /dev/null +++ b/windows/windows_dll/espeak.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "espeak"=.\espeak.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/windows/windows_dll/src/StdAfx.h b/windows/windows_dll/src/StdAfx.h new file mode 100755 index 00000000..15759d58 --- /dev/null +++ b/windows/windows_dll/src/StdAfx.h @@ -0,0 +1,24 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#if !defined(AFX_STDAFX_H__55502A81_7778_46B7_B400_FD19199C842B__INCLUDED_) +#define AFX_STDAFX_H__55502A81_7778_46B7_B400_FD19199C842B__INCLUDED_ + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 + + +// Insert your headers here +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers + +#include + +// TODO: reference additional headers your program requires here + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_STDAFX_H__55502A81_7778_46B7_B400_FD19199C842B__INCLUDED_) diff --git a/windows/windows_dll/src/speak_lib.h b/windows/windows_dll/src/speak_lib.h new file mode 100644 index 00000000..07bea82b --- /dev/null +++ b/windows/windows_dll/src/speak_lib.h @@ -0,0 +1,576 @@ +#ifndef SPEAK_LIB_H +#define SPEAK_LIB_H +/*************************************************************************** + * Copyright (C) 2006 by Jonathan Duddington * + * jonsd@users.sourceforge.net * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + + +/*************************************************************/ +/* This is the header file for the library version of espeak */ +/* */ +/*************************************************************/ +#define ESPEAK_API __declspec(dllexport) + +#include + + /********************/ + /* Initialization */ + /********************/ + + +typedef enum { + espeakEVENT_LIST_TERMINATED = 0, // Retrieval mode: terminates the event list. + espeakEVENT_WORD = 1, // Start of word + espeakEVENT_SENTENCE, // Start of sentence + espeakEVENT_MARK, // Mark + espeakEVENT_PLAY, // Audio element + espeakEVENT_END, // End of sentence + espeakEVENT_MSG_TERMINATED, // End of message + espeakEVENT_PHONEME // Phoneme, if enabled in espeak_Initialize() +} espeak_EVENT_TYPE; + + + +typedef struct { + espeak_EVENT_TYPE type; + unsigned int unique_identifier; // message identifier (or 0 for key or character) + int text_position; // the number of characters from the start of the text + int length; // word length, in characters (for espeakEVENT_WORD) + int audio_position; // the time in mS within the generated speech output data + int sample; // sample id (internal use) + void* user_data; // pointer supplied by the calling program + union { + int number; // used for WORD and SENTENCE events. For PHONEME events this is the phoneme mnemonic. + const char *name; // used for MARK and PLAY events. UTF8 string + } id; +} espeak_EVENT; +/* + When a message is supplied to espeak_synth, the request is buffered and espeak_synth returns. When the message is really processed, the callback function will be repetedly called. + + + In RETRIEVAL mode, the callback function supplies to the calling program the audio data and an event list terminated by 0 (LIST_TERMINATED). + + In PLAYBACK mode, the callback function is called as soon as an event happens. + + For example suppose that the following message is supplied to espeak_Synth: + "hello, hello." + + + * Once processed in RETRIEVAL mode, it could lead to 3 calls of the callback function : + + ** Block 1: +