mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
add mod_cepstral, more tweaks to the tts interface
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@687 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -75,7 +75,7 @@ static swift_result_t write_audio(swift_event *event, swift_event_t type, void *
|
||||
return rv;
|
||||
}
|
||||
|
||||
static switch_status cepstral_speech_open(switch_speech_handle *sh, char *voice_name, int rate, unsigned int flags)
|
||||
static switch_status cepstral_speech_open(switch_speech_handle *sh, char *voice_name, int rate, switch_speech_flag flags)
|
||||
{
|
||||
if (flags & SWITCH_SPEECH_FLAG_ASR) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
@@ -139,7 +139,7 @@ static switch_status cepstral_speech_open(switch_speech_handle *sh, char *voice_
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
static switch_status cepstral_speech_close(switch_speech_handle *sh, unsigned int *flags)
|
||||
static switch_status cepstral_speech_close(switch_speech_handle *sh, switch_speech_flag *flags)
|
||||
{
|
||||
cepstral_t *cepstral;
|
||||
|
||||
@@ -157,7 +157,7 @@ static switch_status cepstral_speech_close(switch_speech_handle *sh, unsigned in
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static switch_status cepstral_speech_feed_tts(switch_speech_handle *sh, char *text, unsigned int *flags)
|
||||
static switch_status cepstral_speech_feed_tts(switch_speech_handle *sh, char *text, switch_speech_flag *flags)
|
||||
{
|
||||
cepstral_t *cepstral;
|
||||
|
||||
@@ -177,12 +177,12 @@ static switch_status cepstral_speech_read_tts(switch_speech_handle *sh,
|
||||
void *data,
|
||||
unsigned int *datalen,
|
||||
unsigned int *rate,
|
||||
unsigned int *flags)
|
||||
switch_speech_flag *flags)
|
||||
{
|
||||
cepstral_t *cepstral;
|
||||
int desired = *datalen;
|
||||
size_t desired = *datalen;
|
||||
switch_status status = SWITCH_STATUS_FALSE;
|
||||
int used, padding = 0;
|
||||
size_t used, padding = 0;
|
||||
|
||||
assert(sh != NULL);
|
||||
cepstral = sh->private_info;
|
||||
@@ -224,7 +224,7 @@ static switch_status cepstral_speech_read_tts(switch_speech_handle *sh,
|
||||
switch_mutex_lock(cepstral->audio_lock);
|
||||
*datalen = switch_buffer_read(cepstral->audio_buffer, data, desired);
|
||||
if (padding) {
|
||||
int x = 0;
|
||||
size_t x = 0;
|
||||
unsigned char *p = data;
|
||||
|
||||
for(x = 0; x < padding; x++) {
|
||||
|
214
src/mod/asr_tts/mod_cepstral/mod_cepstral.vcproj
Normal file
214
src/mod/asr_tts/mod_cepstral/mod_cepstral.vcproj
Normal file
@@ -0,0 +1,214 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="mod_cepstral"
|
||||
ProjectGUID="{692F6330-4D87-4C82-81DF-40DB5892636E}"
|
||||
RootNamespace="mod_cepstral"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="cscript /nologo $(InputDir)..\..\..\..\w32\vsnet\getlibs.vbs mod_cepstral Debug"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=""$(InputDir)..\..\..\include";"$(InputDir)..\..\..\..\libs\include";C:\Program Files\Cepstral\sdk\include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="4"
|
||||
WarnAsError="true"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="swift.lib"
|
||||
OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_cepstral.dll"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="C:\Program Files\Cepstral\sdk\lib\winnt"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/mod_cepstral.pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary="$(OutDir)/mod_cepstral.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="2"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
CommandLine="cscript /nologo $(InputDir)..\..\..\..\w32\vsnet\getlibs.vbs mod_cepstral Release"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories=""$(InputDir)..\..\..\include";"$(InputDir)..\..\..\..\libs\include";C:\Program Files\Cepstral\sdk\include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MOD_EXPORTS"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="4"
|
||||
WarnAsError="true"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="swift.lib"
|
||||
OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_cepstral.dll"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="C:\Program Files\Cepstral\sdk\lib\winnt"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
LinkTimeCodeGeneration="1"
|
||||
ImportLibrary="$(OutDir)/mod_cepstral.lib"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\mod_cepstral.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
Reference in New Issue
Block a user