First version of the SOurce SDK 2013
This commit is contained in:
28
mp/src/utils/phonemeextractor/extractor_utils.cpp
Normal file
28
mp/src/utils/phonemeextractor/extractor_utils.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
//=============================================================================//
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: converts an english string to unicode
|
||||
//-----------------------------------------------------------------------------
|
||||
int ConvertANSIToUnicode(const char *ansi, wchar_t *unicode, int unicodeBufferSize)
|
||||
{
|
||||
return ::MultiByteToWideChar(CP_ACP, 0, ansi, -1, unicode, unicodeBufferSize);
|
||||
}
|
||||
|
||||
char *va( const char *fmt, ... )
|
||||
{
|
||||
va_list args;
|
||||
static char output[4][1024];
|
||||
static int outbuffer = 0;
|
||||
|
||||
outbuffer++;
|
||||
va_start( args, fmt );
|
||||
vprintf( fmt, args );
|
||||
vsprintf( output[ outbuffer & 3 ], fmt, args );
|
||||
return output[ outbuffer & 3 ];
|
||||
}
|
||||
268
mp/src/utils/phonemeextractor/phonemeextractor-2010.vcxproj
Normal file
268
mp/src/utils/phonemeextractor/phonemeextractor-2010.vcxproj
Normal file
@@ -0,0 +1,268 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectName>Phonemeextractor</ProjectName>
|
||||
<ProjectGuid>{079933D6-F849-3176-49FC-D50E4B461AC4}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<TargetName>phonemeextractor</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<TargetName>phonemeextractor</TargetName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\win32\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\Debug\win32\</IntDir>
|
||||
<ExecutablePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\devtools\vstools;$(ExecutablePath);$(Path)</ExecutablePath>
|
||||
<PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</PreBuildEventUseInBuild>
|
||||
<PreLinkEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</PreLinkEventUseInBuild>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</GenerateManifest>
|
||||
<PostBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</PostBuildEventUseInBuild>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\win32\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\Release\win32\</IntDir>
|
||||
<ExecutablePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\devtools\vstools;$(ExecutablePath);$(Path)</ExecutablePath>
|
||||
<PreBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</PreBuildEventUseInBuild>
|
||||
<PreLinkEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</PreLinkEventUseInBuild>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</GenerateManifest>
|
||||
<PostBuildEventUseInBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</PostBuildEventUseInBuild>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
<ClCompile>
|
||||
<AdditionalOptions> /MP /wd4995</AdditionalOptions>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\..\common;..\..\public;..\..\public\tier0;..\..\public\tier1;../common;../hlfaceposer;../sapi51/include</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_HAS_ITERATOR_DEBUGGING=0;WIN32;_WIN32;_DEBUG;DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;DLLNAME=phonemeextractor;RAD_TELEMETRY_DISABLED;COMPILER_MSVC32;PHONEMEEXTRACTOR_EXPORTS;VPCGAMECAPS=VALVE;PROJECTDIR=D:\dev\games\rel\hl2\src\utils\phonemeextractor;_DLL_EXT=.dll;VPCGAME=valve</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<BufferSecurityCheck>true</BufferSecurityCheck>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<AssemblerListingLocation>$(IntDir)/</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)/</ProgramDataBaseFileName>
|
||||
<GenerateXMLDocumentationFiles>false</GenerateXMLDocumentationFiles>
|
||||
<BrowseInformation>false</BrowseInformation>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<BrowseInformationFile>$(IntDir)/</BrowseInformationFile>
|
||||
<ErrorReporting>Prompt</ErrorReporting>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE</PreprocessorDefinitions>
|
||||
<Culture>1033</Culture>
|
||||
</ResourceCompile>
|
||||
<PreLinkEvent>
|
||||
</PreLinkEvent>
|
||||
<Link>
|
||||
<AdditionalOptions> /ignore:4221</AdditionalOptions>
|
||||
<AdditionalDependencies>%(AdditionalDependencies);odbc32.lib;odbccp32.lib</AdditionalDependencies>
|
||||
<ShowProgress>NotSet</ShowProgress>
|
||||
<OutputFile>$(OutDir)\phonemeextractor.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\lib\common;..\..\lib\public</AdditionalLibraryDirectories>
|
||||
<IgnoreSpecificDefaultLibraries>libc;libcd;libcmt</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)/$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<GenerateMapFile>false</GenerateMapFile>
|
||||
<MapFileName>$(IntDir)/$(TargetName).map</MapFileName>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<BaseAddress> </BaseAddress>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<LinkErrorReporting>PromptImmediately</LinkErrorReporting>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Manifest>
|
||||
<Xdcmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Xdcmake>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>$(OutDir)/phonemeextractor.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
<PostBuildEvent>
|
||||
<Message>Publishing to ..\..\..\game\bin\phonemeextractors</Message>
|
||||
<Command>if not exist "..\..\..\game\bin\phonemeextractors" mkdir "..\..\..\game\bin\phonemeextractors"
copy "$(TargetDir)"$(TargetFileName) "..\..\..\game\bin\phonemeextractors\$(TargetFileName)"
if ERRORLEVEL 1 goto BuildEventFailed
if exist "$(TargetDir)"$(TargetName).map copy "$(TargetDir)"$(TargetName).map ..\..\..\game\bin\phonemeextractors\$(TargetName).map
copy "$(TargetDir)"$(TargetName).pdb ..\..\..\game\bin\phonemeextractors\$(TargetName).pdb
if ERRORLEVEL 1 goto BuildEventFailed
goto BuildEventOK
:BuildEventFailed
echo *** ERROR! PostBuildStep FAILED for $(ProjectName)! EXE or DLL is probably running. ***
del /q "$(TargetDir)"$(TargetFileName)
exit 1
:BuildEventOK
</Command>
|
||||
</PostBuildEvent>
|
||||
<CustomBuildStep>
|
||||
</CustomBuildStep>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
<ClCompile>
|
||||
<AdditionalOptions> /MP /d2Zi+ /wd4995</AdditionalOptions>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<AdditionalIncludeDirectories>..\..\common;..\..\public;..\..\public\tier0;..\..\public\tier1;../common;../hlfaceposer;../sapi51/include</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;DLLNAME=phonemeextractor;RAD_TELEMETRY_DISABLED;COMPILER_MSVC32;PHONEMEEXTRACTOR_EXPORTS;VPCGAMECAPS=VALVE;PROJECTDIR=D:\dev\games\rel\hl2\src\utils\phonemeextractor;_DLL_EXT=.dll;VPCGAME=valve</PreprocessorDefinitions>
|
||||
<StringPooling>true</StringPooling>
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope>
|
||||
<RuntimeTypeInfo>true</RuntimeTypeInfo>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<AssemblerListingLocation>$(IntDir)/</AssemblerListingLocation>
|
||||
<ObjectFileName>$(IntDir)/</ObjectFileName>
|
||||
<ProgramDataBaseFileName>$(IntDir)/</ProgramDataBaseFileName>
|
||||
<GenerateXMLDocumentationFiles>false</GenerateXMLDocumentationFiles>
|
||||
<BrowseInformation>false</BrowseInformation>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
<BrowseInformationFile>$(IntDir)/</BrowseInformationFile>
|
||||
<ErrorReporting>Prompt</ErrorReporting>
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<PreprocessorDefinitions>NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE</PreprocessorDefinitions>
|
||||
<Culture>1033</Culture>
|
||||
</ResourceCompile>
|
||||
<PreLinkEvent>
|
||||
</PreLinkEvent>
|
||||
<Link>
|
||||
<AdditionalOptions> /DYNAMICBASE /ignore:4221</AdditionalOptions>
|
||||
<AdditionalDependencies>%(AdditionalDependencies);odbc32.lib;odbccp32.lib</AdditionalDependencies>
|
||||
<ShowProgress>NotSet</ShowProgress>
|
||||
<OutputFile>$(OutDir)\phonemeextractor.dll</OutputFile>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<AdditionalLibraryDirectories>..\..\lib\common;..\..\lib\public</AdditionalLibraryDirectories>
|
||||
<IgnoreSpecificDefaultLibraries>libc;libcd;libcmtd</IgnoreSpecificDefaultLibraries>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<ProgramDatabaseFile>$(IntDir)/$(TargetName).pdb</ProgramDatabaseFile>
|
||||
<GenerateMapFile>false</GenerateMapFile>
|
||||
<MapFileName>$(IntDir)/$(TargetName).map</MapFileName>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<BaseAddress> </BaseAddress>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
<LinkErrorReporting>PromptImmediately</LinkErrorReporting>
|
||||
<LinkLibraryDependencies>false</LinkLibraryDependencies>
|
||||
</Link>
|
||||
<Manifest>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Manifest>
|
||||
<Xdcmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
</Xdcmake>
|
||||
<Bscmake>
|
||||
<SuppressStartupBanner>true</SuppressStartupBanner>
|
||||
<OutputFile>$(OutDir)/phonemeextractor.bsc</OutputFile>
|
||||
</Bscmake>
|
||||
<PostBuildEvent>
|
||||
<Message>Publishing to ..\..\..\game\bin\phonemeextractors</Message>
|
||||
<Command>if not exist "..\..\..\game\bin\phonemeextractors" mkdir "..\..\..\game\bin\phonemeextractors"
copy "$(TargetDir)"$(TargetFileName) "..\..\..\game\bin\phonemeextractors\$(TargetFileName)"
if ERRORLEVEL 1 goto BuildEventFailed
if exist "$(TargetDir)"$(TargetName).map copy "$(TargetDir)"$(TargetName).map ..\..\..\game\bin\phonemeextractors\$(TargetName).map
copy "$(TargetDir)"$(TargetName).pdb ..\..\..\game\bin\phonemeextractors\$(TargetName).pdb
if ERRORLEVEL 1 goto BuildEventFailed
goto BuildEventOK
:BuildEventFailed
echo *** ERROR! PostBuildStep FAILED for $(ProjectName)! EXE or DLL is probably running. ***
del /q "$(TargetDir)"$(TargetFileName)
exit 1
:BuildEventOK
</Command>
|
||||
</PostBuildEvent>
|
||||
<CustomBuildStep>
|
||||
</CustomBuildStep>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<Library Include="..\..\lib\public\mathlib.lib" />
|
||||
<Library Include="..\sapi51\lib\i386\sapi.lib" />
|
||||
<Library Include="..\..\lib\public\tier0.lib" />
|
||||
<Library Include="..\..\lib\public\tier1.lib" />
|
||||
<Library Include="..\..\lib\public\vstdlib.lib" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="talkback.h" />
|
||||
<ClInclude Include="..\..\public\mathlib\amd3dx.h" />
|
||||
<ClInclude Include="..\..\public\tier0\basetypes.h" />
|
||||
<ClInclude Include="..\..\public\tier0\commonmacros.h" />
|
||||
<ClInclude Include="..\..\public\tier0\dbg.h" />
|
||||
<ClInclude Include="..\..\public\tier0\fasttimer.h" />
|
||||
<ClInclude Include="..\..\public\appframework\IAppSystem.h" />
|
||||
<ClInclude Include="..\..\public\mathlib\mathlib.h" />
|
||||
<ClInclude Include="..\..\public\phonemeconverter.h" />
|
||||
<ClInclude Include="..\..\public\phonemeextractor\phonemeextractor.h" />
|
||||
<ClInclude Include="..\..\public\tier0\platform.h" />
|
||||
<ClInclude Include="..\..\public\tier0\protected_things.h" />
|
||||
<ClInclude Include="..\..\public\sentence.h" />
|
||||
<ClInclude Include="..\..\public\string_t.h" />
|
||||
<ClInclude Include="..\..\public\tier1\strtools.h" />
|
||||
<ClInclude Include="..\..\public\tier1\utllinkedlist.h" />
|
||||
<ClInclude Include="..\..\public\tier1\utlmemory.h" />
|
||||
<ClInclude Include="..\..\public\tier1\utlvector.h" />
|
||||
<ClInclude Include="..\..\public\mathlib\vector.h" />
|
||||
<ClInclude Include="..\..\public\mathlib\vector2d.h" />
|
||||
<ClInclude Include="..\..\public\vstdlib\vstdlib.h" />
|
||||
<ClInclude Include="..\sapi51\Include\sapi.h" />
|
||||
<ClInclude Include="..\sapi51\Include\sapiddk.h" />
|
||||
<ClInclude Include="..\sapi51\Include\Spddkhlp.h" />
|
||||
<ClInclude Include="..\sapi51\Include\spdebug.h" />
|
||||
<ClInclude Include="..\sapi51\Include\sperror.h" />
|
||||
<ClInclude Include="..\sapi51\Include\sphelper.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="extractor_utils.cpp" />
|
||||
<ClCompile Include="..\..\public\tier0\memoverride.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">NotUsing</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">NotUsing</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\public\phonemeconverter.cpp" />
|
||||
<ClCompile Include="phonemeextractor.cpp" />
|
||||
<ClCompile Include="..\..\public\sentence.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\..\public\tier0\pointeroverride.asm">
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Compiling pointeroverride.asm</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(VCInstallDir)bin\ml.exe" /c /Cp /Zi /Fo"$(IntDir)\%(Filename).obj" "%(FullPath)"</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IntDir)\%(Filename).obj</Outputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Compiling pointeroverride.asm</Message>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(VCInstallDir)bin\ml.exe" /c /Cp /Zi /Fo"$(IntDir)\%(Filename).obj" "%(FullPath)"</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IntDir)\%(Filename).obj</Outputs>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,146 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{1680C80B-FF1E-EA4D-9817-CC12254F2E40}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Link Libraries">
|
||||
<UniqueIdentifier>{C5D73B3A-C648-896C-B7CE-F174808E5BA5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Public Header Files">
|
||||
<UniqueIdentifier>{680EF60A-F852-B6F6-8E56-5693F8167FE5}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="SAPI Header Files">
|
||||
<UniqueIdentifier>{0339A88D-F26D-9E55-2AC4-F2CED0F7745A}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{BA03E055-4FA2-FCE3-8A1C-D348547D379C}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Library Include="..\..\lib\public\mathlib.lib">
|
||||
<Filter>Link Libraries</Filter>
|
||||
</Library>
|
||||
<Library Include="..\sapi51\lib\i386\sapi.lib">
|
||||
<Filter>Link Libraries</Filter>
|
||||
</Library>
|
||||
<Library Include="..\..\lib\public\tier0.lib">
|
||||
<Filter>Link Libraries</Filter>
|
||||
</Library>
|
||||
<Library Include="..\..\lib\public\tier1.lib">
|
||||
<Filter>Link Libraries</Filter>
|
||||
</Library>
|
||||
<Library Include="..\..\lib\public\vstdlib.lib">
|
||||
<Filter>Link Libraries</Filter>
|
||||
</Library>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="talkback.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\public\mathlib\amd3dx.h">
|
||||
<Filter>Public Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\public\tier0\basetypes.h">
|
||||
<Filter>Public Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\public\tier0\commonmacros.h">
|
||||
<Filter>Public Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\public\tier0\dbg.h">
|
||||
<Filter>Public Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\public\tier0\fasttimer.h">
|
||||
<Filter>Public Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\public\appframework\IAppSystem.h">
|
||||
<Filter>Public Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\public\mathlib\mathlib.h">
|
||||
<Filter>Public Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\public\phonemeconverter.h">
|
||||
<Filter>Public Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\public\phonemeextractor\phonemeextractor.h">
|
||||
<Filter>Public Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\public\tier0\platform.h">
|
||||
<Filter>Public Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\public\tier0\protected_things.h">
|
||||
<Filter>Public Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\public\sentence.h">
|
||||
<Filter>Public Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\public\string_t.h">
|
||||
<Filter>Public Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\public\tier1\strtools.h">
|
||||
<Filter>Public Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\public\tier1\utllinkedlist.h">
|
||||
<Filter>Public Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\public\tier1\utlmemory.h">
|
||||
<Filter>Public Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\public\tier1\utlvector.h">
|
||||
<Filter>Public Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\public\mathlib\vector.h">
|
||||
<Filter>Public Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\public\mathlib\vector2d.h">
|
||||
<Filter>Public Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\public\vstdlib\vstdlib.h">
|
||||
<Filter>Public Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\sapi51\Include\sapi.h">
|
||||
<Filter>SAPI Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\sapi51\Include\sapiddk.h">
|
||||
<Filter>SAPI Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\sapi51\Include\Spddkhlp.h">
|
||||
<Filter>SAPI Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\sapi51\Include\spdebug.h">
|
||||
<Filter>SAPI Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\sapi51\Include\sperror.h">
|
||||
<Filter>SAPI Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\sapi51\Include\sphelper.h">
|
||||
<Filter>SAPI Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="extractor_utils.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\public\tier0\memoverride.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\public\phonemeconverter.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="phonemeextractor.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\public\sentence.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\..\public\tier0\pointeroverride.asm">
|
||||
<Filter>Source Files</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
1425
mp/src/utils/phonemeextractor/phonemeextractor.cpp
Normal file
1425
mp/src/utils/phonemeextractor/phonemeextractor.cpp
Normal file
File diff suppressed because it is too large
Load Diff
1075
mp/src/utils/phonemeextractor/phonemeextractor_ims.cpp
Normal file
1075
mp/src/utils/phonemeextractor/phonemeextractor_ims.cpp
Normal file
File diff suppressed because it is too large
Load Diff
BIN
mp/src/utils/phonemeextractor/talkback.doc
Normal file
BIN
mp/src/utils/phonemeextractor/talkback.doc
Normal file
Binary file not shown.
732
mp/src/utils/phonemeextractor/talkback.h
Normal file
732
mp/src/utils/phonemeextractor/talkback.h
Normal file
@@ -0,0 +1,732 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//
|
||||
//=============================================================================//
|
||||
// =============================================================================
|
||||
// Interface to the LIPSinc TalkBack 1.1 library (TalkBack_*.lib).
|
||||
//
|
||||
// Copyright © 1998-2002 LIPSinc. All rights reserved.
|
||||
|
||||
#if !defined(TalkBack_h)
|
||||
#define TalkBack_h
|
||||
|
||||
#include <stddef.h> // size_t.
|
||||
|
||||
// Enforce a C API.
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Use the preprocessor to make the new API compatible with the old one.
|
||||
|
||||
#define TalkbackStartupLibrary TalkBackStartupLibrary
|
||||
#define TalkbackShutdownLibrary TalkBackShutdownLibrary
|
||||
#define TalkbackGetVersion TalkBackGetVersion
|
||||
#define TalkbackGetVersionString TalkBackGetVersionString
|
||||
#define TalkbackCheckSoundFile TalkBackCheckSoundFile
|
||||
#define TalkbackCheckSpokenText TalkBackCheckSpokenText
|
||||
#define TalkbackGetErrorString TalkBackGetErrorString
|
||||
#define TalkbackGetAnalysis TalkBackGetAnalysis
|
||||
#define TalkbackFreeAnalysis TalkBackFreeAnalysis
|
||||
#define TalkbackGetFirstFrameNum TalkBackGetFirstFrameNum
|
||||
#define TalkbackGetLastFrameNum TalkBackGetLastFrameNum
|
||||
#define TalkbackGetFrameStartTime TalkBackGetFrameStartTime
|
||||
#define TalkbackGetFrameEndTime TalkBackGetFrameEndTime
|
||||
#define TalkbackGetNumPhonemes TalkBackGetNumPhonemes
|
||||
#define TalkbackGetPhonemeEnum TalkBackGetPhonemeEnum
|
||||
#define TalkbackGetPhonemeStartTime TalkBackGetPhonemeStartTime
|
||||
#define TalkbackGetPhonemeEndTime TalkBackGetPhonemeEndTime
|
||||
#define TalkbackInsertPhoneme TalkBackInsertPhoneme
|
||||
#define TalkbackDeletePhoneme TalkBackDeletePhoneme
|
||||
#define TalkbackChangePhonemeStart TalkBackChangePhonemeStart
|
||||
#define TalkbackChangePhonemeEnd TalkBackChangePhonemeEnd
|
||||
#define TalkbackChangePhonemeEnum TalkBackChangePhonemeEnum
|
||||
#define TalkbackGetNumWords TalkBackGetNumWords
|
||||
#define TalkbackGetWord TalkBackGetWord
|
||||
#define TalkbackGetWordStartTime TalkBackGetWordStartTime
|
||||
#define TalkbackGetWordEndTime TalkBackGetWordEndTime
|
||||
#define TalkbackGetNumSpeechTargetTracks TalkBackGetNumSpeechTargetTracks
|
||||
#define TalkbackGetNumSpeechTargetKeys TalkBackGetNumSpeechTargetKeys
|
||||
#define TalkbackGetSpeechTargetKeyInfo TalkBackGetSpeechTargetKeyInfo
|
||||
#define TalkbackGetSpeechTargetValueAtFrame TalkBackGetSpeechTargetValueAtFrame
|
||||
#define TalkbackGetDominantSpeechTargetAtFrame TalkBackGetDominantSpeechTargetAtFrame
|
||||
#define TalkbackGetSpeechTargetValueAtTime TalkBackGetSpeechTargetValueAtTime
|
||||
#define TalkbackGetSpeechTargetDerivativesAtTime TalkBackGetSpeechTargetDerivativesAtTime
|
||||
#define TalkbackGetNumGestureTracks TalkBackGetNumGestureTracks
|
||||
#define TalkbackGetNumGestureKeys TalkBackGetNumGestureKeys
|
||||
#define TalkbackGetGestureKeyInfo TalkBackGetGestureKeyInfo
|
||||
#define TalkbackGetGestureValueAtFrame TalkBackGetGestureValueAtFrame
|
||||
#define TalkbackGetGestureValueAtTime TalkBackGetGestureValueAtTime
|
||||
#define TalkbackGetGestureDerivativesAtTime TalkBackGetGestureDerivativesAtTime
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// For debug builds, set this to a non-zero value to get verbose debugging
|
||||
// output from TalkBack.
|
||||
|
||||
extern int g_enableTalkBackDebuggingOutput;
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Miscellaneous constants.
|
||||
|
||||
// For calling TalkBackGetAnalysis() with all defaults.
|
||||
#define TALKBACK_DEFAULT_SETTINGS NULL
|
||||
|
||||
// For setting the iSoundText parameter in TalkBackGetAnalysis() to "no text."
|
||||
#define TALKBACK_NO_TEXT NULL
|
||||
|
||||
// Handy constants for TALKBACK_ANALYSIS_SETTINGS fields:
|
||||
|
||||
// For setting fSize.
|
||||
#define TALKBACK_SETTINGS_SIZE sizeof(TALKBACK_ANALYSIS_SETTINGS)
|
||||
// For setting fFrameRate to the
|
||||
// default.
|
||||
#define TALKBACK_DEFAULT_FRAME_RATE 30
|
||||
// For setting fOptimizeForFlipbook
|
||||
// to *not* optimize for flipbook.
|
||||
#define TALKBACK_OPTIMIZE_FOR_FLIPBOOK_OFF 0
|
||||
// For setting fOptimizeForFlipbook
|
||||
// to optimize for flipbook.
|
||||
#define TALKBACK_OPTIMIZE_FOR_FLIPBOOK_ON 1
|
||||
// For setting fRandomSeed to use the
|
||||
// current time to seed the random
|
||||
// number generator and thereby get
|
||||
// non-deterministic speech gestures.
|
||||
#define TALKBACK_RANDOM_SEED -1
|
||||
// For setting fConfigFile to "no
|
||||
// config file."
|
||||
#define TALKBACK_NO_CONFIG_FILE NULL
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Data types.
|
||||
|
||||
// TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
typedef long TALKBACK_ERR;
|
||||
|
||||
// Opaque analysis results.
|
||||
typedef void TALKBACK_ANALYSIS;
|
||||
|
||||
// Speech target.
|
||||
typedef long TALKBACK_SPEECH_TARGET;
|
||||
|
||||
// Speech gesture.
|
||||
typedef long TALKBACK_GESTURE;
|
||||
|
||||
// Phoneme.
|
||||
typedef long TALKBACK_PHONEME;
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Data structures.
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
||||
// Optional analysis settings passed to TalkBackGetAnalysis().
|
||||
typedef struct
|
||||
{
|
||||
// Set this field to sizeof(TALKBACK_ANALYSIS_SETTINGS) before using the
|
||||
// structure.
|
||||
long fSize;
|
||||
// Frame rate for analysis. This only matters if you will be using *AtFrame
|
||||
// functions.
|
||||
//
|
||||
// Default value: 30 (frames per second).
|
||||
long fFrameRate;
|
||||
// Set this to 1 to optimize for flipbook output, 0 to do analysis normally.
|
||||
//
|
||||
// Default value: 0 (normal analysis).
|
||||
long fOptimizeForFlipbook;
|
||||
// Set this to -1 to seed the random number generator with the current time.
|
||||
// Any other number will be used directly for the random number seed, which
|
||||
// is useful if you want repeatable speech gestures. This value does not
|
||||
// influence lip-synching at all.
|
||||
//
|
||||
// Default value: -1 (use current time).
|
||||
long fRandomSeed;
|
||||
// Path to the configuration (.INI) file with phoneme-to-speech-target
|
||||
// mapping. Set this to NULL to use the default mapping.
|
||||
//
|
||||
// Default value: NULL (use default mapping).
|
||||
char const *fConfigFile;
|
||||
} TALKBACK_ANALYSIS_SETTINGS;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
// Set this field to sizeof(TALKBACK_SOUND_FILE_METRICS) before using the
|
||||
// structure. This will allow the structure to evolve if necessary.
|
||||
size_t m_size;
|
||||
// Bits per sample.
|
||||
long m_bitsPerSample;
|
||||
// Sample rate in Hertz.
|
||||
long m_sampleRate;
|
||||
// Duration of the audio in seconds.
|
||||
double m_duration;
|
||||
// 1 if the sound file can be analyzed, 0 if not.
|
||||
long m_canBeAnalyzed;
|
||||
// 1 if the sound file is clipped, 0 if not.
|
||||
long m_isClipped;
|
||||
// The decibel range of the sound file.
|
||||
double m_decibelRange;
|
||||
// A quality value for the sound file: the nominal range is 0 to 100. Try
|
||||
// to keep it above 45 for good results.
|
||||
int m_quality;
|
||||
|
||||
// Added for version 2 of the metrics structure:
|
||||
// ---------------------------------------------
|
||||
// The number of channels in the sound file: 1 for mono, 2 for stereo, etc.
|
||||
long m_channelCount;
|
||||
} TALKBACK_SOUND_FILE_METRICS;
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Constants.
|
||||
|
||||
// TalkBack error codes. Use TalkBackGetErrorString() to return text
|
||||
// descriptions for these codes.
|
||||
enum
|
||||
{
|
||||
// Windows convention: set this bit to indicate an application-defined error
|
||||
// code.
|
||||
BIT29 = (1 << 29),
|
||||
// Success (not an error).
|
||||
TALKBACK_NOERR = 0,
|
||||
// The first error code: useful for iterating through the error codes.
|
||||
TALKBACK_ERROR_FIRST = 4201 | BIT29,
|
||||
// Generic error.
|
||||
TALKBACK_ERROR = TALKBACK_ERROR_FIRST,
|
||||
// TalkBackStartupLibrary() failed [internal error] or was never called.
|
||||
TALKBACK_STARTUP_FAILED_ERR,
|
||||
// TalkBackShutdownLibrary() failed, either because
|
||||
// TalkBackStartupLibrary() was never called or because
|
||||
// TalkBackShutdownLibrary() has already been called.
|
||||
TALKBACK_SHUTDOWN_FAILED_ERR,
|
||||
// The TalkBack data files could not be found [invalid path or missing
|
||||
// files].
|
||||
TALKBACK_CORE_DATA_NOT_FOUND_ERR,
|
||||
// One or more of the parameters are NULL.
|
||||
TALKBACK_NULL_PARAMETER_ERR,
|
||||
// One or more of the parameters is invalid.
|
||||
TALKBACK_INVALID_PARAMETER_ERR,
|
||||
// The analysis object pointer is invalid.
|
||||
TALKBACK_INVALID_ANALYSIS_ERR,
|
||||
// Analysis failed [the sound file cannot be analyzed or an internal error
|
||||
// occurred].
|
||||
TALKBACK_ANALYSIS_FAILED_ERR,
|
||||
// One or more of the indices (track, key, frame, word, phoneme) are
|
||||
// invalid (out of range).
|
||||
TALKBACK_INVALID_INDEX_ERR,
|
||||
// The time parameter is invalid (out of range).
|
||||
TALKBACK_INVALID_TIME_ERR,
|
||||
// A serious internal error occurred in TalkBack; please alert LIPSinc by
|
||||
// sending mail with a description of how the error was triggered to
|
||||
// talkback-support@LIPSinc.com.
|
||||
TALKBACK_INTERNAL_ERR,
|
||||
// Could not open the specified sound file.
|
||||
TALKBACK_COULD_NOT_LOAD_SOUND_ERR,
|
||||
// TalkBackStartupLibrary() has not been called.
|
||||
TALKBACK_STARTUP_NOT_CALLED,
|
||||
// The configuration file specified in the TALKBACK_ANALYSIS_SETTINGS
|
||||
// structure is invalid.
|
||||
TALKBACK_CONFIG_PARSE_ERROR,
|
||||
// The last error code: useful for iterating through the error codes.
|
||||
TALKBACK_ERROR_LAST = TALKBACK_CONFIG_PARSE_ERROR
|
||||
};
|
||||
|
||||
// Default lip-synching track identifiers.
|
||||
//
|
||||
// NOTE: these track identifiers apply *only* to the default phoneme-to-track
|
||||
// mapping! Consult the TalkBack Reference Guide for more details.
|
||||
//
|
||||
// NOTE: these values are valid *only* if you use the default mapping and are
|
||||
// provided as a convenience. If you use your own mapping, these values
|
||||
// are invalid and should not be used.
|
||||
|
||||
enum
|
||||
{
|
||||
TALKBACK_SPEECH_TARGET_INVALID = -1,
|
||||
TALKBACK_SPEECH_TARGET_FIRST = 0,
|
||||
TALKBACK_SPEECH_TARGET_EAT = TALKBACK_SPEECH_TARGET_FIRST, // 0
|
||||
TALKBACK_SPEECH_TARGET_EARTH, // 1
|
||||
TALKBACK_SPEECH_TARGET_IF, // 2
|
||||
TALKBACK_SPEECH_TARGET_OX, // 3
|
||||
TALKBACK_SPEECH_TARGET_OAT, // 4
|
||||
TALKBACK_SPEECH_TARGET_WET, // 5
|
||||
TALKBACK_SPEECH_TARGET_SIZE, // 6
|
||||
TALKBACK_SPEECH_TARGET_CHURCH, // 7
|
||||
TALKBACK_SPEECH_TARGET_FAVE, // 8
|
||||
TALKBACK_SPEECH_TARGET_THOUGH, // 9
|
||||
TALKBACK_SPEECH_TARGET_TOLD, // 10
|
||||
TALKBACK_SPEECH_TARGET_BUMP, // 11
|
||||
TALKBACK_SPEECH_TARGET_NEW, // 12
|
||||
TALKBACK_SPEECH_TARGET_ROAR, // 13
|
||||
TALKBACK_SPEECH_TARGET_CAGE, // 14
|
||||
TALKBACK_SPEECH_TARGET_LAST = TALKBACK_SPEECH_TARGET_CAGE, // 14
|
||||
TALKBACK_NUM_SPEECH_TARGETS // 15 (0..14)
|
||||
};
|
||||
|
||||
// Speech gesture track identifiers.
|
||||
|
||||
enum
|
||||
{
|
||||
TALKBACK_GESTURE_INVALID = -1,
|
||||
TALKBACK_GESTURE_FIRST = 0,
|
||||
TALKBACK_GESTURE_EYEBROW_RAISE_LEFT = TALKBACK_GESTURE_FIRST, // 0
|
||||
TALKBACK_GESTURE_EYEBROW_RAISE_RIGHT, // 1
|
||||
TALKBACK_GESTURE_BLINK_LEFT, // 2
|
||||
TALKBACK_GESTURE_BLINK_RIGHT, // 3
|
||||
TALKBACK_GESTURE_HEAD_BEND, // 4
|
||||
TALKBACK_GESTURE_HEAD_SIDE_SIDE, // 5
|
||||
TALKBACK_GESTURE_HEAD_TWIST, // 6
|
||||
TALKBACK_GESTURE_EYE_SIDE_SIDE_LEFT, // 7
|
||||
TALKBACK_GESTURE_EYE_SIDE_SIDE_RIGHT, // 8
|
||||
TALKBACK_GESTURE_EYE_UP_DOWN_LEFT, // 9
|
||||
TALKBACK_GESTURE_EYE_UP_DOWN_RIGHT, // 10
|
||||
TALKBACK_GESTURE_LAST = TALKBACK_GESTURE_EYE_UP_DOWN_RIGHT, // 10
|
||||
TALKBACK_NUM_GESTURES // 11 (0..10)
|
||||
};
|
||||
|
||||
// Phoneme identifiers.
|
||||
|
||||
enum
|
||||
{
|
||||
TALKBACK_PHONEME_INVALID = -1,
|
||||
TALKBACK_PHONEME_FIRST = 0,
|
||||
TALKBACK_PHONEME_IY = TALKBACK_PHONEME_FIRST, // 0
|
||||
TALKBACK_PHONEME_IH, // 1
|
||||
TALKBACK_PHONEME_EH, // 2
|
||||
TALKBACK_PHONEME_EY, // 3
|
||||
TALKBACK_PHONEME_AE, // 4
|
||||
TALKBACK_PHONEME_AA, // 5
|
||||
TALKBACK_PHONEME_AW, // 6
|
||||
TALKBACK_PHONEME_AY, // 7
|
||||
TALKBACK_PHONEME_AH, // 8
|
||||
TALKBACK_PHONEME_AO, // 9
|
||||
TALKBACK_PHONEME_OY, // 10
|
||||
TALKBACK_PHONEME_OW, // 11
|
||||
TALKBACK_PHONEME_UH, // 12
|
||||
TALKBACK_PHONEME_UW, // 13
|
||||
TALKBACK_PHONEME_ER, // 14
|
||||
TALKBACK_PHONEME_AX, // 15
|
||||
TALKBACK_PHONEME_S, // 16
|
||||
TALKBACK_PHONEME_SH, // 17
|
||||
TALKBACK_PHONEME_Z, // 18
|
||||
TALKBACK_PHONEME_ZH, // 19
|
||||
TALKBACK_PHONEME_F, // 20
|
||||
TALKBACK_PHONEME_TH, // 21
|
||||
TALKBACK_PHONEME_V, // 22
|
||||
TALKBACK_PHONEME_DH, // 23
|
||||
TALKBACK_PHONEME_M, // 24
|
||||
TALKBACK_PHONEME_N, // 25
|
||||
TALKBACK_PHONEME_NG, // 26
|
||||
TALKBACK_PHONEME_L, // 27
|
||||
TALKBACK_PHONEME_R, // 28
|
||||
TALKBACK_PHONEME_W, // 29
|
||||
TALKBACK_PHONEME_Y, // 30
|
||||
TALKBACK_PHONEME_HH, // 31
|
||||
TALKBACK_PHONEME_B, // 32
|
||||
TALKBACK_PHONEME_D, // 33
|
||||
TALKBACK_PHONEME_JH, // 34
|
||||
TALKBACK_PHONEME_G, // 35
|
||||
TALKBACK_PHONEME_P, // 36
|
||||
TALKBACK_PHONEME_T, // 37
|
||||
TALKBACK_PHONEME_K, // 38
|
||||
TALKBACK_PHONEME_CH, // 39
|
||||
TALKBACK_PHONEME_SIL, // 40
|
||||
TALKBACK_PHONEME_LAST = TALKBACK_PHONEME_SIL, // 40
|
||||
TALKBACK_NUM_PHONEMES // 41 (0..40)
|
||||
};
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Function declarations.
|
||||
|
||||
// ---------------------------
|
||||
// Startup/shutdown functions.
|
||||
// ---------------------------
|
||||
|
||||
// Must be the first function called when using TalkBack.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackStartupLibrary(
|
||||
char const *iCoreDataDir); // IN: full path of folder containing TalkBack data files.
|
||||
|
||||
// Should be the last function called when using TalkBack.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackShutdownLibrary(); // IN: nothing.
|
||||
|
||||
// ------------------
|
||||
// Version functions.
|
||||
// ------------------
|
||||
|
||||
// Gets the TalkBack version number.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetVersion(
|
||||
long *oMajor, // OUT: major version number.
|
||||
long *oMinor, // OUT: minor version number.
|
||||
long *oRevision); // OUT: revision version number.
|
||||
|
||||
// Gets the TalkBack version number as a string.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetVersionString(
|
||||
long iMaxChars, // IN: size of version string buffer.
|
||||
char *oVersion); // OUT: version string buffer.
|
||||
|
||||
// ------------------
|
||||
// Utility functions.
|
||||
// ------------------
|
||||
|
||||
// Checks whether a sound file can be analyzed and returns some quality metrics.
|
||||
//
|
||||
// NOTE: this function is deprecated and has been supplanted by
|
||||
// TalkBackGetSoundFileMetrics().
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackCheckSoundFile(
|
||||
char const *iSoundFileName, // IN: name of sound file to be checked.
|
||||
long *oCanBeAnalyzed, // OUT: 1 if sound can be analyzed, 0 if not.
|
||||
long *oIsClipped, // OUT: 1 if sound is clipped, 0 if not.
|
||||
double *oDecibelRange); // OUT: used decibel range of sound.
|
||||
|
||||
// Returns metrics for the specified sound file.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetSoundFileMetrics(
|
||||
char const *iSoundFileName, // IN: name of sound file to be checked.
|
||||
TALKBACK_SOUND_FILE_METRICS *ioMetrics); // IN/OUT: address of a structure where the metrics will be stored.
|
||||
|
||||
// Checks whether text can be used for text-based analysis, returning the text
|
||||
// as it will be analyzed.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackCheckSpokenText(
|
||||
char const *iSpokenText, // IN: text to check.
|
||||
long iMaxChars, // IN: size of analyzed text buffer.
|
||||
char *oAnalyzedText); // OUT: buffer for text as it will be analyzed.
|
||||
|
||||
// Convert a TalkBack error code to a description string.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetErrorString(
|
||||
TALKBACK_ERR iErrorCode, // IN: TalkBack error code to convert.
|
||||
long iMaxChars, // IN: size of the buffer.
|
||||
char *oErrorString); // OUT: buffer for the description string.
|
||||
|
||||
// Gets the error code and text for the most recent TalkBack error.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetLastError(
|
||||
long iMaxChars, // IN: size of the buffer.
|
||||
char *oErrorString, // OUT: buffer for the description string.
|
||||
TALKBACK_ERR *oErrorCode); // OUT: most recent TalkBack error code.
|
||||
|
||||
// -------------------
|
||||
// Analysis functions.
|
||||
// -------------------
|
||||
|
||||
// Gets an opaque TALKBACK_ANALYSIS object. This object is then queried with the
|
||||
// TalkBackGet* functions below.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetAnalysis(
|
||||
TALKBACK_ANALYSIS **ioAnalysis, // IN/OUT: address of a TALKBACK_ANALYSIS *variable where analysis will be stored.
|
||||
char const *iSoundFileName, // IN: name of the sound file to analyze.
|
||||
char const *iSoundText, // IN: text spoken in sound file (can be NULL to use textless analysis).
|
||||
TALKBACK_ANALYSIS_SETTINGS *iSettings); // IN: pointer to a TALKBACK_ANALYSIS_SETTINGS structure (can be NULL for defaults).
|
||||
|
||||
// Frees an opaque TALKBACK_ANALYSIS object. This releases all memory used by
|
||||
// the analysis.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackFreeAnalysis(
|
||||
TALKBACK_ANALYSIS **ioAnalysis); // IN/OUT: analysis to free.
|
||||
|
||||
// #######################################################################
|
||||
// NOTE: all functions from this point on require a valid analysis object.
|
||||
// #######################################################################
|
||||
|
||||
// ------------------------
|
||||
// Speech target functions.
|
||||
// ------------------------
|
||||
|
||||
// Gets the number of speech target tracks.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetNumSpeechTargetTracks(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long *oResult); // OUT: number of speech target tracks.
|
||||
|
||||
// Gets the number of keys in the specified speech target track.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetNumSpeechTargetKeys(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long iTrackNum, // IN: speech target track.
|
||||
long *oResult); // OUT: number of keys in the speech target track.
|
||||
|
||||
// Gets key information (time, value, derivative in, and derivative out) for the
|
||||
// specified key in the specified speech target track.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetSpeechTargetKeyInfo(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long iTrackNum, // IN: speech target track.
|
||||
long iKeyNum, // IN: speech target key.
|
||||
double *oTime, // OUT: time of key.
|
||||
double *oValue, // OUT: value of key.
|
||||
double *oDerivativeIn, // OUT: incoming derivative of key.
|
||||
double *oDerivativeOut); // OUT: outgoing derivative of key.
|
||||
|
||||
// Gets the value of the function curve for the specified speech target track at
|
||||
// the specified time.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetSpeechTargetValueAtTime(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long iTrackNum, // IN: speech target track.
|
||||
double iTime, // IN: time in seconds.
|
||||
double *oResult); // OUT: value of the function curve.
|
||||
|
||||
// Gets the derivatives of the function curve for the specified speech target
|
||||
// track at the specified time.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetSpeechTargetDerivativesAtTime(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long iTrackNum, // IN: speech target track.
|
||||
double iTime, // IN: time in seconds.
|
||||
double *oDerivativeIn, // OUT: value of the incoming derivative of the function curve.
|
||||
double *oDerivativeOut); // OUT: value of the outgoing derivative of the function curve.
|
||||
|
||||
// -------------------------
|
||||
// Speech gesture functions.
|
||||
// -------------------------
|
||||
|
||||
// Gets the number of speech gesture tracks.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetNumGestureTracks(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long *oResult); // OUT: number of speech gesture tracks
|
||||
|
||||
// Gets the number of keys in the specified speech gesture track.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetNumGestureKeys(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long iTrackNum, // IN: speech gesture track.
|
||||
long *oResult); // OUT: number of keys in the speech gesture track.
|
||||
|
||||
// Gets key information (time, value, derivative in, and derivative out) for the
|
||||
// specified key in the specified speech gesture track.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetGestureKeyInfo(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long iTrackNum, // IN: speech gesture track.
|
||||
long iKeyNum, // IN: speech gesture key.
|
||||
double *oTime, // OUT: time of key.
|
||||
double *oValue, // OUT: value of key.
|
||||
double *oDerivativeIn, // OUT: incoming derivative of key.
|
||||
double *oDerivativeOut); // OUT: outgoing derivative of key.
|
||||
|
||||
// Gets the value of the function curve for the specified speech gesture track
|
||||
// at the specified time.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetGestureValueAtTime(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long iTrackNum, // IN: speech gesture track.
|
||||
double iTime, // IN: time in seconds.
|
||||
double *oResult); // OUT: value of the function curve.
|
||||
|
||||
// Gets the derivatives of the function curve for the specified speech gesture
|
||||
// track at the specified time.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetGestureDerivativesAtTime(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long iTrackNum, // IN: speech gesture track.
|
||||
double iTime, // IN: time in seconds.
|
||||
double *oDerivativeIn, // OUT: value of the incoming derivative of the function curve.
|
||||
double *oDerivativeOut); // OUT: value of the outgoing derivative of the function curve.
|
||||
|
||||
// ----------------
|
||||
// Frame functions.
|
||||
// ----------------
|
||||
|
||||
// NOTE: these functions use the frame rate specified in the
|
||||
// TALKBACK_ANALYSIS_SETTINGS structure passed to TalkBackGetAnalysis() and
|
||||
// default to 30 fps (TALKBACK_DEFAULT_FRAME_RATE) if the structure pointer was
|
||||
// NULL.
|
||||
|
||||
// Gets the first frame number.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetFirstFrameNum(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long *oResult); // OUT: number of the first frame.
|
||||
|
||||
// Gets the last frame number.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetLastFrameNum(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long *oResult); // OUT: number of the last frame.
|
||||
|
||||
// Gets the start time of the specified frame.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetFrameStartTime(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long iFrameNum, // IN: frame.
|
||||
double *oResult); // OUT: start time of the frame in seconds.
|
||||
|
||||
// Gets the end time of the specified frame.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetFrameEndTime(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long iFrameNum, // IN: frame.
|
||||
double *oResult); // OUT: end time of the frame in seconds.
|
||||
|
||||
// Gets the value of the function curve for a speech target integrated over the
|
||||
// specified frame.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetSpeechTargetValueAtFrame(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long iTrackNum, // IN: speech target track.
|
||||
long iFrameNum, // IN: frame number.
|
||||
double *oResult); // OUT: value of the function curve integrated over the frame.
|
||||
|
||||
// Gets the dominant speech target at the specified frame.
|
||||
//
|
||||
// NOTE: this function is meant to be used in flipbook mode only.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetDominantSpeechTargetAtFrame(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long iFrameNum, // IN: frame number.
|
||||
TALKBACK_SPEECH_TARGET *oSpeechTarget); // OUT: dominant speech target.
|
||||
|
||||
// Gets the value of the function curve for a speech gesture integrated over the
|
||||
// specified frame.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetGestureValueAtFrame(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long iTrackNum, // IN: speech gesture track.
|
||||
long iFrameNum, // IN: frame number.
|
||||
double *oResult); // OUT: value of the function curve integrated over the frame.
|
||||
|
||||
// ------------------
|
||||
// Phoneme functions.
|
||||
// ------------------
|
||||
|
||||
// Gets the number of phonemes.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetNumPhonemes(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long *oResult); // OUT: number of phonemes.
|
||||
|
||||
// Gets the enumeration of the specified phoneme.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetPhonemeEnum(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long iPhonemeNum, // IN: phoneme.
|
||||
TALKBACK_PHONEME *oResult); // OUT: enumeration of the specified phoneme.
|
||||
|
||||
// Gets the start time of the specified phoneme.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetPhonemeStartTime(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long iPhonemeNum, // IN: phoneme.
|
||||
double *oResult); // OUT: start time of the phoneme in seconds.
|
||||
|
||||
// Gets the end time of the specified phoneme.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetPhonemeEndTime(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long iPhonemeNum, // IN: phoneme.
|
||||
double *oResult); // OUT: end time of the phoneme in seconds.
|
||||
|
||||
// ---------------
|
||||
// Word functions.
|
||||
// ---------------
|
||||
|
||||
// NOTE: these functions only yield data for text-based analysis.
|
||||
|
||||
// Gets the number of words.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetNumWords(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long *oResult); // OUT: number of words.
|
||||
|
||||
// Gets the text of the specified word.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetWord(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long iWordNum, // IN: word.
|
||||
long iMaxChars, // IN: size of word buffer.
|
||||
char *oWord); // OUT: word buffer.
|
||||
|
||||
// Gets the start time of the specified word.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetWordStartTime(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long iWordNum, // IN: word.
|
||||
double *oResult); // OUT: start time of the word in seconds.
|
||||
|
||||
// Gets the end time of the specified word.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackGetWordEndTime(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long iWordNum, // IN: word.
|
||||
double *oResult); // OUT: end time of the word in seconds.
|
||||
|
||||
// --------------------------
|
||||
// Phoneme editing functions.
|
||||
// --------------------------
|
||||
|
||||
// Use these functions to modify the phoneme list after you get an opaque
|
||||
// analysis object from TalkBackGetAnalysis(). After modifying the phoneme list
|
||||
// in the opaque analysis object, subsequent TalkBackGet* calls on that opaque
|
||||
// analysis object for speech target (lip-synching) data will return values
|
||||
// based on the modified phoneme list. However, speech gesture data is not
|
||||
// affected by phoneme editing.
|
||||
//
|
||||
// NOTE: phoneme editing is only provided in order to support Ventriloquist-like
|
||||
// applications where tweaking of the phoneme segmenation (and subsequent
|
||||
// recalculation of the animation data) is required. Most customers probably
|
||||
// won't need this functionality.
|
||||
|
||||
// Inserts a phoneme at the specified position in the specified manner.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackInsertPhoneme(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
TALKBACK_PHONEME iPhoneme, // IN: enumeration of phoneme to insert.
|
||||
long iInsertPosition, // IN: position (phoneme number) at which to insert.
|
||||
int iInsertBefore); // IN: manner of insertion:
|
||||
// 0 means put phoneme after insert position;
|
||||
// 1 means put phoneme before insert position.
|
||||
|
||||
// Deletes the specified phoneme.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackDeletePhoneme(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long iPhonemeToDelete); // IN: phoneme to delete.
|
||||
|
||||
// Changes the start time of the specified phoneme.
|
||||
//
|
||||
// NOTE: the start time specified may not be the actual start time for a number
|
||||
// of reasons, most notably if the specified start time will make the phoneme
|
||||
// too short. This function returns the actual start time so the caller can
|
||||
// check the result without having to query the phoneme.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackChangePhonemeStart(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long iPhonemeToChange, // IN: phoneme to change.
|
||||
double *ioNewTime); // IN/OUT: new start time value in seconds (in); actual start time (out).
|
||||
|
||||
// Changes the end time of the specified phoneme.
|
||||
//
|
||||
// NOTE: the end time specified may not be the actual end time for a number of
|
||||
// reasons, most notably if the specified end time will make the phoneme too
|
||||
// short. This function returns the actual end time so the caller can check the
|
||||
// result without having to query the phoneme.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackChangePhonemeEnd(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long iPhonemeToChange, // IN: phoneme to change.
|
||||
double *ioNewTime); // IN/OUT: new end time value in seconds (in); actual end time (out).
|
||||
|
||||
// Changes the enumeration of the specified phoneme.
|
||||
TALKBACK_ERR // RETURNS: TALKBACK_NOERR if successful, TalkBack error code if not.
|
||||
TalkBackChangePhonemeEnum(
|
||||
TALKBACK_ANALYSIS *iAnalysis, // IN: opaque analysis object returned by TalkBackGetAnalysis().
|
||||
long iPhonemeToChange, // IN: phoneme to change.
|
||||
TALKBACK_PHONEME iNewPhoneme); // IN: new phoneme enumeration.
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user