Init comit

This commit is contained in:
Gigaslav
2025-05-21 21:20:08 +03:00
parent c59edfa1ce
commit 9a283535e7
5961 changed files with 2343666 additions and 0 deletions

View File

@@ -0,0 +1,386 @@
//******************************************************************************
// Copyright (c) Microsoft Corporation. All rights reserved.
// tuxdll.cpp
//
//******************************************************************************
//******************************************************************************
//***** Make sure _WIN32_WCE is set when building for Windows CE
//******************************************************************************
#if defined(PEGASUS) && !defined(_WIN32_WCE)
#define _WIN32_WCE
#endif
#if defined(UNDER_CE) && !defined(_WIN32_WCE)
#define _WIN32_WCE
#endif
//******************************************************************************
//***** Includes
//******************************************************************************
#ifndef _WIN32_DCOM
#define _WIN32_DCOM 1
#endif
#include <objbase.h>
#include <windows.h>
#include <atlbase.h>
#include <tchar.h>
#include <kato.h>
#include <tux.h>
#ifndef _WIN32_WCE
#include <stdio.h>
#endif
//******************************************************************************
//***** Global Constants
//******************************************************************************
#define LOG_EXCEPTION 0
#define LOG_FAIL 2
#define LOG_ABORT 4
#define LOG_SKIP 6
#define LOG_NOT_IMPLEMENTED 8
#define LOG_PASS 10
#define LOG_DETAIL 12
#define LOG_COMMENT 14
//******************************************************************************
//***** Global Variables
//******************************************************************************
// Global CKato logging object. Set while processing SPM_LOAD_DLL message.
CKato *g_pKato = NULL;
// Global shell info structure. Set while processing SPM_SHELL_INFO message.
SPS_SHELL_INFO *g_pShellInfo;
// Global critical section to be used by threaded tests if necessary.
CRITICAL_SECTION g_csProcess;
//******************************************************************************
//***** Test functions
//******************************************************************************
extern void CleanupTest( void );
extern HRESULT PreTestSetup( void );
extern HRESULT PostTestCleanup( void );
//******************************************************************************
//***** Windows CE specific code
//******************************************************************************
#ifdef _WIN32_WCE
#ifndef STARTF_USESIZE
#define STARTF_USESIZE 0x00000002
#endif
#ifndef STARTF_USEPOSITION
#define STARTF_USEPOSITION 0x00000004
#endif
#ifndef ZeroMemory
#define ZeroMemory(Destination,Length) memset(Destination, 0, Length)
#endif
#ifndef _vsntprintf
#define _vsntprintf(d,c,f,a) wvsprintf(d,f,a)
#endif
BOOL WINAPI DllMain(HANDLE hInstance, ULONG dwReason, LPVOID lpReserved) {
return TRUE;
}
#endif
//******************************************************************************
//***** Internal Macros
//******************************************************************************
#ifndef countof
#define countof(a) (sizeof(a)/sizeof(*(a)))
#endif
//******************************************************************************
//***** Our Debug Output Function
//******************************************************************************
void TRACE(LPCTSTR szFormat, ...) {
TCHAR szBuffer[1024] = TEXT("TUXDLL: ");
va_list pArgs;
va_start(pArgs, szFormat);
_vsntprintf(szBuffer + 9, countof(szBuffer) - 11, szFormat, pArgs);
va_end(pArgs);
_tcscat(szBuffer, TEXT("\r\n"));
OutputDebugString(szBuffer);
}
//******************************************************************************
//***** ShellProc()
//******************************************************************************
SHELLPROCAPI ShellProc(UINT uMsg, SPPARAM spParam) {
switch (uMsg) {
//------------------------------------------------------------------------
// Message: SPM_LOAD_DLL
//
// Sent once to the DLL immediately after it is loaded. The spParam
// parameter will contain a pointer to a SPS_LOAD_DLL structure. The DLL
// should set the fUnicode member of this structre to TRUE if the DLL is
// built with the UNICODE flag set. By setting this flag, Tux will ensure
// that all strings passed to your DLL will be in UNICODE format, and all
// strings within your function table will be processed by Tux as UNICODE.
// The DLL may return SPR_FAIL to prevent the DLL from continuing to load.
//------------------------------------------------------------------------
case SPM_LOAD_DLL: {
TRACE(TEXT("ShellProc(SPM_LOAD_DLL, ...) called"));
// If we are UNICODE, then tell Tux this by setting the following flag.
#ifdef UNICODE
((LPSPS_LOAD_DLL)spParam)->fUnicode = TRUE;
#else
((LPSPS_LOAD_DLL)spParam)->fUnicode = FALSE;
#endif
// Get/Create our global logging object.
g_pKato = (CKato*)KatoGetDefaultObject();
CoInitializeEx(NULL, COINIT_MULTITHREADED);
// Initialize our global critical section.
InitializeCriticalSection(&g_csProcess);
return SPR_HANDLED;
}
//------------------------------------------------------------------------
// Message: SPM_UNLOAD_DLL
//
// Sent once to the DLL immediately before it is unloaded.
//------------------------------------------------------------------------
case SPM_UNLOAD_DLL: {
TRACE(TEXT("ShellProc(SPM_UNLOAD_DLL, ...) called"));
// This is a good place to destroy our global critical section.
DeleteCriticalSection(&g_csProcess);
//cleanup test
CleanupTest();
// counitialize
CoUninitialize();
return SPR_HANDLED;
}
//------------------------------------------------------------------------
// Message: SPM_SHELL_INFO
//
// Sent once to the DLL immediately after SPM_LOAD_DLL to give the DLL
// some useful information about its parent shell and environment. The
// spParam parameter will contain a pointer to a SPS_SHELL_INFO structure.
// The pointer to the structure may be stored for later use as it will
// remain valid for the life of this Tux Dll. The DLL may return SPR_FAIL
// to prevent the DLL from continuing to load.
//------------------------------------------------------------------------
case SPM_SHELL_INFO: {
TRACE(TEXT("ShellProc(SPM_SHELL_INFO, ...) called"));
// Store a pointer to our shell info for later use.
g_pShellInfo = (LPSPS_SHELL_INFO)spParam;
// Display our Dlls command line if we have one.
if (g_pShellInfo->szDllCmdLine && *g_pShellInfo->szDllCmdLine) {
MessageBox(g_pShellInfo->hWnd, g_pShellInfo->szDllCmdLine,
TEXT("TUXDLL.DLL Command Line Arguments"), MB_OK);
}
return SPR_HANDLED;
}
//------------------------------------------------------------------------
// Message: SPM_REGISTER
//
// This is the only ShellProc() message that a DLL is required to handle
// (except for SPM_LOAD_DLL if you are UNICODE). This message is sent
// once to the DLL immediately after the SPM_SHELL_INFO message to query
// the DLL for it<69>s function table. The spParam will contain a pointer to
// a SPS_REGISTER structure. The DLL should store its function table in
// the lpFunctionTable member of the SPS_REGISTER structure. The DLL may
// return SPR_FAIL to prevent the DLL from continuing to load.
//------------------------------------------------------------------------
case SPM_REGISTER: {
TRACE(TEXT("ShellProc(SPM_REGISTER, ...) called"));
((LPSPS_REGISTER)spParam)->lpFunctionTable = g_lpFTE;
#ifdef UNICODE
return SPR_HANDLED | SPF_UNICODE;
#else
return SPR_HANDLED;
#endif
}
//------------------------------------------------------------------------
// Message: SPM_START_SCRIPT
//
// Sent to the DLL immediately before a script is started. It is sent to
// all Tux DLLs, including loaded Tux DLLs that are not in the script.
// All DLLs will receive this message before the first TestProc() in the
// script is called.
//------------------------------------------------------------------------
case SPM_START_SCRIPT: {
TRACE(TEXT("ShellProc(SPM_START_SCRIPT, ...) called"));
return SPR_HANDLED;
}
//------------------------------------------------------------------------
// Message: SPM_STOP_SCRIPT
//
// Sent to the DLL when the script has stopped. This message is sent when
// the script reaches its end, or because the user pressed stopped prior
// to the end of the script. This message is sent to all Tux DLLs,
// including loaded Tux DLLs that are not in the script.
//------------------------------------------------------------------------
case SPM_STOP_SCRIPT: {
TRACE(TEXT("ShellProc(SPM_STOP_SCRIPT, ...) called"));
return SPR_HANDLED;
}
//------------------------------------------------------------------------
// Message: SPM_BEGIN_GROUP
//
// Sent to the DLL before a group of tests from that DLL is about to be
// executed. This gives the DLL a time to initialize or allocate data for
// the tests to follow. Only the DLL that is next to run receives this
// message. The prior DLL, if any, will first receive a SPM_END_GROUP
// message. For global initialization and de-initialization, the DLL
// should probably use SPM_START_SCRIPT and SPM_STOP_SCRIPT, or even
// SPM_LOAD_DLL and SPM_UNLOAD_DLL.
//------------------------------------------------------------------------
case SPM_BEGIN_GROUP: {
TRACE(TEXT("ShellProc(SPM_BEGIN_GROUP, ...) called"));
g_pKato->BeginLevel(0, TEXT("BEGIN GROUP: TUXDLL.DLL"));
return SPR_HANDLED;
}
//------------------------------------------------------------------------
// Message: SPM_END_GROUP
//
// Sent to the DLL after a group of tests from that DLL has completed
// running. This gives the DLL a time to cleanup after it has been run.
// This message does not mean that the DLL will not be called again to run
// tests; it just means that the next test to run belongs to a different
// DLL. SPM_BEGIN_GROUP and SPM_END_GROUP allow the DLL to track when it
// is active and when it is not active.
//------------------------------------------------------------------------
case SPM_END_GROUP: {
TRACE(TEXT("ShellProc(SPM_END_GROUP, ...) called"));
g_pKato->EndLevel(TEXT("END GROUP: TUXDLL.DLL"));
return SPR_HANDLED;
}
//------------------------------------------------------------------------
// Message: SPM_BEGIN_TEST
//
// Sent to the DLL immediately before a test executes. This gives the DLL
// a chance to perform any common action that occurs at the beginning of
// each test, such as entering a new logging level. The spParam parameter
// will contain a pointer to a SPS_BEGIN_TEST structure, which contains
// the function table entry and some other useful information for the next
// test to execute. If the ShellProc function returns SPR_SKIP, then the
// test case will not execute.
//------------------------------------------------------------------------
case SPM_BEGIN_TEST: {
TRACE(TEXT("ShellProc(SPM_BEGIN_TEST, ...) called"));
// Start our logging level.
LPSPS_BEGIN_TEST pBT = (LPSPS_BEGIN_TEST)spParam;
g_pKato->BeginLevel(pBT->lpFTE->dwUniqueID,
TEXT("BEGIN TEST: \"%s\", Threads=%u, Seed=%u"),
pBT->lpFTE->lpDescription, pBT->dwThreadCount,
pBT->dwRandomSeed);
if (S_OK != PreTestSetup() ) {
g_pKato->Log(LOG_SKIP, TEXT("Pre-Test Setup failed - Skipping test"));
return SPR_SKIP;
}
return SPR_HANDLED;
}
//------------------------------------------------------------------------
// Message: SPM_END_TEST
//
// Sent to the DLL after a single test executes from the DLL. This gives
// the DLL a time perform any common action that occurs at the completion
// of each test, such as exiting the current logging level. The spParam
// parameter will contain a pointer to a SPS_END_TEST structure, which
// contains the function table entry and some other useful information for
// the test that just completed.
//------------------------------------------------------------------------
case SPM_END_TEST: {
TRACE(TEXT("ShellProc(SPM_END_TEST, ...) called"));
PostTestCleanup();
// End our logging level.
LPSPS_END_TEST pET = (LPSPS_END_TEST)spParam;
g_pKato->EndLevel(TEXT("END TEST: \"%s\", %s, Time=%u.%03u"),
pET->lpFTE->lpDescription,
pET->dwResult == TPR_SKIP ? TEXT("SKIPPED") :
pET->dwResult == TPR_PASS ? TEXT("PASSED") :
pET->dwResult == TPR_FAIL ? TEXT("FAILED") :
pET->dwResult == TPR_SUPPORTED ? TEXT("SUPPORTED") :
pET->dwResult == TPR_UNSUPPORTED ? TEXT("UNSUPPORTED") : TEXT("ABORTED"),
pET->dwExecutionTime / 1000, pET->dwExecutionTime % 1000);
return SPR_HANDLED;
}
//------------------------------------------------------------------------
// Message: SPM_EXCEPTION
//
// Sent to the DLL whenever code execution in the DLL causes and exception
// fault. By default, Tux traps all exceptions that occur while executing
// code inside a Tux DLL.
//------------------------------------------------------------------------
case SPM_EXCEPTION: {
TRACE(TEXT("ShellProc(SPM_EXCEPTION, ...) called"));
g_pKato->Log(LOG_EXCEPTION, TEXT("Exception occurred!"));
return SPR_HANDLED;
}
}
return SPR_NOT_HANDLED;
}
//******************************************************************************
//***** Internal Functions
//******************************************************************************

View File

@@ -0,0 +1,3 @@
EXPORTS
ShellProc

View File

@@ -0,0 +1,2 @@
EXPORTS
ShellProc

View File

@@ -0,0 +1,235 @@
//******************************************************************************
//
// KATO.H
//
// Definition module for the Kato constants and CKato interface
//
// Date Name Description
// -------- -------- -----------------------------------------------------------
// 02/13/95 SteveMil Created
//
//******************************************************************************
#ifndef __KATO_H__
#define __KATO_H__
//******************************************************************************
// Define functions as import when building kato, and as export when this file
// is included by all other applications. We only use KATOAPI on C++ classes.
// For straight C functions, our DEF file will take care of exporting them.
//******************************************************************************
#ifndef KATOAPI
#define KATOAPI __declspec(dllimport)
#endif
//******************************************************************************
// Define EXTERN_C so that the flat API's will not get mangled by C++
//******************************************************************************
#ifndef EXTERN_C
#ifdef __cplusplus
#define EXTERN_C extern "C"
#else
#define EXTERN_C
#endif
#endif
//******************************************************************************
// Specify 32 bit pack size to ensure everyone creates the correct size objects
//******************************************************************************
#pragma pack(4)
//******************************************************************************
// Constants
//******************************************************************************
#define KATO_MAX_LEVEL 31
#define KATO_MAX_VERBOSITY 15
#define KATO_MAX_STRING_LENGTH 1023
#define KATO_MAX_DATA_SIZE 1024
//******************************************************************************
// Types
//******************************************************************************
typedef HANDLE HKATO;
typedef struct _KATOCALLBACKSTRUCTW {
LPARAM lParam;
HKATO hKato;
DWORD dwThreadID;
DWORD dwTickCount;
DWORD dwLevel;
DWORD dwLevelID;
DWORD dwVerbosity;
LPCWSTR wszLog;
} KATOCALLBACKSTRUCTW, *LPKATOCALLBACKSTRUCTW;
typedef struct _KATOCALLBACKSTRUCTA {
LPARAM lParam;
HKATO hKato;
DWORD dwThreadID;
DWORD dwTickCount;
DWORD dwLevel;
DWORD dwLevelID;
DWORD dwVerbosity;
LPCSTR szLog;
} KATOCALLBACKSTRUCTA, *LPKATOCALLBACKSTRUCTA;
typedef BOOL (CALLBACK *LPKATOCALLBACKW)(LPKATOCALLBACKSTRUCTW);
typedef BOOL (CALLBACK *LPKATOCALLBACKA)(LPKATOCALLBACKSTRUCTA);
typedef enum _KATO_FLUSH_TYPE {
KATO_FLUSH_ON,
KATO_FLUSH_OFF,
KATO_FLUSH_NOW,
} KATO_FLUSH_TYPE, *LPKATO_FLUSH_TYPE;
//******************************************************************************
// Common APIs for C and C++ interfaces
//******************************************************************************
EXTERN_C BOOL WINAPI KatoSetServerW(LPCWSTR wszServer);
EXTERN_C BOOL WINAPI KatoSetServerA(LPCSTR szServer);
EXTERN_C BOOL WINAPI KatoGetServerW(LPWSTR wszServer, INT nCount);
EXTERN_C BOOL WINAPI KatoGetServerA(LPSTR szServer, INT nCount);
EXTERN_C BOOL WINAPI KatoSetCallbackW(LPKATOCALLBACKW lpCallbackW, LPARAM lParam);
EXTERN_C BOOL WINAPI KatoSetCallbackA(LPKATOCALLBACKA lpCallbackA, LPARAM lParam);
EXTERN_C BOOL WINAPI KatoFlush(KATO_FLUSH_TYPE flushType);
EXTERN_C BOOL WINAPI KatoDebug(BOOL fEnabled, DWORD dwMaxLogVersbosity,
DWORD dwMaxCommentVersbosity, DWORD dwMaxLevel);
EXTERN_C HKATO WINAPI KatoGetDefaultObject(VOID);
//******************************************************************************
// APIs for C interface (C++ applications should use the CKato class)
//******************************************************************************
// Construction and destruction
EXTERN_C HKATO WINAPI KatoCreateW(LPCWSTR wszName);
EXTERN_C HKATO WINAPI KatoCreateA(LPCSTR szName);
EXTERN_C BOOL WINAPI KatoDestroy(HKATO hKato);
// Unicode functions
EXTERN_C INT WINAPIV KatoBeginLevelW(HKATO hKato, DWORD dwLevelID, LPCWSTR wszFormat, ...);
EXTERN_C INT WINAPIV KatoBeginLevelVW(HKATO hKato, DWORD dwLevelID, LPCWSTR wszFormat, va_list pArgs);
EXTERN_C INT WINAPIV KatoEndLevelW(HKATO hKato, LPCWSTR wszFormat, ...);
EXTERN_C INT WINAPIV KatoEndLevelVW(HKATO hKato, LPCWSTR wszFormat, va_list pArgs);
EXTERN_C BOOL WINAPIV KatoLogW(HKATO hKato, DWORD dwVerbosity, LPCWSTR wszFormat, ...);
EXTERN_C BOOL WINAPIV KatoLogVW(HKATO hKato, DWORD dwVerbosity, LPCWSTR wszFormat, va_list pArgs);
EXTERN_C BOOL WINAPIV KatoCommentW(HKATO hKato, DWORD dwVerbosity, LPCWSTR wszFormat, ...);
EXTERN_C BOOL WINAPIV KatoCommentVW(HKATO hKato, DWORD dwVerbosity, LPCWSTR wszFormat, va_list pArgs);
// ASCII functions
EXTERN_C INT WINAPIV KatoBeginLevelA(HKATO hKato, DWORD dwLevelID, LPCSTR szFormat, ...);
EXTERN_C INT WINAPIV KatoBeginLevelVA(HKATO hKato, DWORD dwLevelID, LPCSTR szFormat, va_list pArgs);
EXTERN_C INT WINAPIV KatoEndLevelA(HKATO hKato, LPCSTR szFormat, ...);
EXTERN_C INT WINAPIV KatoEndLevelVA(HKATO hKato, LPCSTR szFormat, va_list pArgs);
EXTERN_C BOOL WINAPIV KatoLogA(HKATO hKato, DWORD dwVerbosity, LPCSTR szFormat, ...);
EXTERN_C BOOL WINAPIV KatoLogVA(HKATO hKato, DWORD dwVerbosity, LPCSTR szFormat, va_list pArgs);
EXTERN_C BOOL WINAPIV KatoCommentA(HKATO hKato, DWORD dwVerbosity, LPCSTR szFormat, ...);
EXTERN_C BOOL WINAPIV KatoCommentVA(HKATO hKato, DWORD dwVerbosity, LPCSTR szFormat, va_list pArgs);
// Non-string functions
EXTERN_C BOOL WINAPI KatoSetItemData(HKATO hKato, DWORD dwItemData);
EXTERN_C DWORD WINAPI KatoGetItemData(HKATO hKato);
EXTERN_C BOOL WINAPI KatoSendSystemData(HKATO hKato, DWORD dwSystemID, LPCVOID lpcvBuffer, DWORD dwSize);
EXTERN_C DWORD WINAPI KatoGetCurrentLevel(HKATO hKato);
EXTERN_C INT WINAPI KatoGetVerbosityCount(HKATO hKato, DWORD dwVerbosity, DWORD dwLevel);
//******************************************************************************
// Map function names to the correct APIs based on the UNICODE flag
//******************************************************************************
#ifdef UNICODE
#define KATOCALLBACKSTRUCT KATOCALLBACKSTRUCTW
#define LPKATOCALLBACKSTRUCT LPKATOCALLBACKSTRUCTW
#define LPKATOCALLBACK LPKATOCALLBACKW
#define KatoCreate KatoCreateW
#define KatoSetCallback KatoSetCallbackW
#define KatoSetServer KatoSetServerW
#define KatoGetServer KatoGetServerW
#define KatoBeginLevel KatoBeginLevelW
#define KatoBeginLevelV KatoBeginLevelVW
#define KatoEndLevel KatoEndLevelW
#define KatoEndLevelV KatoEndLevelVW
#define KatoLog KatoLogW
#define KatoLogV KatoLogVW
#define KatoComment KatoCommentW
#define KatoCommentV KatoCommentVW
#else
#define KATOCALLBACKSTRUCT KATOCALLBACKSTRUCTA
#define LPKATOCALLBACKSTRUCT LPKATOCALLBACKSTRUCTA
#define LPKATOCALLBACK LPKATOCALLBACKA
#define KatoCreate KatoCreateA
#define KatoSetCallback KatoSetCallbackA
#define KatoSetServer KatoSetServerA
#define KatoGetServer KatoGetServerA
#define KatoBeginLevel KatoBeginLevelA
#define KatoBeginLevelV KatoBeginLevelVA
#define KatoEndLevel KatoEndLevelA
#define KatoEndLevelV KatoEndLevelVA
#define KatoLog KatoLogA
#define KatoLogV KatoLogVA
#define KatoComment KatoCommentA
#define KatoCommentV KatoCommentVA
#endif
//******************************************************************************
// CKato - Interface for C++ applications
//******************************************************************************
#ifdef __cplusplus
class KATOAPI CKato {
public:
// Overlaod new and delete to prevent mismatched heaps (KB:Q122675)
void* __cdecl operator new(size_t stAllocate);
void __cdecl operator delete(void *pvMemory);
// Construction and destruction
CKato(LPCWSTR wszName = NULL);
CKato(LPCSTR szName);
virtual ~CKato(VOID);
// Unicode functions
INT WINAPIV BeginLevel (DWORD dwLevelID, LPCWSTR wszFormat, ...);
INT WINAPI BeginLevelV(DWORD dwLevelID, LPCWSTR wszFormat, va_list pArgs);
INT WINAPIV EndLevel (LPCWSTR wszFormat, ...);
INT WINAPI EndLevelV(LPCWSTR wszFormat, va_list pArgs);
BOOL WINAPIV Log (DWORD dwVerbosity, LPCWSTR wszFormat, ...);
BOOL WINAPI LogV(DWORD dwVerbosity, LPCWSTR wszFormat, va_list pArgs);
BOOL WINAPIV Comment (DWORD dwVerbosity, LPCWSTR wszFormat, ...);
BOOL WINAPI CommentV(DWORD dwVerbosity, LPCWSTR wszFormat, va_list pArgs);
// ASCII functions
INT WINAPIV BeginLevel (DWORD dwLevelID, LPCSTR szFormat, ...);
INT WINAPI BeginLevelV(DWORD dwLevelID, LPCSTR szFormat, va_list pArgs);
INT WINAPIV EndLevel (LPCSTR szFormat, ...);
INT WINAPI EndLevelV(LPCSTR szFormat, va_list pArgs);
BOOL WINAPIV Log (DWORD dwVerbosity, LPCSTR szFormat, ...);
BOOL WINAPI LogV(DWORD dwVerbosity, LPCSTR szFormat, va_list pArgs);
BOOL WINAPIV Comment (DWORD dwVerbosity, LPCSTR szFormat, ...);
BOOL WINAPI CommentV(DWORD dwVerbosity, LPCSTR szFormat, va_list pArgs);
// Non-string functions
BOOL WINAPI SetItemData(DWORD dwItemData);
DWORD WINAPI GetItemData(VOID);
BOOL WINAPI SendSystemData(DWORD dwSystemID, LPCVOID lpcvBuffer, DWORD dwSize);
DWORD WINAPI GetCurrentLevel(VOID);
INT WINAPI GetVerbosityCount(DWORD dwVerbosity, DWORD dwLevel = -1);
// Internal functions and data
protected:
friend VOID WINAPI Internal(CKato*, DWORD, LPARAM);
VOID WINAPI Internal(DWORD, LPARAM);
LPVOID m_lpvKatoData;
};
#endif // __cplusplus
#pragma pack() // restore packing size to previous state
#endif // __KATO_H__

View File

@@ -0,0 +1,191 @@
/*++
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
Copyright 1997 Microsoft Corporation. All Rights Reserved.
Module Name:
tux.h
Abstract:
Functions:
Notes:
--*/
//******************************************************************************
//
// TUX.H
//
// Definitions of Tux types, structures, and messages.
//
// Date Name Description
// -------- -------- -----------------------------------------------------------
// 02/14/95 SteveMil Created
//
//******************************************************************************
#ifndef __TUX_H__
#define __TUX_H__
//******************************************************************************
//***** Function Types
//******************************************************************************
// Forward declaration of LPFUNCTION_TABLE_ENTRY
typedef struct _FUNCTION_TABLE_ENTRY *LPFUNCTION_TABLE_ENTRY;
// Define our ShellProc Param and TestProc Param types
typedef LPARAM SPPARAM;
typedef LPDWORD TPPARAM;
// Shell and Test message handling procs
typedef INT (WINAPI *SHELLPROC)(UINT uMsg, SPPARAM spParam);
typedef INT (WINAPI *TESTPROC )(UINT uMsg, TPPARAM tpParam, LPFUNCTION_TABLE_ENTRY lpFTE);
// SHELLPROCAPI and TESTPROCAPI
#ifdef __cplusplus
#define SHELLPROCAPI extern "C" INT __declspec(dllexport) WINAPI
#else
#define SHELLPROCAPI INT __declspec(dllexport) WINAPI
#endif
#define TESTPROCAPI INT WINAPI
//******************************************************************************
//***** Function Table Entry Structure
//******************************************************************************
typedef struct _FUNCTION_TABLE_ENTRY {
LPCTSTR lpDescription; // description of test
UINT uDepth; // depth of item in tree hierarchy
LPVOID dwUserData; // user defined data that will be passed to TestProc at runtime
DWORD dwUniqueID; // uniquely identifies the test - used in loading/saving scripts
TESTPROC lpTestProc; // pointer to TestProc function to be called for this test
} FUNCTION_TABLE_ENTRY, *LPFUNCTION_TABLE_ENTRY;
extern FUNCTION_TABLE_ENTRY g_lpFTE[];
//******************************************************************************
//***** ShellProc() Message values
//******************************************************************************
#define SPM_LOAD_DLL 1
#define SPM_UNLOAD_DLL 2
#define SPM_START_SCRIPT 3
#define SPM_STOP_SCRIPT 4
#define SPM_BEGIN_GROUP 5
#define SPM_END_GROUP 6
#define SPM_SHELL_INFO 7
#define SPM_REGISTER 8
#define SPM_EXCEPTION 9
#define SPM_BEGIN_TEST 10
#define SPM_END_TEST 11
//******************************************************************************
//***** ShellProc() Return values
//******************************************************************************
#define SPR_NOT_HANDLED 0
#define SPR_HANDLED 1
#define SPR_SKIP 2
#define SPR_FAIL 3
//******************************************************************************
//***** TestProc() Message values
//******************************************************************************
#define TPM_EXECUTE 101
#define TPM_QUERY_THREAD_COUNT 102
//******************************************************************************
//***** TestProc() Return values
//******************************************************************************
#define TPR_SKIP 2
#define TPR_PASS 3
#define TPR_FAIL 4
#define TPR_ABORT 5
#define TPR_SUPPORTED 6
#define TPR_UNSUPPORTED 7
//******************************************************************************
//***** ShellProc() Structures
//******************************************************************************
// ShellProc() Structure for SPM_LOAD_DLL message
typedef struct _SPS_LOAD_DLL {
BOOL fUnicode; // Set to true if your Dll is UNICODE
} SPS_LOAD_DLL, *LPSPS_LOAD_DLL;
// ShellProc() Structure for SPM_SHELL_INFO message
typedef struct _SPS_SHELL_INFO {
HINSTANCE hInstance; // Instance handle of shell.
HWND hWnd; // Main window handle of shell (currently set to NULL).
HINSTANCE hLib; // Test Dll instance handle.
HANDLE hevmTerminate; // Manual event that is set by Tux to inform all
// tests to shutdown (currently not used).
BOOL fUsingServer; // Set if Tux is connected to Tux Server.
LPCTSTR szDllCmdLine; // Command line arguments for test DLL.
} SPS_SHELL_INFO, *LPSPS_SHELL_INFO;
// ShellProc() Structure for SPM_REGISTER message
typedef struct _SPS_REGISTER {
LPFUNCTION_TABLE_ENTRY lpFunctionTable;
} SPS_REGISTER, *LPSPS_REGISTER;
// ShellProc() Structure for SPM_BEGIN_TEST message
typedef struct _SPS_BEGIN_TEST {
LPFUNCTION_TABLE_ENTRY lpFTE;
DWORD dwRandomSeed;
DWORD dwThreadCount;
} SPS_BEGIN_TEST, *LPSPS_BEGIN_TEST;
// ShellProc() Structure for SPM_END_TEST message
typedef struct _SPS_END_TEST {
LPFUNCTION_TABLE_ENTRY lpFTE;
DWORD dwResult;
DWORD dwRandomSeed;
DWORD dwThreadCount;
DWORD dwExecutionTime;
} SPS_END_TEST, *LPSPS_END_TEST;
// ShellProc() Structure for SPM_EXCEPTION message
typedef struct _SPS_EXCEPTION {
LPFUNCTION_TABLE_ENTRY lpFTE;
DWORD dwExceptionCode;
EXCEPTION_POINTERS *lpExceptionPointers;
DWORD dwExceptionFilter;
UINT uMsg;
} SPS_EXCEPTION, *LPSPS_EXCEPTION;
//******************************************************************************
//***** TestProc() Structures
//******************************************************************************
// TestProc() Structure for TPM_EXECUTE message
typedef struct _TPS_EXECUTE {
DWORD dwRandomSeed;
DWORD dwThreadCount;
DWORD dwThreadNumber;
} TPS_EXECUTE, *LPTPS_EXECUTE;
// TestProc() Structure for TPM_QUERY_THREAD_COUNT message
typedef struct _TPS_QUERY_THREAD_COUNT {
DWORD dwThreadCount;
} TPS_QUERY_THREAD_COUNT, *LPTPS_QUERY_THREAD_COUNT;
//******************************************************************************
//***** Old constants defined for compatibility - DO NOT USE THESE CONSTANTS!!!
//******************************************************************************
#define TPR_NOT_HANDLED 0
#define TPR_HANDLED 1
#define SPM_START_TESTS SPM_BEGIN_GROUP
#define SPM_STOP_TESTS SPM_END_GROUP
#define SHELLINFO SPS_SHELL_INFO
#define LPSHELLINFO LPSPS_SHELL_INFO
#define SPF_UNICODE 0x00010000
#endif //__TUX_H__

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,10 @@
<GRAMMAR LANGID="409">
<RULE NAME="SELECT" EXPORT="1" TOPLEVEL="ACTIVE">
<P> The weather of </P> <TEXTBUFFER PROPNAME="City"/>
<L>
<P> Nice </P>
<P> Rainy </P>
</L>
</RULE>
</GRAMMAR>

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,5 @@
<GRAMMAR LANGID="409">
<RULE NAME="firstrule" TOPLEVEL="ACTIVE">
<P>skooky</P>
</RULE>
</GRAMMAR>

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,18 @@
<GRAMMAR LANGID="409">
<RULE NAME="firstrule" TOPLEVEL="ACTIVE">
<P>play the</P>
<RULEREF NAME="instrument"/>
<O>please</O>
</RULE>
<RULE NAME="secondrule" TOPLEVEL="ACTIVE">
<P>play the</P>
<RULEREF NAME="instrument"/>
<O>please</O>
</RULE>
<RULE NAME="instrument">
<L>
<P>oboe</P>
<P>trombone</P>
</L>
</RULE>
</GRAMMAR>

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,9 @@
<GRAMMAR LANGID="409">
<RULE NAME="firstrule" TOPLEVEL="ACTIVE">
<L>
<P>move</P>
<P>put</P>
<P>get</P>
</L>
</RULE>
</GRAMMAR>

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,7 @@
<GRAMMAR LANGID="409">
<RULE NAME="firstrule" TOPLEVEL="ACTIVE">
<O>please</O>
<P>walk</P>
<O>slowly</O>
</RULE>
</GRAMMAR>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,5 @@
<GRAMMAR LANGID="409">
<RULE NAME="firstrule" TOPLEVEL="ACTIVE">
<P>white</P>
</RULE>
</GRAMMAR>

Binary file not shown.

View File

@@ -0,0 +1,5 @@
<GRAMMAR LANGID="409">
<RULE NAME="firstrule" TOPLEVEL="ACTIVE">
<P>black</P>
</RULE>
</GRAMMAR>

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,27 @@
<GRAMMAR LANGID="409">
<RULE NAME="playcard" TOPLEVEL="ACTIVE">
<O>please</O>
<P>play the</P>
<RULEREF NAME="rank"/>
<O>please</O>
</RULE>
<RULE NAME="rank">
<L PROPNAME="rank">
<P VALSTR="1">ace</P>
<P VALSTR="2">two</P>
<P VALSTR="3">three</P>
<P VALSTR="4">four</P>
<P VALSTR="5">five</P>
<P VALSTR="6">six</P>
<P VALSTR="7">seven</P>
<P VALSTR="8">eight</P>
<P VALSTR="9">nine</P>
<P VALSTR="10">ten</P>
<P VALSTR="11">jack</P>
<P VALSTR="12">queen</P>
<P VALSTR="13">king</P>
<P VALSTR="12">lady</P>
<P VALSTR="13">emperor</P>
</L>
</RULE>
</GRAMMAR>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,160 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by srcomp.rc
//
#define IDD_DIALOG_LOADOPTIONS 101
#define IDR_RULE_GRAMMAR 102
#define IDR_L_GRAMMAR 103
#define IDR_LNPN_GRAMMAR 104
#define IDR_O_GRAMMAR 105
#define IDR_P1_GRAMMAR 106
#define IDR_P2_GRAMMAR 107
#define IDR_EXPRULE_GRAMMAR 108
#define IDR_SNORK_GRAMMAR 109
#define IDC_COMBO_SRENGINES 1000
#define IDC_COMBO_TTSDRIVERS 1001
#define IDC_CHECK1 1002
#define IDC_CHECK2 1003
#define IDS_WAV_AUDIO_FORMATS 1004
#define IDS_WAV_SOUNDSTART 1005
#define IDS_WAV_SOUNDEND 1006
#define IDS_WAV_SOUNDSTARTEND 1007
#define IDS_WAV_PHRASESTART 1008
#define IDS_WAV_RECOGNITION_1 1009
#define IDS_WAV_RECOGNITION_2 1010
#define IDS_WAV_HYPOTHESIS 1011
#define IDS_WAV_PHRASE_RECO_HYP 1012
#define IDS_WAV_SYNCH_BEFORE_LOAD 1013
#define IDS_WAV_SYNCH_AFTER_DICT 1014
#define IDS_WAV_SYNCH_AFTER_GRAM 1015
#define IDS_WAV_L_TAG 1016
#define IDS_WAV_MULT_RECO 1017
#define IDS_WAV_EXPRULE_TAG 1018
#define IDS_WAV_P_TAG 1019
#define IDS_WAV_O_TAG_1 1020
#define IDS_WAV_O_TAG_2 1021
#define IDS_WAV_O_TAG_3 1022
#define IDS_WAV_RULE_TAG 1023
#define IDS_WAV_LN_TAG 1024
#define IDS_RECO_SYNCH_BEFORE_LOAD 1025
#define IDS_RECO_SYNCH_AFTER_DICT 1026
#define IDS_RECO_SYNCH_AFTER_GRAM 1027
#define IDS_RECO_L_TAG 1028
#define IDS_RECO_EXPRULE_TAG_1 1029
#define IDS_RECO_EXPRULE_TAG_2 1030
#define IDS_RECO_P_TAG 1031
#define IDS_RECO_O_TAG_1 1032
#define IDS_RECO_O_TAG_2 1033
#define IDS_RECO_O_TAG_3 1034
#define IDS_RECO_RULE_TAG 1035
#define IDS_RECO_LN_TAG 1036
#define IDS_RESOURCE_LOCATION1 1037
#define IDS_RESOURCE_LOCATION2 1038
#define IDS_UNEXPECTED_ERR 1039
#define IDS_UNEXPECTED_EVENT 1040
#define IDS_ERR_AUDIOFORMAT_TOMANY 1041
#define IDS_ERR_AUDIOFORMAT_UNSUPPORTED 1042
#define IDS_ERR_AUDIOFORMAT_NOTENOUGH 1043
#define IDS_ERR_SOUNDSTART_NOEVENT 1044
#define IDS_ERR_STREAMEND_NOEVENT 1045
#define IDS_ERR_SOUNDEND_NOEVENT 1046
#define IDS_ERR_SOUNDSTART_BADPOSITION1 1047
#define IDS_ERR_SOUNDSTART_BADPOSITION2 1048
#define IDS_ERR_SOUNDEND_BADPOSITION1 1049
#define IDS_ERR_SOUNDEND_BADPOSITION2 1050
#define IDS_ERR_SOUNDSTARTEND_NOEVENT 1051
#define IDS_ERR_SOUNDSTARTEND_WRONGORDER 1052
#define IDS_ERR_PHRASESTART_NOEVENT 1053
#define IDS_ERR_RECOGNITION_NOEVENT 1054
#define IDS_ERR_RECOGNITION_EVENTONSILENCE 1055
#define IDS_ERR_RECOGNITION_WRONGORDER 1056
#define IDS_ERR_HYPOTHESIS_NOEVENT 1057
#define IDS_ERR_HYPOTHESIS_WRONGORDER 1058
#define IDS_ERR_RESULT_WRONGWORD 1059
#define IDS_ERR_LEX_REMOVEUSER 1060
#define IDS_ERR_LEX_EXPECTNOWORD 1061
#define IDS_RECO_NEWWORD_PRON 1062
#define IDS_ERR_FALSERECOGNITION_NOEVENT 1063
#define IDS_AUTOPAUSE_DYNAMICWORD1 1064
#define IDS_AUTOPAUSE_DYNAMICWORD2 1065
#define IDS_AUTOPAUSE_DYNAMICRULE1 1066
#define IDS_AUTOPAUSE_DYNAMICRULE2 1067
#define IDS_WAV_AUTOPAUSE 1068
#define IDS_INVALIDATETOPLEVEL_DYNAMICWORDS 1069
#define IDS_INVALIDATETOPLEVEL_DYNAMICRULE 1070
#define IDS_WAV_INVALIDATETOPLEVEL_OLD 1071
#define IDS_INVALIDATETOPLEVEL_DYNAMICNEWWORDS 1072
#define IDS_ERR_INVALIDATETOPLEVEL 1073
#define IDS_WAV_INVALIDATETOPLEVEL_NEW 1074
#define IDS_INVALIDATENONTOPLEVEL_RULE1 1075
#define IDS_INVALIDATENONTOPLEVEL_RULE2 1076
#define IDS_INVALIDATENONTOPLEVEL_TOPLEVELRULE 1077
#define IDS_INVALIDATENONTOPLEVEL_WORD1 1078
#define IDS_INVALIDATENONTOPLEVEL_OLDWORD1 1078
#define IDS_INVALIDATENONTOPLEVEL_OLDWORD2 1079
#define IDS_INVALIDATENONTOPLEVEL_NEWWORD2 1080
#define IDS_INVALIDATENONTOPLEVEL_TOPLEVELWORDS 1081
#define IDS_WAV_INVALIDATENONTOPLEVEL_OLD 1082
#define IDS_WAV_INVALIDATENONTOPLEVEL_NEW 1083
#define IDS_WAV_CFGTEXTBUFFER 1084
#define IDS_CFGTEXTBUFFER_WORDS 1085
#define IDS_CFGTEXTBUFFER_BUFFERWORD 1086
#define IDS_CFGTEXTBUFFER_RULE 1087
#define IDS_WAV_ALTERMATESCFG 1088
#define IDS_ALTERNATESCFG_BESTWORD 1089
#define IDS_ALTERNATESCFG_ALTERNATE1 1090
#define IDS_ALTERNATESCFG_ALTERNATE2 1091
#define IDS_ALTERNATESCFG_WORDS 1092
#define IDS_ALTERNATESCFG_RULE 1093
#define IDS_ERR_INTERFERENCE_NOEVENT 1094
#define IDS_WAV_INTERFERENCE 1095
#define IDS_WAV_GETITNRESULT 1096
#define IDS_RECO_GETITNRESULT 1097
#define IDS_CUSTOMPROP_NEWWORD_PRON 1098
#define IDS_CUSTOMPROP_RULE 1099
#define IDS_WAV_CUSTOMPROP 1100
#define IDS_CUSTOMPROP_NEWWORD_DISP 1101
#define IDS_CUSTOMPROP_NEWWORD_LEX 1102
#define IDS_DICTATIONTAG_WORDS 1103
#define IDS_DICTATIONTAG_RULE 1104
#define IDS_WAV_DICTATIONTAG 1105
#define IDS_WILDCARD_WORDS 1106
#define IDS_WILDCARD_RULE 1107
#define IDS_WAV_WILDCARD 1108
#define IDS_APPLEX_WORD 1109
#define IDS_APPLEX_PROP 1110
#define IDS_USERLEXBEFOREAPPLEX_WORD 1111
#define IDS_USERLEXBEFOREAPPLEX_USERPROP 1112
#define IDS_USERLEXBEFOREAPPLEX_APPPROP 1113
#define IDS_WAV_APPLEX 1114
#define IDS_WAV_USERLEXBEFOREAPPLEX 1115
#define IDS_INVALIDATENONTOPLEVEL_NEWWORD1 1116
#define IDS_RESOURCE_LOCATION3 1117
#define IDS_RECO_EXPRULE_FIRSTRULE 1118
#define IDS_RECO_EXPRULE_SECONDRULE 1119
#define IDS_CASESENSITIVEGRAMMAR_RULENAME 1120
#define IDS_CASESENSITIVEGRAMMAR_LEX1 1121
#define IDS_CASESENSITIVEGRAMMAR_PRON1 1122
#define IDS_CASESENSITIVEGRAMMAR_LEX2 1123
#define IDS_CASESENSITIVEGRAMMAR_PRON2 1124
#define IDS_CASESENSITIVEGRAMMAR_WAVE 1126
#define IDS_CASESENSITIVEGRAMMAR_DISP1 1127
#define IDS_CASESENSITIVEGRAMMAR_DISP2 1128
#define IDS_CASESENSITIVELEXICON_WORD1 1129
#define IDS_CASESENSITIVELEXICON_SYMBOL1 1130
#define IDS_CASESENSITIVELEXICON_WORD2 1131
#define IDS_CASESENSITIVELEXICON_SYMBOL2 1132
#define IDS_CASESENSITIVELEXICON_WAVE 1133
#define IDS_CASESENSITIVELEXICON_RULENAME 1134
#define IDS_CFGTEXTBUFFER_NOTINTERESTEDWORDS 1135
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 116
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1062
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

View File

@@ -0,0 +1,576 @@
# Microsoft Developer Studio Project File - Name="SRCOMP" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=SRCOMP - 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 "sr.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 "sr.mak" CFG="SRCOMP - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "SRCOMP - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "SRCOMP - 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)" == "SRCOMP - 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 "SRCOMP_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\sdk\include" /I "..\..\..\..\ddk\include" /I "..\..\source\common\include" /I "..\..\source\sr" /I "..\common\include" /I "..\..\..\include" /I "..\common\cpp" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SRCOMP_EXPORTS" /D _WIN32_WINNT=0x0500 /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /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 kato.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 /dll /pdb:"Debug/srcomp.pdb" /machine:I386 /out:"Release/SRCOMP.dll" /implib:"Debug/srcomp.lib" /pdbtype:sept /libpath:"..\..\..\..\sdk\lib" /libpath:"..\..\..\..\sdk\lib\i386" /libpath:"..\..\source\common\lib" /libpath:"..\common\lib" /libpath:"..\..\..\lib\i386"
# SUBTRACT LINK32 /pdb:none /incremental:yes /debug
!ELSEIF "$(CFG)" == "SRCOMP - 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 "SRCOMP_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\common\cpp" /I "..\..\..\..\sdk\include" /I "..\..\..\..\ddk\include" /I "..\..\source\common\include" /I "..\..\source\sr" /I "..\common\include" /I "..\..\..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "SRCOMP_EXPORTS" /D _WIN32_WINNT=0x0500 /FR /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /I "..\..\..\sdk\idl" /D "_DEBUG" /win32
# SUBTRACT MTL /mktyplib203
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /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 kato.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 /dll /debug /machine:I386 /out:"Debug/SRCOMP.dll" /pdbtype:sept /libpath:"..\..\..\..\sdk\lib\i386" /libpath:"..\..\source\common\lib" /libpath:"..\common\lib" /libpath:"..\..\..\lib\i386"
# SUBTRACT LINK32 /pdb:none /nodefaultlib
!ENDIF
# Begin Target
# Name "SRCOMP - Win32 Release"
# Name "SRCOMP - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Group "Test Module"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\srenginecompliance.cpp
# End Source File
# End Group
# Begin Group "Grammar"
# PROP Default_Filter "*.xml"
# Begin Source File
SOURCE=..\resources\snork.xml
!IF "$(CFG)" == "SRCOMP - Win32 Release"
# Begin Custom Build
InputPath=..\resources\snork.xml
"..\resources\snork.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\bin\gc $(InputPath)
# End Custom Build
!ELSEIF "$(CFG)" == "SRCOMP - Win32 Debug"
# Begin Custom Build
InputPath=..\resources\snork.xml
"..\resources\snork.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\bin\gc $(InputPath)
# End Custom Build
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\resources\snork_j.xml
!IF "$(CFG)" == "SRCOMP - Win32 Release"
# Begin Custom Build
InputPath=..\resources\snork_j.xml
"..\resources\snork_j.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\bin\gc $(InputPath)
# End Custom Build
!ELSEIF "$(CFG)" == "SRCOMP - Win32 Debug"
# Begin Custom Build
InputPath=..\resources\snork_j.xml
"..\resources\snork_j.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\bin\gc $(InputPath)
# End Custom Build
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\resources\tag_exprule.xml
!IF "$(CFG)" == "SRCOMP - Win32 Release"
# Begin Custom Build
InputPath=..\resources\tag_exprule.xml
"..\resources\tag_exprule.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\bin\gc $(InputPath)
# End Custom Build
!ELSEIF "$(CFG)" == "SRCOMP - Win32 Debug"
# Begin Custom Build
InputPath=..\resources\tag_exprule.xml
"..\resources\tag_exprule.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\bin\gc $(InputPath)
# End Custom Build
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\resources\tag_exprule_j.xml
!IF "$(CFG)" == "SRCOMP - Win32 Release"
# Begin Custom Build
InputPath=..\resources\tag_exprule_j.xml
"..\resources\tag_exprule_j.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\bin\gc $(InputPath)
# End Custom Build
!ELSEIF "$(CFG)" == "SRCOMP - Win32 Debug"
# Begin Custom Build
InputPath=..\resources\tag_exprule_j.xml
"..\resources\tag_exprule_j.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\bin\gc $(InputPath)
# End Custom Build
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\resources\tag_l.xml
!IF "$(CFG)" == "SRCOMP - Win32 Release"
# Begin Custom Build
InputPath=..\resources\tag_l.xml
"..\resources\tag_l.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\bin\gc $(InputPath)
# End Custom Build
!ELSEIF "$(CFG)" == "SRCOMP - Win32 Debug"
# Begin Custom Build
InputPath=..\resources\tag_l.xml
"..\resources\tag_l.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\bin\gc $(InputPath)
# End Custom Build
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\resources\tag_l_j.xml
!IF "$(CFG)" == "SRCOMP - Win32 Release"
# Begin Custom Build
InputPath=..\resources\tag_l_j.xml
"..\resources\tag_l_j.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\bin\gc $(InputPath)
# End Custom Build
!ELSEIF "$(CFG)" == "SRCOMP - Win32 Debug"
# Begin Custom Build
InputPath=..\resources\tag_l_j.xml
"..\resources\tag_l_j.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\bin\gc $(InputPath)
# End Custom Build
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\resources\tag_o.xml
!IF "$(CFG)" == "SRCOMP - Win32 Release"
# Begin Custom Build
InputPath=..\resources\tag_o.xml
"..\resources\tag_o.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\bin\gc $(InputPath)
# End Custom Build
!ELSEIF "$(CFG)" == "SRCOMP - Win32 Debug"
# Begin Custom Build
InputPath=..\resources\tag_o.xml
"..\resources\tag_o.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\bin\gc $(InputPath)
# End Custom Build
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\resources\tag_o_j.xml
!IF "$(CFG)" == "SRCOMP - Win32 Release"
# Begin Custom Build
InputPath=..\resources\tag_o_j.xml
"..\resources\tag_o_j.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\bin\gc $(InputPath)
# End Custom Build
!ELSEIF "$(CFG)" == "SRCOMP - Win32 Debug"
# Begin Custom Build
InputPath=..\resources\tag_o_j.xml
"..\resources\tag_o_j.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\bin\gc $(InputPath)
# End Custom Build
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\resources\tag_p1.xml
!IF "$(CFG)" == "SRCOMP - Win32 Release"
# Begin Custom Build
InputPath=..\resources\tag_p1.xml
"..\resources\tag_p1.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\bin\gc $(InputPath)
# End Custom Build
!ELSEIF "$(CFG)" == "SRCOMP - Win32 Debug"
# Begin Custom Build
InputPath=..\resources\tag_p1.xml
"..\resources\tag_p1.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\bin\gc $(InputPath)
# End Custom Build
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\resources\tag_p1_j.xml
!IF "$(CFG)" == "SRCOMP - Win32 Release"
# Begin Custom Build
InputPath=..\resources\tag_p1_j.xml
"..\resources\tag_p1_j.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\bin\gc $(InputPath)
# End Custom Build
!ELSEIF "$(CFG)" == "SRCOMP - Win32 Debug"
# Begin Custom Build
InputPath=..\resources\tag_p1_j.xml
"..\resources\tag_p1_j.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\bin\gc $(InputPath)
# End Custom Build
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\resources\tag_p2.xml
!IF "$(CFG)" == "SRCOMP - Win32 Release"
# Begin Custom Build
InputPath=..\resources\tag_p2.xml
"..\resources\tag_p2.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\bin\gc $(InputPath)
# End Custom Build
!ELSEIF "$(CFG)" == "SRCOMP - Win32 Debug"
# Begin Custom Build
InputPath=..\resources\tag_p2.xml
"..\resources\tag_p2.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\bin\gc $(InputPath)
# End Custom Build
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\resources\tag_p2_j.xml
!IF "$(CFG)" == "SRCOMP - Win32 Release"
# Begin Custom Build
InputPath=..\resources\tag_p2_j.xml
"..\resources\tag_p2_j.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\bin\gc $(InputPath)
# End Custom Build
!ELSEIF "$(CFG)" == "SRCOMP - Win32 Debug"
# Begin Custom Build
InputPath=..\resources\tag_p2_j.xml
"..\resources\tag_p2_j.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\bin\gc $(InputPath)
# End Custom Build
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\resources\tag_rule.xml
!IF "$(CFG)" == "SRCOMP - Win32 Release"
# Begin Custom Build
InputPath=..\resources\tag_rule.xml
"..\resources\tag_rule.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\bin\gc $(InputPath)
# End Custom Build
!ELSEIF "$(CFG)" == "SRCOMP - Win32 Debug"
# Begin Custom Build
InputPath=..\resources\tag_rule.xml
"..\resources\tag_rule.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\bin\gc $(InputPath)
# End Custom Build
!ENDIF
# End Source File
# Begin Source File
SOURCE=..\resources\tag_rule_j.xml
!IF "$(CFG)" == "SRCOMP - Win32 Release"
# Begin Custom Build
InputPath=..\resources\tag_rule_j.xml
"..\resources\tag_rule_j.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\bin\gc $(InputPath)
# End Custom Build
!ELSEIF "$(CFG)" == "SRCOMP - Win32 Debug"
# Begin Custom Build
InputPath=..\resources\tag_rule_j.xml
"..\resources\tag_rule_j.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
..\..\..\bin\gc $(InputPath)
# End Custom Build
!ENDIF
# End Source File
# End Group
# Begin Source File
SOURCE=.\SRCOMP.cpp
# End Source File
# Begin Source File
SOURCE=..\Common\def\srcomp.def
# End Source File
# Begin Source File
SOURCE=.\SRCOMP.rc
# End Source File
# Begin Source File
SOURCE=..\Common\cpp\TUXDLL.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\srenginecompliance.h
# End Source File
# Begin Source File
SOURCE=.\srtests1.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"
# Begin Source File
SOURCE=..\resources\snork.cfg
# End Source File
# Begin Source File
SOURCE=..\resources\tag_EXPRULE.cfg
# End Source File
# Begin Source File
SOURCE=..\resources\tag_exprule_j.cfg
# End Source File
# Begin Source File
SOURCE=..\resources\tag_L.cfg
# End Source File
# Begin Source File
SOURCE=..\resources\tag_l_j.cfg
# End Source File
# Begin Source File
SOURCE=..\resources\tag_O.cfg
# End Source File
# Begin Source File
SOURCE=..\resources\tag_o_j.cfg
# End Source File
# Begin Source File
SOURCE=..\resources\tag_p1.cfg
# End Source File
# Begin Source File
SOURCE=..\resources\tag_p1_j.cfg
# End Source File
# Begin Source File
SOURCE=..\resources\tag_p2.cfg
# End Source File
# Begin Source File
SOURCE=..\resources\tag_p2_j.cfg
# End Source File
# Begin Source File
SOURCE=..\resources\tag_RULE.cfg
# End Source File
# Begin Source File
SOURCE=..\resources\tag_rule_j.cfg
# End Source File
# End Group
# Begin Source File
SOURCE=..\resources\snork_j.cfg
# End Source File
# End Target
# End Project

View File

@@ -0,0 +1,111 @@
#include "SRTests1.h"
// BASE is a unique value assigned to a given tester or component. This value,
// when combined with each of the following test's unique IDs, allows every
// test case within the entire team to be uniquely identified.
#define BASE_REQUIRED 0x00010000
#define BASE_OPTIONAL 0x00020000
TCHAR ptszCustomizedDirectory[MAX_PATH] = _T("");
// Our function table that we pass to Tux
FUNCTION_TABLE_ENTRY g_lpFTE[] = {
TEXT("Required" ), 0, 0, 0, NULL,
TEXT("Events" ), 1, 0, 0, NULL,
TEXT("Single Event" ), 2, 0, 0, NULL,
TEXT( "SoundStart" ), 3, 0, BASE_REQUIRED + 0x0101, t_CheckEvent_SoundStart,
TEXT( "SoundEnd" ), 3, 0, BASE_REQUIRED + 0x0102, t_CheckEvent_SoundEnd,
TEXT( "FalseRecognition" ), 3, 0, BASE_REQUIRED + 0x0103, t_CheckEvent_FalseRecognition,
TEXT( "PhraseStart" ), 3, 0, BASE_REQUIRED + 0x0104, t_CheckEvent_PhraseStart,
TEXT( "Recognition" ), 3, 0, BASE_REQUIRED + 0x0105, t_CheckEvent_Recognition,
TEXT("Multi Events" ), 2, 0, 0, NULL,
TEXT( "SoundStart -> SoundEnd order" ), 3, 0, BASE_REQUIRED + 0x0106, t_CheckEvent_SoundStartEnd,
TEXT( "PhraseStart -> Recognition order" ), 3, 0, BASE_REQUIRED + 0x0107, t_CheckEvent_PhraseStartRecognitionOrder,
TEXT( "Events Offset" ), 3, 0, BASE_REQUIRED + 0x0108, t_CheckEvent_EventsSequences,
TEXT("Lexicon" ), 1, 0, 0, NULL,
TEXT("User Lexicon" ), 2, 0, 0, NULL,
TEXT( "Synchronize before loading Command & Control grammar" ), 3, 0, BASE_REQUIRED + 0x0201, t_UserLexSynchBeforeCfgLoad,
TEXT( "Synchronize Command & Control grammar after loading engine" ), 3, 0, BASE_REQUIRED + 0x0202, t_UserLexSynchAfterGrammarLoad,
TEXT( "Application Lexicon for Command & Control" ), 2, 0, BASE_REQUIRED + 0x0203, t_AppLex,
TEXT( "Uses user lexicon before application lexicon for Command & Control" ), 2, 0, BASE_REQUIRED + 0x0204, t_UserLexBeforeAppLex,
TEXT( "Case sensitive lexicon" ), 2, 0, BASE_REQUIRED + 0x0205, t_CaseSensitiveLexicon,
TEXT("Grammar" ), 1, 0, 0, NULL,
TEXT( "L tag" ), 2, 0, BASE_REQUIRED + 0x0301, t_GrammarListTag,
TEXT( "Expected Rule" ), 2, 0, BASE_REQUIRED + 0x0302, t_GrammarExpRuleTag,
TEXT( "P[hrase] tag" ), 2, 0, BASE_REQUIRED + 0x0303, t_GrammarPTag,
TEXT( "O[ptional] tag" ), 2, 0, BASE_REQUIRED + 0x0304, t_GrammarOTag,
TEXT( "RULE and RULEREF tags" ), 2, 0, BASE_REQUIRED + 0x0305, t_GrammarRuleTag,
TEXT( "/Disp/lex/pron" ), 2, 0, BASE_REQUIRED + 0x0306, t_CustomPron,
TEXT( "Case sensitive grammar" ), 2, 0, BASE_REQUIRED + 0x0307, t_CaseSensitiveGrammar,
TEXT("Other" ), 1, 0, 0, NULL,
TEXT( "SpPhraseElements" ), 2, 0, BASE_REQUIRED + 0x0401, t_SpPhraseElements,
TEXT( "Automatically pause engine on recognition" ), 2, 0, BASE_REQUIRED + 0x0402, t_AutoPause,
TEXT( "Invalidate top level rule" ), 2, 0, BASE_REQUIRED + 0x0403, t_InvalidateToplevelRule,
TEXT( "Invalidate non-top level rule" ), 2, 0, BASE_REQUIRED + 0x0404, t_InvalidateNonToplevelRule,
TEXT( "Multi instances" ), 2, 0, BASE_REQUIRED + 0x0405, t_MultiInstances,
TEXT( "Multiple application contexts [ISpRecoContext]" ), 2, 0, BASE_REQUIRED + 0x0406, t_MultipleRecoContext,
TEXT("Optional" ), 0, 0, 0, NULL,
TEXT("Events" ), 1, 0, 0, NULL,
TEXT( "Get: Hypothesis" ), 2, 0, BASE_OPTIONAL + 0x1100, t_CheckEvent_Hypothesis,
TEXT( "Get: Interference" ), 2, 0, BASE_OPTIONAL + 0x1101, t_CheckEvent_Interference,
TEXT("Dictation" ), 1, 0, 0, NULL,
TEXT("User Lexicon" ), 2, 0, 0, NULL,
TEXT( "Synchronize before loading dictation grammar" ), 3, 0, BASE_OPTIONAL + 0x1200, t_UserLexSynchBeforeDicLoad,
TEXT( "Synchronize Dictation grammar after loading engine" ), 3, 0, BASE_OPTIONAL + 0x1201, t_UserLexSynchAfterDictationLoad,
TEXT( "DICTATION Tag" ), 2, 0, BASE_OPTIONAL + 0x1202, t_DictationTag,
TEXT( "Dictation Alternates" ), 2, 0, BASE_OPTIONAL + 0x001203, t_Alternates_Dictation,
TEXT("Grammar" ), 1, 0, 0, NULL,
TEXT("Tags" ), 2, 0, 0, NULL,
TEXT( "CFGTextBuffer" ), 3, 0, BASE_OPTIONAL + 0x1301, t_CFGTextBuffer,
TEXT( "WILDCARD Tag" ), 3, 0, BASE_OPTIONAL + 0x1303, t_Wildcard,
TEXT( "Use correct grammar with unambiguous rules" ), 2, 0, BASE_OPTIONAL + 0x1304, t_PickGrammar,
TEXT( "Use most recently activated grammar with ambiguous rules" ), 2, 0, BASE_OPTIONAL + 0x1305, t_UseLastActivatedGrammar,
TEXT("Other" ), 1, 0, 0, NULL,
TEXT( "Recognition with Inverse Text Normalization" ), 2, 0, BASE_OPTIONAL + 0x1500, t_GetITNResult,
TEXT( "Engine Numeric Properties" ), 2, 0, BASE_OPTIONAL + 0x1501, t_RequiredPropertyNum,
TEXT( "Engine Text Properties" ), 2, 0, BASE_OPTIONAL + 0x1502, t_RequiredPropertyString,
TEXT( "Command&Control Alternates" ), 2, 0, BASE_OPTIONAL + 0x1503, t_Alternates_Cfg,
NULL , 0, 0, 0, NULL // marks end of list
};
HRESULT SetCurrentDirToDllDir()
{
TCHAR tszPath[MAX_PATH];
HRESULT hr = E_FAIL;
if (::GetModuleFileName(g_pShellInfo->hLib, tszPath, MAX_PATH))
{
TCHAR *psLast = ::_tcsrchr(tszPath, '\\');
if (psLast)
*psLast = _T('\0');
if (::SetCurrentDirectory(tszPath))
{
hr = S_OK;
}
}
return hr;
}
HRESULT PreTestSetup(void) {
return SetCurrentDirToDllDir();
}
HRESULT PostTestCleanup(void) {
return S_OK;
}

View File

@@ -0,0 +1,562 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Japanese resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_JPN)
#ifdef _WIN32
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// SRGRAMMAR
//
IDR_RULE_GRAMMAR SRGRAMMAR DISCARDABLE "..\\resources\\tag_rule_j.cfg"
IDR_L_GRAMMAR SRGRAMMAR DISCARDABLE "..\\resources\\tag_l_j.cfg"
IDR_O_GRAMMAR SRGRAMMAR DISCARDABLE "..\\resources\\tag_o_j.cfg"
IDR_P1_GRAMMAR SRGRAMMAR DISCARDABLE "..\\resources\\tag_p1_j.cfg"
IDR_P2_GRAMMAR SRGRAMMAR DISCARDABLE "..\\resources\\tag_p2_j.cfg"
IDR_EXPRULE_GRAMMAR SRGRAMMAR DISCARDABLE "..\\resources\\tag_exprule_j.cfg"
IDR_SNORK_GRAMMAR SRGRAMMAR DISCARDABLE "..\\resources\\snork_j.cfg"
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", "\0"
VALUE "CompanyName", "Microsoft\0"
VALUE "FileDescription", "SRCOMP\0"
VALUE "FileVersion", "1, 0, 0, 1\0"
VALUE "InternalName", "SRCOMP\0"
VALUE "LegalCopyright", "Copyright (c) Microsoft Corporation. All rights reserved.\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "SRCOMP.dll\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "Microsoft SRCOMP\0"
VALUE "ProductVersion", "1, 0, 0, 1\0"
VALUE "SpecialBuild", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_RECO_SYNCH_BEFORE_LOAD L"\x3059\x304f\x3046\x304d"
IDS_RECO_SYNCH_AFTER_DICT L"\x3059\x304f\x3046\x304d"
IDS_RECO_SYNCH_AFTER_GRAM L"\x3059\x304f\x3046\x304d"
IDS_RECO_L_TAG L"\x7f6e\x304f"
IDS_RECO_P_TAG L"\x767d"
IDS_RECO_O_TAG_1 L"\x4e0b\x3055\x3044"
IDS_RECO_O_TAG_2 L"\x6b69\x3044\x3066"
IDS_RECO_O_TAG_3 L"\x3086\x3063\x304f\x308a"
IDS_RECO_RULE_TAG L"\x4e03\x3092\x52d5\x304b\x3057\x3066"
IDS_RESOURCE_LOCATION1 "..\\resources\\"
IDS_RESOURCE_LOCATION2 "..\\..\\..\\resources\\"
IDS_UNEXPECTED_ERR "recieved an unexpected error"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_UNEXPECTED_EVENT "recieved an unexpected event"
IDS_ERR_AUDIOFORMAT_TOMANY "Too many audio formats"
IDS_ERR_AUDIOFORMAT_UNSUPPORTED "unsupported audio format returned"
IDS_ERR_AUDIOFORMAT_NOTENOUGH "no formats returned"
IDS_ERR_SOUNDSTART_NOEVENT "failed to recieve sound_start event"
IDS_ERR_STREAMEND_NOEVENT "failed to recieve stream_end event"
IDS_ERR_SOUNDEND_NOEVENT "failed to recieve sound_end event"
IDS_ERR_SOUNDSTART_BADPOSITION1 "sound_start postion after sound_end"
IDS_ERR_SOUNDSTART_BADPOSITION2 "sound_start not in last third of audio"
IDS_ERR_SOUNDEND_BADPOSITION1 "sound_end postion after stream_end"
IDS_ERR_SOUNDEND_BADPOSITION2 "sound_end not in first third of audio"
IDS_ERR_SOUNDSTARTEND_NOEVENT
"failed to recieve both sound_start and sound_end events"
IDS_ERR_SOUNDSTARTEND_WRONGORDER
"sound_start and sound_end events recieved in wrong order"
IDS_ERR_PHRASESTART_NOEVENT "failed to recieve phrase_start event"
IDS_ERR_RECOGNITION_NOEVENT "failed to recieve recognition event"
IDS_ERR_RECOGNITION_EVENTONSILENCE
"received a Recognition event for silence"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_ERR_RECOGNITION_WRONGORDER
"recoginition event recieved in wrong order"
IDS_ERR_HYPOTHESIS_NOEVENT "failed to recieve hypothesis event"
IDS_ERR_HYPOTHESIS_WRONGORDER "hypothesis event recieved in wrong order"
IDS_ERR_RESULT_WRONGWORD "failed to recieve expected result"
IDS_ERR_LEX_REMOVEUSER "failed to remove user"
IDS_ERR_LEX_EXPECTNOWORD "should not get word from empty user lexicon"
IDS_RECO_NEWWORD_PRON L"\x30b9\x30ce\x30fc\x30af"
IDS_ERR_FALSERECOGNITION_NOEVENT
"failed to recieve false recognition event"
IDS_AUTOPAUSE_DYNAMICWORD1 L"\x3057\x308d"
IDS_AUTOPAUSE_DYNAMICWORD2 L"\x304f\x308d"
IDS_AUTOPAUSE_DYNAMICRULE1 "action"
IDS_AUTOPAUSE_DYNAMICRULE2 "color"
IDS_WAV_AUTOPAUSE "multireco_j.wav"
IDS_INVALIDATETOPLEVEL_DYNAMICWORDS L"\x30aa\x30fc\x30dc\x30a8\x3092\x6f14\x594f\x3057\x3066\x304f\x3060\x3055\x3044"
IDS_INVALIDATETOPLEVEL_DYNAMICRULE "play"
IDS_WAV_INVALIDATETOPLEVEL_OLD "tag_exprule_j.wav"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_WAV_SOUNDSTART "tag_l_j.wav"
IDS_WAV_SOUNDEND "tag_l_j.wav"
IDS_WAV_SOUNDSTARTEND "tag_l_j.wav"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_WAV_PHRASESTART "tag_l_j.wav"
IDS_WAV_RECOGNITION_1 "tag_l_j.wav"
IDS_WAV_HYPOTHESIS "tag_exprule_j.wav"
IDS_WAV_SYNCH_BEFORE_LOAD "lexicon_j.wav"
IDS_WAV_SYNCH_AFTER_DICT "lexicon_j.wav"
IDS_WAV_SYNCH_AFTER_GRAM "lexicon_j.wav"
IDS_WAV_L_TAG "tag_l_j.wav"
IDS_WAV_MULT_RECO "multireco_j.wav"
IDS_WAV_EXPRULE_TAG "tag_exprule_j.wav"
IDS_WAV_P_TAG "multireco_j.wav"
IDS_WAV_O_TAG_1 "tag_o1_j.wav"
IDS_WAV_O_TAG_2 "tag_o2_j.wav"
IDS_WAV_O_TAG_3 "tag_o3_j.wav"
IDS_WAV_RULE_TAG "tag_rule_j.wav"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_INVALIDATETOPLEVEL_DYNAMICNEWWORDS L"\x4e03\x3092\x52d5\x304b\x3057\x3066\x304f\x3060\x3055\x3044"
IDS_ERR_INVALIDATETOPLEVEL
"Engine failed to invalidate the toplevel rule."
IDS_WAV_INVALIDATETOPLEVEL_NEW "tag_rule_j.wav"
IDS_INVALIDATENONTOPLEVEL_RULE1 "option"
IDS_INVALIDATENONTOPLEVEL_RULE2 "thing"
IDS_INVALIDATENONTOPLEVEL_TOPLEVELRULE "play"
IDS_INVALIDATENONTOPLEVEL_OLDWORD1 L"\x30aa\x30fc\x30dc\x30a8"
IDS_INVALIDATENONTOPLEVEL_OLDWORD2 L"\x3057\x3066\x304f\x3060\x3055\x3044"
IDS_INVALIDATENONTOPLEVEL_NEWWORD2 " "
IDS_INVALIDATENONTOPLEVEL_TOPLEVELWORDS L"\x3092\x6f14\x594f"
IDS_WAV_INVALIDATENONTOPLEVEL_OLD "tag_exprule_j.wav"
IDS_WAV_INVALIDATENONTOPLEVEL_NEW "invalidaterule_j.wav"
IDS_WAV_CFGTEXTBUFFER "tag_exprule_j.wav"
IDS_CFGTEXTBUFFER_WORDS L"\x30aa\x30fc\x30dc\x30a8"
IDS_CFGTEXTBUFFER_BUFFERWORD L"\x3092\x6f14\x594f\x3057\x3066\x304f\x3060\x3055\x3044"
IDS_CFGTEXTBUFFER_RULE "play"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_DICTATIONTAG_RULE "play"
IDS_WAV_DICTATIONTAG "tag_exprule_j.wav"
IDS_WILDCARD_WORDS L"\x30aa\x30fc\x30dc\x30a8"
IDS_WILDCARD_RULE "play"
IDS_WAV_WILDCARD "tag_exprule_j.wav"
IDS_APPLEX_WORD L"\x3059\x304f\x3046\x304d"
IDS_APPLEX_PROP L"\x30b9\x30ce\x30fc\x30af"
IDS_USERLEXBEFOREAPPLEX_WORD L"\x3059\x304f\x3046\x304d"
IDS_USERLEXBEFOREAPPLEX_USERPROP L"\x30b9\x30ce\x30fc\x30af"
IDS_USERLEXBEFOREAPPLEX_APPPROP L"\x30c6\x30ec\x30d3"
IDS_WAV_APPLEX "lexicon_j.wav"
IDS_WAV_USERLEXBEFOREAPPLEX "lexicon_j.wav"
IDS_INVALIDATENONTOPLEVEL_NEWWORD1 L"\x30d4\x30a2\x30ce"
IDS_RESOURCE_LOCATION3 "..\\..\\resources\\"
IDS_RECO_EXPRULE_FIRSTRULE "firstrule"
IDS_RECO_EXPRULE_SECONDRULE "secondrule"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_WAV_ALTERMATESCFG "tag_rule_j.wav"
IDS_ALTERNATESCFG_BESTWORD L"\x4e03"
IDS_ALTERNATESCFG_ALTERNATE1 L"\x751f"
IDS_ALTERNATESCFG_ALTERNATE2 L"\x5948\x826f"
IDS_ALTERNATESCFG_WORDS L"\x3092\x52d5\x304b\x3057\x3066\x304f\x3060\x3055\x3044"
IDS_ALTERNATESCFG_RULE "play"
IDS_ERR_INTERFERENCE_NOEVENT "failed to receive the interference event"
IDS_WAV_INTERFERENCE "tag_l_j.wav"
IDS_WAV_GETITNRESULT "tag_rule_j.wav"
IDS_RECO_GETITNRESULT L"7\x3092\x52d5\x304b\x3057\x3066\x304f\x3060\x3055\x3044"
IDS_CUSTOMPROP_NEWWORD_PRON L"\x30b9\x30ce\x30fc\x30af"
IDS_CUSTOMPROP_RULE "play"
IDS_WAV_CUSTOMPROP "lexicon_j.wav"
IDS_CUSTOMPROP_NEWWORD_DISP L"\x6f14\x594f"
IDS_CUSTOMPROP_NEWWORD_LEX L"\x3048\x3093\x305d\x3046"
IDS_DICTATIONTAG_WORDS L"\x30aa\x30fc\x30dc\x30a8\x3092\x6f14\x594f"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_CASESENSITIVEGRAMMAR_RULENAME " "
IDS_CASESENSITIVEGRAMMAR_LEX1 " "
IDS_CASESENSITIVEGRAMMAR_PRON1 " "
IDS_CASESENSITIVEGRAMMAR_LEX2 " "
IDS_CASESENSITIVEGRAMMAR_PRON2 " "
IDS_CASESENSITIVEGRAMMAR_WAVE " "
IDS_CASESENSITIVEGRAMMAR_DISP1 " "
IDS_CASESENSITIVEGRAMMAR_DISP2 " "
IDS_CASESENSITIVELEXICON_WORD1 " "
IDS_CASESENSITIVELEXICON_SYMBOL1 " "
IDS_CASESENSITIVELEXICON_WORD2 " "
IDS_CASESENSITIVELEXICON_SYMBOL2 " "
IDS_CASESENSITIVELEXICON_WAVE " "
IDS_CASESENSITIVELEXICON_RULENAME " "
IDS_CFGTEXTBUFFER_NOTINTERESTEDWORDS L"\x304a\x9858\x3044\x3057\x307e\x3059"
END
#endif // Japanese resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// SRGRAMMAR
//
IDR_RULE_GRAMMAR SRGRAMMAR DISCARDABLE "..\\resources\\tag_rule.cfg"
IDR_L_GRAMMAR SRGRAMMAR DISCARDABLE "..\\resources\\tag_l.cfg"
IDR_O_GRAMMAR SRGRAMMAR DISCARDABLE "..\\resources\\tag_o.cfg"
IDR_P1_GRAMMAR SRGRAMMAR DISCARDABLE "..\\resources\\tag_p1.cfg"
IDR_P2_GRAMMAR SRGRAMMAR DISCARDABLE "..\\resources\\tag_p2.cfg"
IDR_EXPRULE_GRAMMAR SRGRAMMAR DISCARDABLE "..\\resources\\tag_exprule.cfg"
IDR_SNORK_GRAMMAR SRGRAMMAR DISCARDABLE "..\\resources\\snork.cfg"
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", "\0"
VALUE "CompanyName", "Microsoft\0"
VALUE "FileDescription", "SRCOMP\0"
VALUE "FileVersion", "1, 0, 0, 1\0"
VALUE "InternalName", "SRCOMP\0"
VALUE "LegalCopyright", "Copyright (c) Microsoft Corporation. All rights reserved.\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "SRCOMP.dll\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "Microsoft SRCOMP\0"
VALUE "ProductVersion", "1, 0, 0, 1\0"
VALUE "SpecialBuild", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_RECO_SYNCH_BEFORE_LOAD "skooky"
IDS_RECO_SYNCH_AFTER_DICT "skooky"
IDS_RECO_SYNCH_AFTER_GRAM "skooky"
IDS_RECO_L_TAG "put"
IDS_RECO_P_TAG "white"
IDS_RECO_O_TAG_1 "please"
IDS_RECO_O_TAG_2 "walk"
IDS_RECO_O_TAG_3 "slowly"
IDS_RECO_RULE_TAG "seven"
IDS_RESOURCE_LOCATION1 "..\\resources\\"
IDS_RESOURCE_LOCATION2 "..\\..\\..\\resources\\"
IDS_UNEXPECTED_ERR "recieved an unexpected error"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_UNEXPECTED_EVENT "recieved an unexpected event"
IDS_ERR_AUDIOFORMAT_TOMANY "Too many audio formats"
IDS_ERR_AUDIOFORMAT_UNSUPPORTED "unsupported audio format returned"
IDS_ERR_AUDIOFORMAT_NOTENOUGH "no formats returned"
IDS_ERR_SOUNDSTART_NOEVENT "failed to recieve sound_start event"
IDS_ERR_STREAMEND_NOEVENT "failed to recieve stream_end event"
IDS_ERR_SOUNDEND_NOEVENT "failed to recieve sound_end event"
IDS_ERR_SOUNDSTART_BADPOSITION1 "sound_start postion after sound_end"
IDS_ERR_SOUNDSTART_BADPOSITION2 "sound_start not in last third of audio"
IDS_ERR_SOUNDEND_BADPOSITION1 "sound_end postion after stream_end"
IDS_ERR_SOUNDEND_BADPOSITION2 "sound_end not in first third of audio"
IDS_ERR_SOUNDSTARTEND_NOEVENT
"failed to recieve both sound_start and sound_end events"
IDS_ERR_SOUNDSTARTEND_WRONGORDER
"sound_start and sound_end events recieved in wrong order"
IDS_ERR_PHRASESTART_NOEVENT "failed to recieve phrase_start event"
IDS_ERR_RECOGNITION_NOEVENT "failed to recieve recognition event"
IDS_ERR_RECOGNITION_EVENTONSILENCE
"received a Recognition event for silence"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_ERR_RECOGNITION_WRONGORDER
"recoginition event recieved in wrong order"
IDS_ERR_HYPOTHESIS_NOEVENT "failed to recieve hypothesis event"
IDS_ERR_HYPOTHESIS_WRONGORDER "hypothesis event recieved in wrong order"
IDS_ERR_RESULT_WRONGWORD "failed to recieve expected result"
IDS_ERR_LEX_REMOVEUSER "failed to remove user"
IDS_ERR_LEX_EXPECTNOWORD "should not get word from empty user lexicon"
IDS_RECO_NEWWORD_PRON "s n ao 1 r k"
IDS_ERR_FALSERECOGNITION_NOEVENT
"failed to recieve false recognition event"
IDS_AUTOPAUSE_DYNAMICWORD1 "put"
IDS_AUTOPAUSE_DYNAMICWORD2 "red"
IDS_AUTOPAUSE_DYNAMICRULE1 "action"
IDS_AUTOPAUSE_DYNAMICRULE2 "color"
IDS_WAV_AUTOPAUSE "autopause.wav"
IDS_INVALIDATETOPLEVEL_DYNAMICWORDS "play the oboe"
IDS_INVALIDATETOPLEVEL_DYNAMICRULE "play"
IDS_WAV_INVALIDATETOPLEVEL_OLD "tag_exprule.wav"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_WAV_SOUNDSTART "tag_l.wav"
IDS_WAV_SOUNDEND "tag_l.wav"
IDS_WAV_SOUNDSTARTEND "tag_l.wav"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_WAV_PHRASESTART "tag_l.wav"
IDS_WAV_RECOGNITION_1 "tag_l.wav"
IDS_WAV_HYPOTHESIS "tag_exprule.wav"
IDS_WAV_SYNCH_BEFORE_LOAD "lexicon.wav"
IDS_WAV_SYNCH_AFTER_DICT "lexicon.wav"
IDS_WAV_SYNCH_AFTER_GRAM "lexicon.wav"
IDS_WAV_L_TAG "tag_l.wav"
IDS_WAV_MULT_RECO "multireco.wav"
IDS_WAV_EXPRULE_TAG "tag_exprule.wav"
IDS_WAV_P_TAG "tag_p.wav"
IDS_WAV_O_TAG_1 "tag_o1.wav"
IDS_WAV_O_TAG_2 "tag_o2.wav"
IDS_WAV_O_TAG_3 "tag_o3.wav"
IDS_WAV_RULE_TAG "tag_rule.wav"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_INVALIDATETOPLEVEL_DYNAMICNEWWORDS "please play the seven"
IDS_ERR_INVALIDATETOPLEVEL
"Engine failed to invalidate the toplevel rule."
IDS_WAV_INVALIDATETOPLEVEL_NEW "tag_rule.wav"
IDS_INVALIDATENONTOPLEVEL_RULE1 "option"
IDS_INVALIDATENONTOPLEVEL_RULE2 "thing"
IDS_INVALIDATENONTOPLEVEL_TOPLEVELRULE "play"
IDS_INVALIDATENONTOPLEVEL_OLDWORD1 " "
IDS_INVALIDATENONTOPLEVEL_OLDWORD2 "oboe"
IDS_INVALIDATENONTOPLEVEL_NEWWORD2 "seven"
IDS_INVALIDATENONTOPLEVEL_TOPLEVELWORDS "play the "
IDS_WAV_INVALIDATENONTOPLEVEL_OLD "tag_exprule.wav"
IDS_WAV_INVALIDATENONTOPLEVEL_NEW "tag_rule.wav"
IDS_WAV_CFGTEXTBUFFER "tag_exprule.wav"
IDS_CFGTEXTBUFFER_WORDS "play the "
IDS_CFGTEXTBUFFER_BUFFERWORD "oboe"
IDS_CFGTEXTBUFFER_RULE "play"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_WAV_ALTERMATESCFG "tag_exprule.wav"
IDS_ALTERNATESCFG_BESTWORD "play"
IDS_ALTERNATESCFG_ALTERNATE1 "played"
IDS_ALTERNATESCFG_ALTERNATE2 "pay"
IDS_ALTERNATESCFG_WORDS "the oboe"
IDS_ALTERNATESCFG_RULE "play"
IDS_ERR_INTERFERENCE_NOEVENT "failed to receive the interference event"
IDS_WAV_INTERFERENCE "tag_l.wav"
IDS_WAV_GETITNRESULT "tag_rule.wav"
IDS_RECO_GETITNRESULT "please play the 7"
IDS_CUSTOMPROP_NEWWORD_PRON "s n ao 1 r k"
IDS_CUSTOMPROP_RULE "play"
IDS_WAV_CUSTOMPROP "lexicon.wav"
IDS_CUSTOMPROP_NEWWORD_DISP "abc"
IDS_CUSTOMPROP_NEWWORD_LEX "play"
IDS_DICTATIONTAG_WORDS "play the"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_DICTATIONTAG_RULE "play"
IDS_WAV_DICTATIONTAG "tag_exprule.wav"
IDS_WILDCARD_WORDS "please play"
IDS_WILDCARD_RULE "play"
IDS_WAV_WILDCARD "tag_rule.wav"
IDS_APPLEX_WORD "skooky"
IDS_APPLEX_PROP "s n ao 1 r k"
IDS_USERLEXBEFOREAPPLEX_WORD "skooky"
IDS_USERLEXBEFOREAPPLEX_USERPROP "s n ao 1 r k"
IDS_USERLEXBEFOREAPPLEX_APPPROP "p l ey"
IDS_WAV_APPLEX "lexicon.wav"
IDS_WAV_USERLEXBEFOREAPPLEX "lexicon.wav"
IDS_INVALIDATENONTOPLEVEL_NEWWORD1 "please "
IDS_RESOURCE_LOCATION3 "..\\..\\resources\\"
IDS_RECO_EXPRULE_FIRSTRULE "firstrule"
IDS_RECO_EXPRULE_SECONDRULE "secondrule"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_CASESENSITIVEGRAMMAR_RULENAME "rule"
IDS_CASESENSITIVEGRAMMAR_LEX1 "skooky"
IDS_CASESENSITIVEGRAMMAR_PRON1 "p uh t"
IDS_CASESENSITIVEGRAMMAR_LEX2 "SKOOKY"
IDS_CASESENSITIVEGRAMMAR_PRON2 "w ay t"
IDS_CASESENSITIVEGRAMMAR_WAVE "tag_p.wav"
IDS_CASESENSITIVEGRAMMAR_DISP1 "skooky"
IDS_CASESENSITIVEGRAMMAR_DISP2 "SKOOKY"
IDS_CASESENSITIVELEXICON_WORD1 "skooky"
IDS_CASESENSITIVELEXICON_SYMBOL1 "p uh t"
IDS_CASESENSITIVELEXICON_WORD2 "SKOOKY"
IDS_CASESENSITIVELEXICON_SYMBOL2 "w ay t"
IDS_CASESENSITIVELEXICON_WAVE "tag_p.wav"
IDS_CASESENSITIVELEXICON_RULENAME "rule"
IDS_CFGTEXTBUFFER_NOTINTERESTEDWORDS "please "
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,154 @@
//******************************************************************************
// Copyright (c) Microsoft Corporation. All rights reserved.
// srenginecompliance.h
//
//******************************************************************************
#ifndef _srenginecompliance_h_
#define _srenginecompliance_h_
#include "sapi.h"
#include <vector>
typedef std::vector<CComPtr<ISpRecoResult> > RESULTVECTOR;
#ifdef _WIN32_WINNT
#undef _WIN32_WINNT
#endif
#define _WIN32_WINNT 0x0400
#define WILDCARDTEXT L"..."
#define WAIT_TIME 25000
#define TEST_CASES 20
#define NUMOFRECOCONTEXTS 2
#define INTERATIONS 1
#define TESTEVENT_WAIT 250
template <const int i = MAX_PATH>
class CSpTString
{
#ifdef _UNICODE
private:
WCHAR m_wString[i];
public:
CSpTString(const WCHAR * psz){
wcscpy(m_wString, psz);
}
operator const WCHAR *() { return m_wString; }
WCHAR * operator =(const WCHAR * psz) {
wcscpy(m_wString, psz);
return m_wString;
}
#else
private:
char m_aString[i];
public:
CSpTString(const WCHAR * psz)
{
::WideCharToMultiByte(CP_ACP, 0, psz, -1, m_aString, i, NULL, NULL);
}
operator const char *() { return m_aString; }
const char * operator =(const WCHAR * psz)
{
::WideCharToMultiByte(CP_ACP, 0, psz, -1, m_aString, i, NULL, NULL);
return m_aString;
}
#endif
};
HRESULT RegRecursiveCopyKey(HKEY hkeySrc, LPCTSTR szSubKeySrc, HKEY hkeyDest, LPCTSTR szSubKeyDest, BOOL fClearDest = FALSE);
HRESULT RegRecursiveDeleteKey(HKEY hkeySrc, LPCTSTR szSubKeySrc, BOOL fKeepEmptyRoot = FALSE);
LANGID GetDefaultEnginePrimaryLangId();
struct PropertyNum
{
const WCHAR* pPropertyNumNames;
LONG ulLowLimit;
LONG ulHighLimit;
};
const PropertyNum PropertyNumTable[] =
{
{SPPROP_RESOURCE_USAGE, 0, 100},
{SPPROP_HIGH_CONFIDENCE_THRESHOLD, 0, 100},
{SPPROP_NORMAL_CONFIDENCE_THRESHOLD, 0, 100},
{SPPROP_LOW_CONFIDENCE_THRESHOLD, 0, 100},
{SPPROP_RESPONSE_SPEED, 0, 10000},
{SPPROP_COMPLEX_RESPONSE_SPEED, 0, 10000},
{SPPROP_ADAPTATION_ON, 0, 1}
};
inline HRESULT CreateAppLexicon(
const WCHAR * pszLangIndependentName,
LANGID langid,
const WCHAR * pszLangDependentName,
WCHAR* pwszAttributes,
ISpLexicon** ppLexicon)
{
HRESULT hr = S_OK;
CComPtr<ISpObjectToken> cpToken;
CComPtr<ISpDataKey> cpDataKeyAttribs;
if(SUCCEEDED(hr))
{
hr = SpCreateNewTokenEx(SPCAT_APPLEXICONS, pszLangIndependentName, &CLSID_SpUnCompressedLexicon, pszLangIndependentName, langid, pszLangDependentName, &cpToken, &cpDataKeyAttribs);
}
if(SUCCEEDED(hr))
{
CSpDynamicString str(pwszAttributes); // make a copy of the pwszAttributes
WCHAR* p = wcstok(str, L";");
while(SUCCEEDED(hr) && p)
{
if(WCHAR* pe = wcschr(p, L'='))
{
*(pe++) = L'\0';
hr = cpDataKeyAttribs->SetStringValue(p, pe);
}
else
{
hr = cpDataKeyAttribs->SetStringValue(p, L"");
}
p = wcstok(NULL, L";");
}
}
if(SUCCEEDED(hr))
{
hr = SpCreateObjectFromToken(cpToken, ppLexicon);
}
return hr;
}
inline HRESULT RemoveTestAppLexicon(WCHAR* pwszAttributes)
{
HRESULT hr = S_OK;
CComPtr<IEnumSpObjectTokens> cpEnum;
CComPtr<ISpObjectToken> cpSpObjectToken;
if( SUCCEEDED( hr ) )
{
// Get tts test engine voice
hr = SpEnumTokens(SPCAT_APPLEXICONS, pwszAttributes, NULL, &cpEnum);
}
if( hr == S_OK )
{
hr = cpEnum->Next(1, &cpSpObjectToken, NULL);
}
if( hr == S_OK )
{
hr = cpSpObjectToken->Remove(NULL);
}
return hr;
}
#endif // _srenginecompliance_h_

View File

@@ -0,0 +1,90 @@
//******************************************************************************
// Copyright (c) Microsoft Corporation. All rights reserved.
// srtests1.h
//
//******************************************************************************
#ifndef __SRTRESTS1_H__
#define __SRTRESTS1_H__
#include <windows.h>
#include <atlbase.h>
#include <tchar.h>
#include <kato.h>
#include <tux.h>
#include "sapi.h"
#include "sapiddk.h"
#include <sphelper.h>
#define GRAM_ID 123
// Added for logging across .cpp files
extern CKato *g_pKato;
extern TCHAR ptszCustomizedDirectory[];
// Engine compliance through SAPI API's
TESTPROCAPI t_CheckEvent_SoundStart (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_CheckEvent_SoundEnd (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_CheckEvent_SoundStartEnd (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_CheckEvent_PhraseStart (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_CheckEvent_Recognition (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_CheckEvent_FalseRecognition (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_CheckEvent_EventsSequences (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_CheckEvent_PhraseStartRecognitionOrder (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_CheckEvent_Hypothesis (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_CheckEvent_Interference (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
//TESTPROCAPI t_CheckEvent_PhraseHypReco (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_UserLexSynchBeforeDicLoad (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_UserLexSynchBeforeCfgLoad (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_UserLexSynchAfterDictationLoad (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_UserLexSynchAfterGrammarLoad (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_AppLex (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_UserLexBeforeAppLex (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_CaseSensitiveLexicon (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_GrammarListTag (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_GrammarExpRuleTag (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_GrammarPTag (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_GrammarOTag (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_GrammarRuleTag (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_CustomPron (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_CaseSensitiveGrammar (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_DictationTag (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_Wildcard (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_CFGTextBuffer (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_MultipleRecoContext (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_GetITNResult (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_Alternates_Dictation (UINT uMsg, TPPARAM tpParam, LPFUNCTION_TABLE_ENTRY lpFTE);
TESTPROCAPI t_Alternates_Cfg (UINT uMsg, TPPARAM tpParam, LPFUNCTION_TABLE_ENTRY lpFTE);
TESTPROCAPI t_SpPhraseElements (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_AutoPause (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_PickGrammar (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_UseLastActivatedGrammar (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_RequiredPropertyString (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_RequiredPropertyNum (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_InvalidateToplevelRule (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_InvalidateNonToplevelRule (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
TESTPROCAPI t_MultiInstances (UINT, TPPARAM, LPFUNCTION_TABLE_ENTRY);
#define TESTEVENT_TIMEOUT 20000
extern SPS_SHELL_INFO *g_pShellInfo; // need this to get handle to dll
#endif // __SRTRESTS1_H__

View File

@@ -0,0 +1,44 @@
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", "\0"
VALUE "CompanyName", "Microsoft Corp.\0"
VALUE "FileDescription", "Microsoft SRCOMP\0"
VALUE "FileVersion", "1, 0, 0, 1\0"
VALUE "InternalName", "SRCOMP\0"
VALUE "LegalCopyright", "Copyright (c) Microsoft Corporation. All rights reserved.\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "srcomp.dll\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "Microsoft Corp. SAPI5 samples\0"
VALUE "ProductVersion", "1, 0, 0, 1\0"
VALUE "SpecialBuild", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC

View File

@@ -0,0 +1,275 @@
//******************************************************************************
// Copyright (c) Microsoft Corporation. All rights reserved.
// audiostate.cpp
//
//******************************************************************************
#include "TTSComp.h"
//******************************************************************************
//***** Internal Functions
//******************************************************************************
inline HRESULT SpGetLanguageFromVoiceToken(ISpObjectToken * pToken, LANGID * plangid)
{
HRESULT hr = S_OK;
CComPtr<ISpDataKey> cpDataKeyAttribs;
hr = pToken->OpenKey(L"Attributes", &cpDataKeyAttribs);
CSpDynamicString dstrLanguage;
if (SUCCEEDED(hr))
{
hr = cpDataKeyAttribs->GetStringValue(L"Language", &dstrLanguage);
}
LANGID langid;
if (SUCCEEDED(hr))
{
if (!swscanf(dstrLanguage, L"%hx", &langid))
{
hr = E_UNEXPECTED;
}
}
if (SUCCEEDED(hr))
{
*plangid = langid;
}
SPDBG_REPORT_ON_FAIL(hr);
return hr;
} /* SpGetLanguageFromVoiceToken */
HRESULT SpGetLanguageIdFromDefaultVoice(LANGID *plangid)
{
HRESULT hr = S_OK;
CComPtr<ISpObjectToken> cpVoiceToken;
LANGID langid;
// Find the best voice
if( SUCCEEDED( hr ) )
{
hr = SpGetDefaultTokenFromCategoryId( SPCAT_VOICES, &cpVoiceToken );
}
if( SUCCEEDED( hr ) )
{
hr = SpGetLanguageFromVoiceToken(cpVoiceToken, &langid);
}
*plangid = langid;
return hr;
}
HRESULT GetWStrFromRes( UINT id, WCHAR* szwStr, int cchBufferMax )
{
HRSRC hResInfo = NULL;
HANDLE hStringSeg = NULL;
LPWSTR lpsz = NULL;
int cch = 0;
HRESULT hr = S_OK;
LANGID Language;
hr = SpGetLanguageIdFromDefaultVoice(&Language);
if (FAILED (hr ) )
return hr;
// String Tables are broken up into 16 string segments. Find the segment
// containing the string we are interested in.
if (hResInfo = FindResourceExW( g_pShellInfo->hLib, (LPCWSTR)RT_STRING,
MAKEINTRESOURCEW(((USHORT)id >> 4) + 1),
Language) )
{
// Load that segment.
hStringSeg = LoadResource( g_pShellInfo->hLib, hResInfo );
// Lock the resource.
if( lpsz = (LPWSTR)LockResource(hStringSeg) )
{
// Move past the other strings in this segment.
// (16 strings in a segment -> & 0x0F)
id &= 0x0F;
while( TRUE )
{
cch = *((WORD *)lpsz++); // PASCAL like string count
// first UTCHAR is count if TCHARs
if (id-- == 0) break;
lpsz += cch; // Step to start if next string
}
// Account for the NULL
cchBufferMax--;
// Don't copy more than the max allowed.
if (cch > cchBufferMax)
cch = cchBufferMax-1;
// Copy the string into the buffer.
CopyMemory( szwStr, lpsz, cch*sizeof(WCHAR) );
// Attach Null terminator.
szwStr[cch] = 0;
}
}
return cch ? S_OK : HRESULT_FROM_WIN32(ERROR_RESOURCE_NAME_NOT_FOUND);
}
//******************************************************************************
//***** TestProc()'s
//******************************************************************************
/*****************************************************************************/
//*************************************************************************************
TESTPROCAPI t_SpeakStop(UINT uMsg, TPPARAM tpParam, LPFUNCTION_TABLE_ENTRY lpFTE)
{
// This test uses the default audio object to speak pause and speak a stream. It checks
// to make sure a TTS engine is paying attention to these states by stopping the stream
// part way through and counting the number of word events ( these must be less than the
// total number in the string.
// Message check
if (uMsg != TPM_EXECUTE)
{
return TPR_NOT_HANDLED;
}
HRESULT hr = S_OK;
int tpr = TPR_PASS;
CComPtr<ISpVoice> cpLocalVoice;
// Create the SAPI voice
DOCHECKHRGOTO (hr = cpLocalVoice.CoCreateInstance( CLSID_SpVoice ););
tpr = t_SpeakStop_Test(uMsg, tpParam, lpFTE, cpLocalVoice, false);
EXIT:
return tpr;
}
/*****************************************************************************/
TESTPROCAPI t_SpeakStop_Test(UINT uMsg,
TPPARAM tpParam,
LPFUNCTION_TABLE_ENTRY lpFTE,
ISpVoice *cpVoice,
bool bCalledByMulti)
{
// Message check
if (uMsg != TPM_EXECUTE)
{
return TPR_NOT_HANDLED;
}
HRESULT hr = S_OK;
int tpr = TPR_PASS;
int cEventsReceived = 0;
WCHAR szwSpeakStr[MAX_PATH]=L"";
CSpEvent Event;
hr = cpVoice->SetOutput(NULL, TRUE);
CHECKHRGOTOId( hr, tpr, IDS_STRING60);
//clean up the event queue.
while (Event.GetFrom(cpVoice) == S_OK);
DOCHECKHRGOTO (hr = cpVoice->SetNotifyWin32Event(););
DOCHECKHRGOTO ( hr = cpVoice->SetInterest( SPFEI(SPEI_WORD_BOUNDARY), SPFEI(SPEI_WORD_BOUNDARY) ); );
DOCHECKHRGOTO ( hr = GetWStrFromRes( IDS_STRING1, szwSpeakStr ););
hr = cpVoice->Speak( szwSpeakStr, SPF_ASYNC, NULL );
CHECKHRGOTOId( hr, tpr, IDS_STRING13);
//wait for the first word boundry event
hr = cpVoice->WaitForNotifyEvent(TTS_WAITTIME);
if (bCalledByMulti )
{
//In Multi threaded case
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING62, " t_SpeakStop_Test");
}
else
{
//normal case
CHECKASSERTGOTOIdEx( (hr == S_OK), tpr, IDS_STRING62, " t_SpeakStop_Test");
}
Sleep (500);
//purges all data, close the audio and set action flag to SPVES_ABORT
hr = cpVoice->Speak( NULL, SPF_PURGEBEFORESPEAK, 0 );
CHECKHRGOTOId( hr, tpr, IDS_STRING13);
hr = cpVoice->WaitUntilDone( TTS_WAITTIME_LONG );
if (!bCalledByMulti )
{
CHECKASSERTGOTOIdEx( (hr == S_OK), tpr, IDS_STRING61, " t_SpeakStop_Test");
}
else
{
CHECKHRIdEx( hr, tpr, IDS_STRING61, " t_SpeakStop_Test");
}
while (S_OK == hr )
{
hr = Event.GetFrom(cpVoice);
if( hr == S_OK )
{
// count how many word boundry events we got
cEventsReceived++;
}
}
//Make sure the entire first speak call did not finish
//Note - The sentence contains 20 words, so normally we can receive 20 word
//boundary events.
CHECKASSERTId(( cEventsReceived < 20 ), tpr, IDS_STRING5);
// Logging info
CHECKHRId( hr, tpr, IDS_STRING5 );
EXIT:
return tpr;
}
//*************************************************************************************
TESTPROCAPI t_SpeakDestroy(UINT uMsg, TPPARAM tpParam, LPFUNCTION_TABLE_ENTRY lpFTE)
{
// This test starts a long Speak call and destroys the stream before completion. It
// expects engines to clean-up correctly and not fault.
// Message check
if (uMsg != TPM_EXECUTE)
{
return TPR_NOT_HANDLED;
}
HRESULT hr = S_OK;
int tpr = TPR_PASS;
CComPtr<ISpVoice> cpVoice;
WCHAR szwSpeakStr[MAX_PATH]=L"";
WCHAR szwDebug[MAX_PATH]=L"";
// Create the SAPI voice
DOCHECKHRGOTO (hr = cpVoice.CoCreateInstance( CLSID_SpVoice ););
//get the bookmark string
DOCHECKHRGOTO (hr = GetWStrFromRes( IDS_STRING6, szwSpeakStr ););
hr = cpVoice->Speak( szwSpeakStr, SPF_ASYNC, NULL );
CHECKHRGOTOId( hr, tpr, IDS_STRING13);
cpVoice.Release();
// Logging info
CHECKHRId( hr, tpr, IDS_STRING7 );
EXIT:
return tpr;
}

View File

@@ -0,0 +1,281 @@
//******************************************************************************
// Copyright (c) Microsoft Corporation. All rights reserved.
// compevents.cpp
//
//******************************************************************************
#include "TTSComp.h"
//******************************************************************************
//***** Internal Functions
//******************************************************************************
//******************************************************************************
//***** TestProc()'s
//******************************************************************************
TESTPROCAPI t_CheckEventsSAPI(UINT uMsg, TPPARAM tpParam, LPFUNCTION_TABLE_ENTRY lpFTE)
{
//This is a SAPI5 required test. It checks if the bookmark, word, and sentence
// boundary events are fired by TTS engine.
// Message check
if (uMsg != TPM_EXECUTE)
{
return TPR_NOT_HANDLED;
}
HRESULT hr = S_OK;
int tpr = TPR_PASS;
CComPtr<ISpVoice> cpLocalVoice;
// Create the SAPI voice
DOCHECKHRGOTO (hr = cpLocalVoice.CoCreateInstance( CLSID_SpVoice ););
tpr = t_CheckEventsSAPI_Test(uMsg, tpParam, lpFTE, cpLocalVoice, false);
EXIT:
return tpr;
}
/*****************************************************************************/
TESTPROCAPI t_CheckEventsSAPI_Test(UINT uMsg,
TPPARAM tpParam,
LPFUNCTION_TABLE_ENTRY lpFTE,
ISpVoice *cpVoice,
bool bCalledByMulti)
{
//This is a SAPI5 required test. It checks if the bookmark, word, and sentence
// boundary events are fired by TTS engine.
// Message check
if (uMsg != TPM_EXECUTE)
{
return TPR_NOT_HANDLED;
}
HRESULT hr = S_OK;
int tpr = TPR_PASS;
ULONGLONG ullFlags = SPFEI(SPEI_WORD_BOUNDARY) |
SPFEI(SPEI_SENTENCE_BOUNDARY) |
SPFEI(SPEI_TTS_BOOKMARK);
BOOL bGetEvents = true;
WCHAR szwSpeakStr[MAX_PATH]=L"";
WCHAR szwBMarkStr[MAX_PATH]=L"";
LONGLONG ullEventsRetrieved = 0;
LANGID LangID;
DOCHECKHRGOTO( hr = SpGetLanguageIdFromDefaultVoice(&LangID); );
//get the speak string
DOCHECKHRGOTO (hr = GetWStrFromRes( IDS_STRING20, szwSpeakStr ););
//get the bookmark string
DOCHECKHRGOTO (hr = GetWStrFromRes( IDS_STRING21, szwBMarkStr ););
DOCHECKHRGOTO (hr = cpVoice->SetNotifyWin32Event(););
//set interest events
DOCHECKHRGOTO (hr = cpVoice->SetInterest( ullFlags, ullFlags ); );
//clean up the event queue
while( hr == S_OK )
{
SPEVENT Event;
hr = cpVoice->GetEvents (1, &Event, NULL);
}
CHECKHRId( hr, tpr, IDS_STRING120 );
hr = cpVoice->Speak( szwSpeakStr, SPF_ASYNC |SPF_IS_XML , NULL );
CHECKHRGOTOId( hr, tpr, IDS_STRING13);
hr = cpVoice->WaitUntilDone(TTS_WAITTIME);
CHECKASSERTGOTOId( (hr == S_OK), tpr, IDS_STRING61);
while( hr == S_OK )
{
SPEVENT Event;
hr = cpVoice->GetEvents (1, &Event, NULL);
if( hr == S_OK )
{
// save the events retrieved
ullEventsRetrieved |= SPFEI(Event.eEventId);
if ( Event.eEventId == SPEI_TTS_BOOKMARK)
{
//verify bookmark string (lparam and wparam)
CHECKASSERTId(( !wcscmp( (WCHAR*)Event.lParam, szwBMarkStr ) ), tpr, IDS_STRING9);
CHECKASSERTId(( Event.wParam == _wtol(szwBMarkStr) ), tpr, IDS_STRING9);
continue;
}
switch (LangID)
{
case 2052:
if ( Event.eEventId == SPEI_WORD_BOUNDARY)
{
//position will be 1 (leading space), 3, 29, and 30
CHECKASSERTId((( Event.lParam == 1 ) || ( Event.lParam == 3 ) \
|| ( Event.lParam == 29 ) || ( Event.lParam == 30 )),
tpr, IDS_STRING9);
//length of word will be 1, or 2 if "ceshi" as one word
CHECKASSERTId( ( Event.wParam == 1 ) ||
( Event.wParam == 2 ), tpr, IDS_STRING9);
}
else if ( Event.eEventId == SPEI_SENTENCE_BOUNDARY)
{
//position will 1 (leading space), 3, and 29
CHECKASSERTId((( Event.lParam == 1 ) || ( Event.lParam == 3 ) \
|| ( Event.lParam == 29 )), tpr, IDS_STRING9);
//length of sentence will be either 2 including period, and
//3 if "ce shi" as a word.
CHECKASSERTId( ( Event.wParam == 2 ) || ( Event.wParam == 3 ),
tpr, IDS_STRING9);
}
break;
case 1041:
if ( Event.eEventId == SPEI_WORD_BOUNDARY)
{
//lparam position:1, 4, 32
CHECKASSERTId((( Event.lParam == 1 ) || ( Event.lParam == 4 ) \
|| ( Event.lParam == 32 ) ),
tpr, IDS_STRING9);
//wparm length of word: 3 or 6
CHECKASSERTId( ( Event.wParam == 3 ) || ( Event.wParam == 6 )
, tpr, IDS_STRING9);
}
else if ( Event.eEventId == SPEI_SENTENCE_BOUNDARY)
{
//lparam position:1, 32,
CHECKASSERTId((( Event.lParam == 1 ) || ( Event.lParam == 32 )),
tpr, IDS_STRING9);
//wparm length: 7 and 4
//Note: punctuation should be included
CHECKASSERTId( (( Event.wParam == 7 ) || ( Event.wParam == 4)),
tpr, IDS_STRING9);
}
break;
case 1033:
default:
if ( Event.eEventId == SPEI_WORD_BOUNDARY)
{
//position will be 1 for book (leading space), 6 for mark, 36 for test1.
CHECKASSERTId((( Event.lParam == 1 ) || ( Event.lParam == 7 ) \
|| ( Event.lParam == 36 ) ),
tpr, IDS_STRING9);
//lengths of word are either 4 ( book, mark) or 5 (test1)
CHECKASSERTId( ( Event.wParam == 5 ) || ( Event.wParam == 4 ), tpr, IDS_STRING9);
}
else if ( Event.eEventId == SPEI_SENTENCE_BOUNDARY)
{
//position will be 1 for book (leading spaces), 7 for mark),
//and 36 for test1
CHECKASSERTId((( Event.lParam == 1 ) || ( Event.lParam == 7 )
|| ( Event.lParam == 36 )), tpr, IDS_STRING9);
//length will be 5 for (book. and mark.) and 6 for (test1.)
CHECKASSERTId( (( Event.wParam == 5 ) || ( Event.wParam == 6)),
tpr, IDS_STRING9);
}
break;
}
}
}
// Logging info
CHECKHRGOTOId( hr, tpr, IDS_STRING9 );
// Make sure correct events were retrieved
CHECKASSERTId(((ullEventsRetrieved & ullFlags) == ullFlags), tpr, IDS_STRING9 );
EXIT:
return tpr;
}
TESTPROCAPI t_CheckEventsNotRequire(UINT uMsg, TPPARAM tpParam, LPFUNCTION_TABLE_ENTRY lpFTE)
{
// This test creates an Event Sink and asks a TTS engine to forward Events to it. It checks
// to make sure that all the expected Events are fired.
// Message check
if (uMsg != TPM_EXECUTE)
{
return TPR_NOT_HANDLED;
}
HRESULT hr = S_OK;
int tpr = TPR_SUPPORTED;
CComPtr<ISpVoice> cpVoice;
ULONGLONG ullFlags = SPFEI(SPEI_PHONEME) |
SPFEI(SPEI_VISEME);
BOOL bGetEvents = true;
WCHAR szwSpeakStr[MAX_PATH]=L"";
WCHAR szwDebug[MAX_PATH]=L"";
ULONGLONG ullEventsRetrieved = 0;
// Create the SAPI voice
DOCHECKHRGOTO (hr = cpVoice.CoCreateInstance( CLSID_SpVoice ););
//get the speak string
DOCHECKHRGOTO (hr = GetWStrFromRes( IDS_STRING10, szwSpeakStr ););
DOCHECKHRGOTO (hr = cpVoice->SetNotifyWin32Event(););
//set interest events
DOCHECKHRGOTO (hr = cpVoice->SetInterest( ullFlags, ullFlags ); );
//clean up the event queue
while( hr == S_OK )
{
SPEVENT Event;
hr = cpVoice->GetEvents (1, &Event, NULL);
}
CHECKHRId( hr, tpr, IDS_STRING120 );
hr = cpVoice->Speak( szwSpeakStr, SPF_ASYNC |SPF_IS_XML , NULL );
CHECKHRGOTOId( hr, tpr, IDS_STRING13);
hr = cpVoice->WaitUntilDone( TTS_WAITTIME );
CHECKASSERTGOTOIdEx( (hr == S_OK), tpr, IDS_STRING61, "in t_CheckEventsSAPI");
while( hr == S_OK )
{
CSpEvent Event;
hr = Event.GetFrom(cpVoice);
if( hr == S_OK )
{
// Record the events retrieved in dwFlagsRetrieved
ullEventsRetrieved |= SPFEI(Event.eEventId);
}
}
// Logging info
CHECKHRGOTOId( hr, tpr, IDS_STRING15 );
// Make sure correct events were retrieved
CHECKISSUPPORTEDId(( ullEventsRetrieved == ullFlags ), tpr, IDS_STRING15);
EXIT:
return tpr;
}

View File

@@ -0,0 +1,44 @@
//******************************************************************************
// Copyright (c) Microsoft Corporation. All rights reserved.
// f0.h
//
//******************************************************************************
#ifndef _F0_H_
#define _F0_H_
#ifdef __cplusplus
extern "C" {
#endif
typedef struct F0_Data* F0Data;
typedef struct {
float f0;
float rms;
/* float voicing;
*/
} F0Out;
F0Data F0_NewF0Obj (void);
void F0_DeleteF0Obj (F0Data* f0Obj);
int F0_ParseParameter (F0Data f0Obj, const char* str);
float F0_ParameterValue (F0Data f0Obj, const char* str);
int F0_Init (F0Data f0Obj, double sampFreq, int* buffsize, int* buffStep);
int F0_AddDataFrame (F0Data f0Obj, float* data, int nData);
int F0_OutputLength (F0Data f0Obj);
F0Out F0_GetOutputFrame (F0Data f0Obj, int idx);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -0,0 +1,825 @@
//******************************************************************************
// Copyright (c) Microsoft Corporation. All rights reserved.
// ispttsengine.cpp
//
//******************************************************************************
#include "TTSComp.h"
#include <limits.h>
//******************************************************************************
//***** Globals
//******************************************************************************
//******************************************************************************
//***** Internal Functions and helper classes
//******************************************************************************
//******************************************************************************
//***** TestProc()'s
//******************************************************************************
/*****************************************************************************/
TESTPROCAPI t_ISpTTSEngine_Speak(UINT uMsg, TPPARAM tpParam, LPFUNCTION_TABLE_ENTRY lpFTE)
{
// This test tests the ISpTTSEngine::Speak through the ISpVoice::Speak method.
// It does simple, normal usage tests.
// Message check
if (uMsg != TPM_EXECUTE)
{
return TPR_NOT_HANDLED;
}
HRESULT hr = S_OK;
int tpr = TPR_PASS;
CComPtr<ISpVoice> cpLocalVoice;
// Create the SAPI voice
DOCHECKHRGOTO (hr = cpLocalVoice.CoCreateInstance( CLSID_SpVoice ););
tpr = t_ISpTTSEngine_Speak_Test(uMsg, tpParam, lpFTE, cpLocalVoice, false);
EXIT:
return tpr;
}
/*****************************************************************************/
TESTPROCAPI t_ISpTTSEngine_Speak_Test(UINT uMsg,
TPPARAM tpParam,
LPFUNCTION_TABLE_ENTRY lpFTE,
ISpVoice *cpVoice,
bool bCalledByMulti)
{
// Message check
if (uMsg != TPM_EXECUTE)
{
return TPR_NOT_HANDLED;
}
HRESULT hr = S_OK;
int tpr = TPR_PASS;
CComPtr<ISpStream> cpStream;
ULONG ulStreamNum;
WCHAR szwSpeakStr[MAX_PATH]=L"";
WCHAR szwDebug[MAX_PATH]=L"";
WCHAR szwInitDebug[MAX_PATH]=L"";
WCHAR szwNonAscii[] = {0x65e5, 0x672c, 0}; // non-ascii text
CSpStreamFormat InFmt;
if( SUCCEEDED( hr ) )
{
hr = InFmt.AssignFormat(SPSF_22kHz16BitMono);
}
if( SUCCEEDED( hr ) )
{
hr = SPCreateStreamOnHGlobal( NULL, true, InFmt.FormatId(), InFmt.WaveFormatExPtr(), &cpStream );
}
// Set the output to memory so we don't hear every speak call
if( SUCCEEDED( hr ) )
{
hr = cpVoice->SetOutput( cpStream, FALSE);
}
if( SUCCEEDED( hr ) )
{
// Logging info
hr = GetWStrFromRes( IDS_STRING13, szwDebug );
}
// Logging info
CHECKHRGOTOId( hr, tpr, IDS_STRING12 );
/******* Valid Cases *******/
//
// Test #1 - Normal usage
//
GetWStrFromRes( IDS_STRING10, szwSpeakStr );
hr = cpVoice->Speak( szwSpeakStr, SPF_DEFAULT, &ulStreamNum );
CHECKHRId( hr, tpr, IDS_STRING13 );
//
// Test #2 - Speak empty string
//
hr = cpVoice->Speak( L"", NULL, 0 );
CHECKHRId( hr, tpr, IDS_STRING13 );
//
// Test #3 - Speak a really long string
//
GetWStrFromRes( IDS_STRING11, szwSpeakStr );
hr = cpVoice->Speak( szwSpeakStr, NULL, 0 );
CHECKHRId( hr, tpr, IDS_STRING13 );
//
// Test #5 - Speak asyncronously
//
GetWStrFromRes( IDS_STRING10, szwSpeakStr );
hr = cpVoice->Speak( szwSpeakStr, SPF_ASYNC, &ulStreamNum );
CHECKHRId( hr, tpr, IDS_STRING13 );
hr = cpVoice->WaitUntilDone( TTS_WAITTIME );
if (!bCalledByMulti )
{
CHECKASSERTGOTOIdEx( (hr == S_OK), tpr, IDS_STRING61, " in Test #5");
}
else
{
CHECKHRIdEx( hr, tpr, IDS_STRING61, " in Test #5");
}
//
// Test #6 - Purge before speaking
//
hr = cpVoice->Speak( szwSpeakStr, SPF_ASYNC, 0 );
CHECKHRIdEx( hr, tpr, IDS_STRING13, " in Test #6, SPF_ASYNC");
hr = cpVoice->Speak( szwSpeakStr, SPF_PURGEBEFORESPEAK, 0 );
CHECKHRIdEx( hr, tpr, IDS_STRING13, " in Test #6, SPF_PURGEBEFORESPEAK");
//
// Test #7 - Speak the xml tags
//
GetWStrFromRes( IDS_STRING8, szwSpeakStr );
hr = cpVoice->Speak( szwSpeakStr, SPF_IS_XML, 0 );
CHECKHRId( hr, tpr, IDS_STRING13 );
//
// Test #9 - Speak punctuation
//
GetWStrFromRes( IDS_STRING8, szwSpeakStr );
hr = cpVoice->Speak( szwSpeakStr, SPF_NLP_SPEAK_PUNC, 0 );
CHECKHRId( hr, tpr, IDS_STRING13 );
//
// Test#10 - Speak some non-ASCII text
//
hr = cpVoice->Speak( szwNonAscii, SPF_DEFAULT, NULL );
CHECKHRId( hr, tpr, IDS_STRING13 );
EXIT:
return tpr;
}
/*****************************************************************************/
TESTPROCAPI t_ISpTTSEngine_Skip(UINT uMsg, TPPARAM tpParam, LPFUNCTION_TABLE_ENTRY lpFTE)
{
// This test tests the ISpTTSEngine::Skip through the ISpVoice::Skip method.
// 0 ulNumItems -> Start at the beginning of current sentence
// 1 ulNumItems -> Start at the next sentence
// -1 ulNumItems -> Start at the previous sentence
// Skip type: sentence
// Message check
if (uMsg != TPM_EXECUTE)
{
return TPR_NOT_HANDLED;
}
HRESULT hr = S_OK;
int tpr = TPR_PASS;
CComPtr<ISpVoice> cpLocalVoice;
// Create the SAPI voice
DOCHECKHRGOTO (hr = cpLocalVoice.CoCreateInstance( CLSID_SpVoice ););
tpr = t_ISpTTSEngine_Skip_Test(uMsg, tpParam, lpFTE, cpLocalVoice, false);
EXIT:
return tpr;
}
/*****************************************************************************/
TESTPROCAPI t_ISpTTSEngine_Skip_Test(UINT uMsg,
TPPARAM tpParam,
LPFUNCTION_TABLE_ENTRY lpFTE,
ISpVoice *cpVoice,
bool bCalledByMulti)
{
//this method is called by t_ISpTTSEngine_Skip() and Multiple Instance test.
//For Multiple Instance test, we do not check audio output.
// Message check
if (uMsg != TPM_EXECUTE)
{
return TPR_NOT_HANDLED;
}
HRESULT hr = S_OK;
int tpr = TPR_PASS;
CComPtr<ISpStream> cpStream;
STATSTG Stat;
ULONG sample1 = 0, sample2 = 0, ulNoSkipSample = 0;
ULONG NumSkipped = 0;
const char * TEST_TOPIC = "";
WCHAR szwSpeakStr[MAX_PATH]=L"";
//select output format
CSpStreamFormat InFmt(SPSF_22kHz16BitMono, &hr);
CHECKHRGOTOId( hr, tpr, IDS_STRING84);
//get the speak string
DOCHECKHRGOTO (hr = GetWStrFromRes( IDS_STRING63, szwSpeakStr ););
//======================================================================
TEST_TOPIC = "Test #1 - Skip forward";
//======================================================================
g_pKato->Comment(5, "Skip forward test - Thread Id: %x", GetCurrentThreadId());
// Create a stream
hr = SPCreateStreamOnHGlobal( NULL, true, InFmt.FormatId(), InFmt.WaveFormatExPtr(), &cpStream );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING81, TEST_TOPIC);
// Set the output to the stream
hr = cpVoice->SetOutput( cpStream, TRUE);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING60, TEST_TOPIC);
//initialization
sample1 = 0, sample2 = 0, ulNoSkipSample = 0;
hr = cpVoice->Speak( szwSpeakStr, SPF_ASYNC |SPF_IS_XML, NULL );
CHECKHRGOTOId( hr, tpr, IDS_STRING13);
//skip 7 sentences
hr = cpVoice->Skip( L"SENTENCE", 7, NULL);
CHECKHRId( hr, tpr, IDS_STRING59);
hr = cpVoice->WaitUntilDone(TTS_WAITTIME);
if (!bCalledByMulti )
{
CHECKASSERTGOTOIdEx( (hr == S_OK), tpr, IDS_STRING61, TEST_TOPIC);
}
else
{
CHECKHRIdEx( hr, tpr, IDS_STRING61, TEST_TOPIC);
}
if (!bCalledByMulti )
{
hr = cpStream->Stat( &Stat, STATFLAG_NONAME );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING90, TEST_TOPIC);
sample1 = (ULONG)Stat.cbSize.QuadPart / sizeof(WCHAR);
//Speak
hr = t_SpeakTwoStreams(cpVoice, szwSpeakStr, szwSpeakStr, sample2, sample2);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING88, TEST_TOPIC );
//save the sample for later comparision
ulNoSkipSample = sample2;
//The test will abort if the outputs = 0
CHECKASSERTGOTOIdEx( ( sample2 > 0 ), tpr, IDS_STRING59, TEST_TOPIC );
CHECKASSERTGOTOIdEx( ( sample1 > 0 ), tpr, IDS_STRING59, TEST_TOPIC );
//compare the output streams. The output stream without Skip should be much
//longer than one with Skip ( 7 )
CHECKASSERTIdEx( ( ulNoSkipSample > sample1), tpr, IDS_STRING59, TEST_TOPIC );
}
cpStream.Release();
//======================================================================
TEST_TOPIC = "Test #2 - Skip backward";
//======================================================================
g_pKato->Comment(5, "Skip backward test - Thread Id: %x", GetCurrentThreadId());
//initialization
sample1 = 0, sample2 = 0;
// Create stream
hr = SPCreateStreamOnHGlobal( NULL, true, InFmt.FormatId(), InFmt.WaveFormatExPtr(), &cpStream );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING81, TEST_TOPIC);
// Set the output format
hr = cpVoice->SetOutput( cpStream, TRUE);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING60, TEST_TOPIC);
DOCHECKHRGOTO (hr = cpVoice->SetNotifyWin32Event(););
//set interest events
DOCHECKHRGOTO (hr = cpVoice->SetInterest(SPFEI(SPEI_TTS_BOOKMARK), 0););
hr = cpVoice->Speak( szwSpeakStr, SPF_ASYNC |SPF_IS_XML , NULL );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING13, TEST_TOPIC);
//for multithreaded case, the event may not come
hr = cpVoice->WaitForNotifyEvent(TTS_WAITTIME);
if (bCalledByMulti )
{
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING62, TEST_TOPIC);
}
else
{
CHECKASSERTGOTOIdEx( (hr == S_OK), tpr, IDS_STRING62, TEST_TOPIC);
}
//skip backward 7 sentences
hr = cpVoice->Skip( L"SENTENCE", -7, &NumSkipped);
CHECKHRIdEx( hr, tpr, IDS_STRING59, TEST_TOPIC);
hr = cpVoice->WaitUntilDone(TTS_WAITTIME);
if (!bCalledByMulti )
{
CHECKASSERTGOTOIdEx( (hr == S_OK), tpr, IDS_STRING61, TEST_TOPIC);
}
else
{
CHECKHRIdEx( hr, tpr, IDS_STRING61, TEST_TOPIC);
}
if (!bCalledByMulti )
{
hr = cpStream->Stat( &Stat, STATFLAG_NONAME );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING90, TEST_TOPIC);
sample1 = (ULONG)Stat.cbSize.QuadPart / sizeof(WCHAR);
CHECKASSERTIdEx((sample1 != 0), tpr, IDS_STRING59, TEST_TOPIC );
//The test will abort if the outputs = 0
CHECKASSERTGOTOIdEx( ( sample1 > 0 ), tpr, IDS_STRING59, TEST_TOPIC );
//compare the output streams. The output stream without Skip should be much
//short than one with Skip ( -7 )
CHECKASSERTIdEx( ( ulNoSkipSample < sample1), tpr, IDS_STRING59, TEST_TOPIC );
}
cpStream.Release();
//======================================================================
TEST_TOPIC = "Test #3 - Skip 0";
//======================================================================
g_pKato->Comment(5, "Skip 0 test - Thread Id: %x", GetCurrentThreadId());
//initialization
sample1 = 0, sample2 = 0;
//clean up the event queue
while(S_OK == cpVoice->WaitForNotifyEvent(0));
// Create stream
hr = SPCreateStreamOnHGlobal( NULL, true, InFmt.FormatId(), InFmt.WaveFormatExPtr(), &cpStream );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING81, TEST_TOPIC);
// Set the output format
hr = cpVoice->SetOutput( cpStream, TRUE);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING60, TEST_TOPIC);
hr = cpVoice->Speak( szwSpeakStr, SPF_ASYNC |SPF_IS_XML , NULL );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING13, TEST_TOPIC);
//for multithreaded case, the event may not come
hr = cpVoice->WaitForNotifyEvent(TTS_WAITTIME);
if (bCalledByMulti )
{
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING62, TEST_TOPIC);
}
else
{
CHECKASSERTGOTOIdEx( (hr == S_OK), tpr, IDS_STRING62, TEST_TOPIC);
}
//skip 0 sentence
hr = cpVoice->Skip( L"SENTENCE", 0, &NumSkipped);
CHECKHRIdEx( hr, tpr, IDS_STRING59, TEST_TOPIC);
hr = cpVoice->WaitUntilDone(TTS_WAITTIME);
if (!bCalledByMulti )
{
CHECKASSERTGOTOIdEx( (hr == S_OK), tpr, IDS_STRING61, TEST_TOPIC);
}
else
{
CHECKHRIdEx( hr, tpr, IDS_STRING61, TEST_TOPIC);
}
if (!bCalledByMulti )
{
hr = cpStream->Stat( &Stat, STATFLAG_NONAME );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING90, TEST_TOPIC);
sample2 = (ULONG)Stat.cbSize.QuadPart / sizeof(WCHAR);
//The test will abort if the outputs = 0
CHECKASSERTIdEx( (sample2 >= ulNoSkipSample ), tpr, IDS_STRING59, TEST_TOPIC );
}
EXIT:
return tpr;
}
/*****************************************************************************/
TESTPROCAPI t_ISpTTSEngine_GetOutputFormat(UINT uMsg, TPPARAM tpParam, LPFUNCTION_TABLE_ENTRY lpFTE)
{
// This test tests the ISpTTSEngine::GetOutputFormat method.
// GetOutputFormat() is tested directly and also via SAPI
// Message check
if (uMsg != TPM_EXECUTE)
{
return TPR_NOT_HANDLED;
}
HRESULT hr = S_OK;
int tpr = TPR_PASS;
CComPtr<ISpVoice> cpLocalVoice;
// Create the SAPI voice
DOCHECKHRGOTO (hr = cpLocalVoice.CoCreateInstance( CLSID_SpVoice ););
tpr = t_ISpTTSEngine_GetOutputFormat_Test(uMsg, tpParam, lpFTE, cpLocalVoice, false);
EXIT:
return tpr;
}
/*****************************************************************************/
TESTPROCAPI t_ISpTTSEngine_GetOutputFormat_Test(UINT uMsg,
TPPARAM tpParam,
LPFUNCTION_TABLE_ENTRY lpFTE,
ISpVoice *cpVoice,
bool bCalledByMulti)
{
// Message check
if (uMsg != TPM_EXECUTE)
{
return TPR_NOT_HANDLED;
}
HRESULT hr = S_OK;
int tpr = TPR_PASS;
WCHAR szwSpeakStr[MAX_PATH]=L"";
CSpStreamFormat OutputFmt;
CSpStreamFormat InputFmt;
WAVEFORMATEX Fmtex;
const char * TEST_TOPIC = "";
CComPtr<ISpStream> cpStream;
//Initialize the waveformat structure, this user's format is supported by SAPI5
Fmtex.wFormatTag = WAVE_FORMAT_PCM;
Fmtex.nSamplesPerSec = 2000; // arbitrary number
Fmtex.wBitsPerSample = 8;
Fmtex.nChannels = 1;
Fmtex.nBlockAlign = 1;
Fmtex.nAvgBytesPerSec = 2000; // arbitrary number
Fmtex.cbSize = 0;
CComPtr<ISpObjectToken> cpVoiceToken;
CComPtr<ISpTTSEngine> cpTTSEngine;
DOCHECKHRGOTO(hr=SpGetDefaultTokenFromCategoryId( SPCAT_VOICES, &cpVoiceToken ););
DOCHECKHRGOTO(hr = SpCreateObjectFromToken( cpVoiceToken, &cpTTSEngine ););
DOCHECKHRGOTO (hr = InputFmt.AssignFormat(SPSF_22kHz16BitMono););
//======================================================================
TEST_TOPIC = "Test #1 - Pass in NULL";
//======================================================================
hr = cpTTSEngine->GetOutputFormat(
NULL,
NULL,
&OutputFmt.m_guidFormatId,
&OutputFmt.m_pCoMemWaveFormatEx );
CHECKHRIdEx( hr, tpr, IDS_STRING14, TEST_TOPIC );
//======================================================================
TEST_TOPIC = "Test #2 - Text format";
//======================================================================
hr = cpTTSEngine->GetOutputFormat(
&SPDFID_Text,
NULL,
&OutputFmt.m_guidFormatId,
&OutputFmt.m_pCoMemWaveFormatEx );
CHECKHRIdEx( hr, tpr, IDS_STRING14, TEST_TOPIC );
//======================================================================
TEST_TOPIC = "Test #3 - wave format";
//======================================================================
hr = cpTTSEngine->GetOutputFormat(
&SPDFID_WaveFormatEx,
&Fmtex,
&OutputFmt.m_guidFormatId,
&OutputFmt.m_pCoMemWaveFormatEx );
CHECKHRIdEx( hr, tpr, IDS_STRING14, TEST_TOPIC );
//======================================================================
TEST_TOPIC = "Test #4 - Normal usage";
//======================================================================
hr = cpTTSEngine->GetOutputFormat( &InputFmt.m_guidFormatId,
InputFmt.m_pCoMemWaveFormatEx ,
&OutputFmt.m_guidFormatId,
&OutputFmt.m_pCoMemWaveFormatEx );
CHECKHRIdEx( hr, tpr, IDS_STRING14, TEST_TOPIC );
//======================================================================
TEST_TOPIC = "Test #5 - test GetOutputFormat through SetOutPut";
//======================================================================
hr = cpVoice->SetOutput( NULL, TRUE);
CHECKHRIdEx( hr, tpr, IDS_STRING60, TEST_TOPIC );
//======================================================================
TEST_TOPIC = "Test #6 - test GetOutputFormat through Speak";
//======================================================================
GetWStrFromRes( IDS_STRING65, szwSpeakStr );
hr = cpVoice->Speak( szwSpeakStr, 0, 0 );
CHECKHRIdEx( hr, tpr, IDS_STRING13, TEST_TOPIC );
//======================================================================
TEST_TOPIC = "Test #7 - test GetOutputFormat with user's format";
//======================================================================
hr = SPCreateStreamOnHGlobal( NULL, true, SPDFID_WaveFormatEx, &Fmtex, &cpStream );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING81, TEST_TOPIC);
// Set the output to cpStream
hr = cpVoice->SetOutput( cpStream, TRUE);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING60, TEST_TOPIC);
//Speak calls GetOutputFormat() and passs in the above defined junk wave format
//as the first two paramters
hr = cpVoice->Speak( szwSpeakStr, 0, 0 );
CHECKHRIdEx( hr, tpr, IDS_STRING13, TEST_TOPIC);
EXIT:
return tpr;
}
/*****************************************************************************/
TESTPROCAPI t_ISpTTSEngine_SetRate(UINT uMsg, TPPARAM tpParam, LPFUNCTION_TABLE_ENTRY lpFTE)
{
// This test tests the ISpTTSEngine::SetRate method through the ISpVoice::SetRate method.
// It does simple, normal usage tests.
// Message check
if (uMsg != TPM_EXECUTE)
{
return TPR_NOT_HANDLED;
}
HRESULT hr = S_OK;
int tpr = TPR_PASS;
CComPtr<ISpVoice> cpLocalVoice;
// Create the SAPI voice
DOCHECKHRGOTO (hr = cpLocalVoice.CoCreateInstance( CLSID_SpVoice ););
tpr = t_ISpTTSEngine_SetRate_Test(uMsg, tpParam, lpFTE, cpLocalVoice, false);
EXIT:
return tpr;
}
/*****************************************************************************/
TESTPROCAPI t_ISpTTSEngine_SetRate_Test(UINT uMsg,
TPPARAM tpParam,
LPFUNCTION_TABLE_ENTRY lpFTE,
ISpVoice *cpVoice,
bool bCalledByMulti)
{
// Message check
if (uMsg != TPM_EXECUTE)
{
return TPR_NOT_HANDLED;
}
HRESULT hr = S_OK;
int tpr = TPR_PASS;
WCHAR szwDebug[MAX_PATH]=L"";
WCHAR szwSpeakStr[MAX_PATH]=L"";
ULONG cSamples1=0, cSamples2=0, ulHightRateSample=0;
// Logging info and abort the test if fails here
CHECKHRGOTOId( hr, tpr, IDS_STRING12 );
//get the debug string
DOCHECKHRGOTO (hr = GetWStrFromRes( IDS_STRING16, szwDebug ););
//get the speak string
DOCHECKHRGOTO (hr = GetWStrFromRes( IDS_STRING10, szwSpeakStr ););
//
// Test #1 - Set a rate to 5
//
cSamples1 = 0, cSamples2 = 0;
hr = cpVoice->SetRate( 5 );
CHECKHRId( hr, tpr, IDS_STRING16 );
//Speak
hr = t_SpeakTwoStreams(cpVoice, szwSpeakStr, szwSpeakStr, cSamples1, cSamples2);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING88, "SetRate to 5");
//save the output for later comparision
ulHightRateSample = cSamples1;
//
// Test #2 - SetRate to -5
//
cSamples1 = 0, cSamples2 = 0;
hr = cpVoice->SetRate( -5 );
CHECKHRId( hr, tpr, IDS_STRING16 );
//Speak
hr = t_SpeakTwoStreams(cpVoice, szwSpeakStr, szwSpeakStr, cSamples1, cSamples2);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING88, "SetRate to -5" );
//In multithreaded case, we do not check audio output
if (!bCalledByMulti )
{
//The test will abort if the outputs = 0
CHECKASSERTGOTOId( ( ulHightRateSample > 0 ), tpr, IDS_STRING16);
CHECKASSERTGOTOId( ( cSamples1 > 0 ), tpr, IDS_STRING16);
//compare the output streams. The output stream when the rate = -5 should be much
//longer than one when the rate = 5.
CHECKASSERTId( ( ulHightRateSample < cSamples1), tpr, IDS_STRING16);
}
//
// Test #3 - SetRate to 0
//
//set the rate back to the default
hr = cpVoice->SetRate( 0 );
CHECKHRId( hr, tpr, IDS_STRING16 );
EXIT:
return tpr;
}
/*****************************************************************************/
TESTPROCAPI t_ISpTTSEngine_SetVolume(UINT uMsg, TPPARAM tpParam, LPFUNCTION_TABLE_ENTRY lpFTE)
{
// This test tests the ISpTTSEngine::SetVolume method through the ISpVoice::SetVolume method.
// It does simple, normal usage tests.
// Message check
if (uMsg != TPM_EXECUTE)
{
return TPR_NOT_HANDLED;
}
HRESULT hr = S_OK;
int tpr = TPR_PASS;
CComPtr<ISpVoice> cpLocalVoice;
// Create the SAPI voice
DOCHECKHRGOTO (hr = cpLocalVoice.CoCreateInstance( CLSID_SpVoice ););
tpr = t_ISpTTSEngine_SetVolume_Test(uMsg, tpParam, lpFTE, cpLocalVoice, false);
EXIT:
return tpr;
}
/*****************************************************************************/
TESTPROCAPI t_ISpTTSEngine_SetVolume_Test(UINT uMsg,
TPPARAM tpParam,
LPFUNCTION_TABLE_ENTRY lpFTE,
ISpVoice *cpVoice,
bool bCalledByMulti)
{
// Message check
if (uMsg != TPM_EXECUTE)
{
return TPR_NOT_HANDLED;
}
HRESULT hr = S_OK;
int tpr = TPR_PASS;
WCHAR szwSpeakStr[MAX_PATH]=L"";
CComPtr<ISpStream> cpStream1;
CComPtr<ISpStream> cpStream2;
CSpStreamFormat NewFmt;
ULONG totalAmp1 = 0, totalAmp2 = 0;
const char * TEST_TOPIC = "";
if( SUCCEEDED( hr ) )
{
hr = NewFmt.AssignFormat(SPSF_22kHz16BitMono);
}
// Logging info
CHECKHRGOTOId( hr, tpr, IDS_STRING12 );
//get the speak string
DOCHECKHRGOTO (hr = GetWStrFromRes( IDS_STRING10, szwSpeakStr ););
//======================================================================
TEST_TOPIC = "Test #1: SetVolume to 50";
//======================================================================
//
// Test #1 - SetVolume to 50
//
//set volume to 50
hr = cpVoice->SetVolume( 50 );
CHECKHRIdEx( hr, tpr, IDS_STRING18, TEST_TOPIC);
// Create stream #1
hr = SPCreateStreamOnHGlobal( NULL, true, NewFmt.FormatId(), NewFmt.WaveFormatExPtr(), &cpStream1 );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING81, TEST_TOPIC);
// Set the default output format
hr = cpVoice->SetOutput( cpStream1, TRUE);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING60, TEST_TOPIC);
hr = cpVoice->Speak( szwSpeakStr, 0, 0 );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING13, TEST_TOPIC);
LARGE_INTEGER l;
l.QuadPart = 0;
// Reset stream to beginning
hr = cpStream1->Seek( l, SEEK_SET, NULL );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING79, TEST_TOPIC);
// get the sum of the amplitude from the stream 1
hr = GetAmpFromSamples (cpStream1, &totalAmp1 );
CHECKHRGOTOIdEx(hr, tpr, IDS_STRING82, TEST_TOPIC );
//======================================================================
TEST_TOPIC = "Test #2: SetVolume to 0";
//======================================================================
//
// Test #2 - SetVolume to 0
//
hr = cpVoice->SetVolume( 0 );
CHECKHRIdEx( hr, tpr, IDS_STRING18, TEST_TOPIC);
//======================================================================
TEST_TOPIC = "Test #3: SetVolume to 100";
//======================================================================
//
// Test #3 - SetVolume to 100
//
hr = cpVoice->SetVolume( 100 );
CHECKHRIdEx( hr, tpr, IDS_STRING18, TEST_TOPIC);
// Create stream #2
hr = SPCreateStreamOnHGlobal( NULL, true, NewFmt.FormatId(), NewFmt.WaveFormatExPtr(), &cpStream2 );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING81, TEST_TOPIC);
// Set the default output format
hr = cpVoice->SetOutput( cpStream2, TRUE);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING60, TEST_TOPIC);
hr = cpVoice->Speak( szwSpeakStr, 0, 0 );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING13, TEST_TOPIC);
//In multithreaded case, we do not check audio output
if (!bCalledByMulti )
{
// Reset stream to beginning
hr = cpStream2->Seek( l, SEEK_SET, NULL );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING79, TEST_TOPIC);
// get the sum of the amplitude from the stream 1
hr = GetAmpFromSamples (cpStream2, &totalAmp2 );
CHECKHRGOTOIdEx(hr, tpr, IDS_STRING82, TEST_TOPIC );
//Make sure the amplitudes of stream1 and stream2 are greater than 0
CHECKASSERTGOTOId( (totalAmp1 > 0), tpr, IDS_STRING35 );
CHECKASSERTGOTOId( (totalAmp2 > 0), tpr, IDS_STRING35 );
//compare the output streams. The amplitude of output stream when the volume = 100
//should be higher than one when the volume = 50
CHECKASSERTId( ( totalAmp1 < totalAmp2), tpr, IDS_STRING18);
}
EXIT:
return tpr;
}
// Release global objects
void CleanupVoiceAndEngine()
{
}

View File

@@ -0,0 +1,495 @@
//******************************************************************************
// Copyright (c) Microsoft Corporation. All rights reserved.
// lexicon.cpp
//
//******************************************************************************
#include "TTSComp.h"
//******************************************************************************
//***** Internal Functions
//******************************************************************************
//******************************************************************************
//***** TestProc()'s
//******************************************************************************
//******************************************************************************
TESTPROCAPI t_UserLexiconTest(UINT uMsg, TPPARAM tpParam, LPFUNCTION_TABLE_ENTRY lpFTE)
{
//this procedure tests the user lexicon by
// . Add a new word pron
// . Remove the word pron
// Message check
if (uMsg != TPM_EXECUTE)
{
return TPR_NOT_HANDLED;
}
HRESULT hr = S_OK;
int tpr = TPR_PASS;
CComPtr<ISpStream> cpStream1;
CComPtr<ISpStream> cpStream2;
CComPtr<ISpVoice> cpVoice;
CComPtr<ISpContainerLexicon> cpConlexicon;
LANGID LangID;
ULONG cSamples1=0, cSamples2=0;
ULONG cDiff=0;
WCHAR szwNewWord[MAX_PATH]=L"";
WCHAR szwPronStr[MAX_PATH]=L"";
WCHAR szPronunciation[MAX_PATH]=L"";
STATSTG Stat;
const char * TEST_TOPIC = "";
//======================================================================
TEST_TOPIC = "User lexicon test: Initialization";
//======================================================================
CSpStreamFormat InFormat(SPSF_22kHz16BitMono, &hr);
CHECKHRGOTOIdEx(hr, tpr, IDS_STRING84, TEST_TOPIC);
DOCHECKHRGOTO( hr = SpGetLanguageIdFromDefaultVoice(&LangID); );
//get new word and its pronounciation
DOCHECKHRGOTO( hr = GetWStrFromRes( IDS_STRING76, szwNewWord ););
DOCHECKHRGOTO( hr = GetWStrFromRes( IDS_STRING94, szwPronStr ););
// Create the SAPI voice
DOCHECKHRGOTO(hr = cpVoice.CoCreateInstance( CLSID_SpVoice ); );
DOCHECKHRGOTO (hr = cpConlexicon.CoCreateInstance(CLSID_SpLexicon););
// Create stream #1
hr = SPCreateStreamOnHGlobal( NULL, true, InFormat.FormatId(), InFormat.WaveFormatExPtr(), &cpStream1 );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING81, TEST_TOPIC);
// Set the output format
hr = cpVoice->SetOutput( cpStream1, TRUE);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING60, TEST_TOPIC);
//remove its pron if it exists already in the User lexicon
hr = cpConlexicon->RemovePronunciation(szwNewWord, LangID, SPPS_Unknown, NULL);
CHECKHRALTIdEx( hr, SPERR_NOT_IN_LEX, tpr, IDS_STRING89, TEST_TOPIC);
//Speak the new word
hr = cpVoice->Speak(szwNewWord, 0, 0);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING13, TEST_TOPIC);
hr = cpStream1->Stat( &Stat, STATFLAG_NONAME );
CHECKHRGOTOIdEx(hr, tpr, IDS_STRING90, TEST_TOPIC );
//save to cSamples1 for later comparation
cSamples1 = (ULONG)Stat.cbSize.QuadPart / sizeof(SHORT);
CHECKASSERTGOTOIdEx((cSamples1 > 0 ), tpr, IDS_STRING75, TEST_TOPIC);
//======================================================================
TEST_TOPIC = "User lexicon test: Test #1";
//======================================================================
//
//test #1 - Add a word pron
//
cpStream2.Release();
cSamples2 = 0;
//create stream #2
hr = SPCreateStreamOnHGlobal( NULL, true, InFormat.FormatId(), InFormat.WaveFormatExPtr(), &cpStream2 );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING81, TEST_TOPIC);
// Set the output format
hr = cpVoice->SetOutput( cpStream2, TRUE);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING60, TEST_TOPIC);
//get phoneid
hr = TTSSymToPhoneId ( LangID, szwPronStr, szPronunciation);
CHECKHRGOTOIdEx(hr, tpr, IDS_STRING77, TEST_TOPIC );
//remove its pron if it exists already in the User lexicon
hr = cpConlexicon->RemovePronunciation(szwNewWord, LangID, SPPS_Unknown, NULL);
CHECKHRALTIdEx( hr, SPERR_NOT_IN_LEX, tpr, IDS_STRING89, TEST_TOPIC);
//add the pronounciation of the new word to User's lexicon as verb and noun
hr = cpConlexicon->AddPronunciation(szwNewWord, LangID, SPPS_Noun, szPronunciation);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING87, TEST_TOPIC);
hr = cpConlexicon->AddPronunciation(szwNewWord, LangID, SPPS_Verb, szPronunciation);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING87, TEST_TOPIC);
hr = cpVoice->Speak(szwNewWord, 0, 0);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING13, TEST_TOPIC);
hr = cpStream2->Stat( &Stat, STATFLAG_NONAME );
CHECKHRGOTOIdEx(hr, tpr, IDS_STRING90, TEST_TOPIC );
cSamples2 = (ULONG)Stat.cbSize.QuadPart / sizeof(SHORT);
CHECKASSERTGOTOId((cSamples2 > 0 ), tpr, IDS_STRING75);
//The test assume that cSamples2 should be twice greater than cSamples1
CHECKASSERTIdEx(( cSamples2 > 2 * cSamples1), tpr, IDS_STRING75, TEST_TOPIC);
//======================================================================
TEST_TOPIC = "User lexicon test: Test #2";
//======================================================================
//
//Test #2 - Remove the word pron
//
cpStream2.Release();
cSamples2 = 0;
//remove all pronounciation of the word
hr = cpConlexicon->RemovePronunciation(szwNewWord, LangID, SPPS_Unknown, NULL);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING89, TEST_TOPIC);
hr = SPCreateStreamOnHGlobal( NULL, true, InFormat.FormatId(), InFormat.WaveFormatExPtr(), &cpStream2 );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING81, TEST_TOPIC);
// Set the output format
hr = cpVoice->SetOutput( cpStream2, TRUE);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING60, TEST_TOPIC);
hr = cpVoice->Speak(szwNewWord, 0, 0);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING13, TEST_TOPIC);
hr = cpStream2->Stat( &Stat, STATFLAG_NONAME );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING90, TEST_TOPIC);
cSamples2 = (ULONG)Stat.cbSize.QuadPart / sizeof(SHORT);
CHECKASSERTGOTOId((cSamples2 > 0 ), tpr, IDS_STRING75);
//cSamples1 and cSamples2 should be very close
cDiff = abs(cSamples2 - cSamples1);
CHECKASSERTIdEx(( 5 * cDiff < cSamples2), tpr, IDS_STRING75, TEST_TOPIC);
//======================================================================
TEST_TOPIC = "User lexicon test: Test #3";
//======================================================================
//Choose a common word, "Computer", which IS a noun, and it may exist
//in app or vendor lexicion. Now we add its pron to the user lexicon
//as Noun word. Engine should use the pron in the user lexicon.
cSamples1=0, cSamples2=0;
//get new word and its pronounciation
DOCHECKHRGOTO( hr = GetWStrFromRes( IDS_STRING64, szwNewWord ););
DOCHECKHRGOTO( hr = GetWStrFromRes( IDS_STRING71, szwPronStr ););
//this Speak uses the default pronunciation
hr = t_SpeakTwoStreams(cpVoice, szwNewWord, szwNewWord, cSamples1, cSamples1);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING88, TEST_TOPIC );
//get phoneid
hr = TTSSymToPhoneId ( LangID, szwPronStr, szPronunciation);
CHECKHRGOTOIdEx(hr, tpr, IDS_STRING77, TEST_TOPIC );
//remove its pronounciation if it exists already in the user lexicon
hr = cpConlexicon->RemovePronunciation(szwNewWord, LangID, SPPS_Unknown, NULL);
CHECKHRALTIdEx( hr, SPERR_NOT_IN_LEX, tpr, IDS_STRING89, TEST_TOPIC);
//add the pronounciation of the new word to User's lexicon
hr = cpConlexicon->AddPronunciation(szwNewWord, LangID, SPPS_Noun, szPronunciation);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING87, TEST_TOPIC);
//This Speak should pick up the new pronounciation in the user lexicon
hr = t_SpeakTwoStreams(cpVoice, szwNewWord, szwNewWord, cSamples2, cSamples2);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING88, TEST_TOPIC );
//remove it if it exists already
hr = cpConlexicon->RemovePronunciation(szwNewWord, LangID, SPPS_Noun, szPronunciation);
CHECKHRALTIdEx( hr, SPERR_NOT_IN_LEX, tpr, IDS_STRING89, TEST_TOPIC);
//The test assume that cSamples2 should be twice greater than cSamples1
CHECKASSERTIdEx(( 2 * cSamples1 <cSamples2), tpr, IDS_STRING75, TEST_TOPIC);
//======================================================================
TEST_TOPIC = "User lexicon test: Test #4 Case Sensitivity";
//======================================================================
{
//Choose a common word, "Computer", and assign String121 as its pronunciation
//Change "Computer" to all low case, "computer" and assign a new pronounciation
//stored in String 122, Speak both and check the result.
WCHAR szwPronStrUpper[MAX_PATH]=L"";
WCHAR szwPronStrLower[MAX_PATH]=L"";
WCHAR szwNewWordLower[MAX_PATH]=L"";
WCHAR szPronunciationLower[MAX_PATH]=L"";
cSamples1=0, cSamples2=0;
//get new word and its pronounciation
DOCHECKHRGOTO( hr = GetWStrFromRes( IDS_STRING64, szwNewWord ););
DOCHECKHRGOTO( hr = GetWStrFromRes( IDS_STRING64, szwNewWordLower ););
DOCHECKHRGOTO( hr = GetWStrFromRes( IDS_STRING121, szwPronStrUpper ););
DOCHECKHRGOTO( hr = GetWStrFromRes( IDS_STRING122, szwPronStrLower ););
//--- Convert the word to lower case
WCHAR* pLower = szwNewWordLower;
_wcslwr( pLower );
//get phoneid
hr = TTSSymToPhoneId ( LangID, szwPronStrUpper, szPronunciation);
CHECKHRGOTOIdEx(hr, tpr, IDS_STRING77, TEST_TOPIC );
//remove its pronounciation if it exists already in the user lexicon
hr = cpConlexicon->RemovePronunciation(szwNewWord, LangID, SPPS_Unknown, NULL);
CHECKHRALTIdEx( hr, SPERR_NOT_IN_LEX, tpr, IDS_STRING89, TEST_TOPIC);
//get phoneid
hr = TTSSymToPhoneId ( LangID, szwPronStrLower, szPronunciationLower);
CHECKHRGOTOIdEx(hr, tpr, IDS_STRING77, TEST_TOPIC );
//remove its pronounciation if it exists already in the user lexicon
hr = cpConlexicon->RemovePronunciation(szwNewWordLower, LangID, SPPS_Unknown, NULL);
CHECKHRALTIdEx( hr, SPERR_NOT_IN_LEX, tpr, IDS_STRING89, TEST_TOPIC);
//add the pronounciation of the new word to User's lexicon
hr = cpConlexicon->AddPronunciation(szwNewWord, LangID, SPPS_Noun, szPronunciation);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING87, TEST_TOPIC);
//add the pronounciation of the new word to User's lexicon
hr = cpConlexicon->AddPronunciation(szwNewWordLower, LangID, SPPS_Noun, szPronunciationLower);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING87, TEST_TOPIC);
//This Speak should pick up the new pronounciation in the user lexicon
hr = t_SpeakTwoStreams(cpVoice, szwNewWord, szwNewWordLower, cSamples1, cSamples2);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING88, TEST_TOPIC );
//remove it if it exists already
hr = cpConlexicon->RemovePronunciation(szwNewWord, LangID, SPPS_Noun, szPronunciation);
CHECKHRALTIdEx( hr, SPERR_NOT_IN_LEX, tpr, IDS_STRING89, TEST_TOPIC);
//remove it if it exists already
hr = cpConlexicon->RemovePronunciation(szwNewWordLower, LangID, SPPS_Noun, szPronunciationLower);
CHECKHRALTIdEx( hr, SPERR_NOT_IN_LEX, tpr, IDS_STRING89, TEST_TOPIC);
//For Chinese/Japanese TTS Engines, the test ignores result check since
//No case Sensitivity in Chinese language
if ( ( LangID != 2052 ) && ( LangID != 1041 ))
{
//The test assume that cSamples1(upper case) should be twice greater than cSamples2 (lower case)
CHECKASSERTIdEx(( 2 * cSamples2 <cSamples1), tpr, IDS_STRING75, TEST_TOPIC);
}
}
EXIT:
return tpr;
}
//******************************************************************************
TESTPROCAPI t_AppLexiconTest(UINT uMsg, TPPARAM tpParam, LPFUNCTION_TABLE_ENTRY lpFTE)
{
//this procedure tests the App lexicon.
// Message check
if (uMsg != TPM_EXECUTE)
{
return TPR_NOT_HANDLED;
}
HRESULT hr = S_OK;
int tpr = TPR_PASS;
CComPtr<ISpVoice> cpVoice;
CComPtr<ISpContainerLexicon> cpConlexicon;
CComPtr<ISpStream> cpStream;
LANGID LangID;
WCHAR szwNewWord[MAX_PATH]=L"";
WCHAR szwPronStr[MAX_PATH]=L"";
WCHAR szAppPronunciation[MAX_PATH]=L"";
ULONG sample1 = 0, sample2 = 0;
SPWORDPRONUNCIATIONLIST spPronList;
SPWORDPRONUNCIATION *psppron = NULL;
CComPtr<ISpLexicon> cpLexiconApp;
const char * TEST_TOPIC = "App lexicon test";
CSpStreamFormat InFormat(SPSF_22kHz16BitMono, &hr);
CHECKHRGOTOId(hr, tpr, IDS_STRING84);
DOCHECKHRGOTO( hr = SpGetLanguageIdFromDefaultVoice(&LangID); );
//get new word and its pronounciation
DOCHECKHRGOTO( hr = GetWStrFromRes( IDS_STRING76, szwNewWord ););
DOCHECKHRGOTO( hr = GetWStrFromRes( IDS_STRING94, szwPronStr ););
//remove the test app lexicon if it exists from the last test run
DOCHECKHRGOTO( hr = RemoveTestAppLexicon(););
//Make a backup of all existing App lexicons
hr = RegRecursiveCopyKey(
HKEY_LOCAL_MACHINE,
_T("SOFTWARE\\Microsoft\\Speech\\AppLexicons\\Tokens"),
HKEY_LOCAL_MACHINE,
_T("SOFTWARE\\Microsoft\\Speech\\AppLexicons\\TokensBackup"),
TRUE);
CHECKHRGOTOIdEx(hr, tpr, IDS_STRING96, TEST_TOPIC );
//Disenable/delete exsisting app lexicons
hr = RegRecursiveDeleteKey(
HKEY_LOCAL_MACHINE,
_T("SOFTWARE\\Microsoft\\Speech\\AppLexicons\\Tokens"),
TRUE);
CHECKHRGOTOIdEx(hr, tpr, IDS_STRING97, TEST_TOPIC );
// Create the SAPI voice
DOCHECKHRGOTO (hr = cpVoice.CoCreateInstance( CLSID_SpVoice ); );
// Create a lexicon
DOCHECKHRGOTO (hr = cpConlexicon.CoCreateInstance(CLSID_SpLexicon); );
//the following is to erase the pronunciations of the new word in User's lexicon
ZeroStruct ( spPronList );
//get the pronounciation of the new word from the User's lexicon
hr = cpConlexicon->GetPronunciations(szwNewWord, LangID, eLEXTYPE_USER, &spPronList);
CHECKHRALTIdEx( hr, SPERR_NOT_IN_LEX, tpr, IDS_STRING86, TEST_TOPIC);
//remove all the pronunciations of the new word in User lexicon
hr = cpConlexicon->RemovePronunciation(szwNewWord, LangID, SPPS_Unknown, NULL);
CHECKHRALTIdEx( hr, SPERR_NOT_IN_LEX, tpr, IDS_STRING89, TEST_TOPIC);
//Speak this word before testing app lexicon and save the result to sample1
hr = t_SpeakTwoStreams(cpVoice, szwNewWord, szwNewWord, sample1, sample1);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING88, TEST_TOPIC );
//get phoneid
hr = TTSSymToPhoneId ( LangID, szwPronStr, szAppPronunciation);
CHECKHRGOTOIdEx(hr, tpr, IDS_STRING77, TEST_TOPIC );
//Create a test app lexicon
hr = CreateAppLexicon(
L"App lex test",
LangID,
L"App Lex test",
L"TTSCompliance;AppLexTest",
&cpLexiconApp);
CHECKHRGOTOIdEx(hr, tpr, IDS_STRING98, TEST_TOPIC );
// add a new word pronunciation to the new created app lexicon
hr = cpLexiconApp->AddPronunciation(szwNewWord, LangID, SPPS_Noun, szAppPronunciation);
CHECKHRId( hr, tpr, IDS_STRING87);
hr = cpLexiconApp->AddPronunciation(szwNewWord, LangID, SPPS_Verb, szAppPronunciation);
CHECKHRId( hr, tpr, IDS_STRING87);
cpLexiconApp.Release();
//recreate a voice to make sure that the container lexicon notices the test app leixcon
cpVoice.Release();
DOCHECKHRGOTO (hr = cpVoice.CoCreateInstance( CLSID_SpVoice ); );
//The new pronunciation from the test app lexicon should be used here and
//its output will be saved to sample2
hr = t_SpeakTwoStreams(cpVoice, szwNewWord, szwNewWord, sample2, sample2);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING88, TEST_TOPIC );
//restore the pronounciation of the new word to User's lexicon
for(psppron = spPronList.pFirstWordPronunciation; psppron && SUCCEEDED(hr) && (hr != SP_ALREADY_IN_LEX); psppron = psppron->pNextWordPronunciation)
{
hr = cpConlexicon -> AddPronunciation(szwNewWord, psppron->LangID, psppron->ePartOfSpeech, psppron->szPronunciation );
}
::CoTaskMemFree(spPronList.pvBuffer);
CHECKHRALTIdEx( hr, SP_ALREADY_IN_LEX, tpr, IDS_STRING87, TEST_TOPIC);
cpConlexicon.Release();
cpVoice.Release();
//remove the test app lexicon if it exists from the last test run
DOCHECKHR( hr = RemoveTestAppLexicon(););
//Now, the test is done, so delete the test app lexicon
// and restore the previous app lexicons
hr = RegRecursiveCopyKey(
HKEY_LOCAL_MACHINE,
_T("SOFTWARE\\Microsoft\\Speech\\AppLexicons\\TokensBackup"),
HKEY_LOCAL_MACHINE,
_T("SOFTWARE\\Microsoft\\Speech\\AppLexicons\\Tokens"),
TRUE);
CHECKHRGOTOIdEx(hr, tpr, IDS_STRING96, TEST_TOPIC );
//delete the backups
hr = RegRecursiveDeleteKey(
HKEY_LOCAL_MACHINE,
_T("SOFTWARE\\Microsoft\\Speech\\AppLexicons\\TokensBackup"));
CHECKHRGOTOIdEx(hr, tpr, IDS_STRING97, TEST_TOPIC );
CHECKASSERTGOTOIdEx( ( sample1 > 0 ), tpr, IDS_STRING74, TEST_TOPIC );
CHECKASSERTGOTOIdEx( ( sample2 > 0 ), tpr, IDS_STRING74, TEST_TOPIC );
// Now compare the values from the 2 streams
// check to ensure the voice uses the new pronounciation in the test app lexicon
// which generates bigger samples than normal.
CHECKASSERTIdEx( (( 2 * sample2) > (3 * sample1)), tpr, IDS_STRING74, TEST_TOPIC );
EXIT:
return tpr;
}
/*****************************************************************************/
TESTPROCAPI t_LexiconMulti_Test(UINT uMsg,
TPPARAM tpParam,
LPFUNCTION_TABLE_ENTRY lpFTE,
ISpVoice *cpVoice,
bool bCalledByMulti)
{
// Message check
if (uMsg != TPM_EXECUTE)
{
return TPR_NOT_HANDLED;
}
HRESULT hr = S_OK;
int tpr = TPR_PASS;
CComPtr<ISpContainerLexicon> cpConlexicon;
CComPtr<ISpStream> cpStream;
LANGID LangID;
WCHAR szwNewWord[MAX_PATH]=L"";
WCHAR szwPronStr[MAX_PATH]=L"";
WCHAR szPronunciation[MAX_PATH]=L"";
CSpStreamFormat InFormat(SPSF_22kHz16BitMono, &hr);
CHECKHRGOTOId(hr, tpr, IDS_STRING84);
DOCHECKHRGOTO( hr = SpGetLanguageIdFromDefaultVoice(&LangID); );
//new word and its pronounciation
DOCHECKHRGOTO( hr = GetWStrFromRes( IDS_STRING76, szwNewWord ););
DOCHECKHRGOTO( hr = GetWStrFromRes( IDS_STRING94, szwPronStr ););
// Create a lexicon
DOCHECKHRGOTO (hr = cpConlexicon.CoCreateInstance(CLSID_SpLexicon); );
//create stream
hr = SPCreateStreamOnHGlobal( NULL, true, InFormat.FormatId(), InFormat.WaveFormatExPtr(), &cpStream );
CHECKHRGOTOId( hr, tpr, IDS_STRING81);
// Set the output format
hr = cpVoice->SetOutput( cpStream, TRUE);
CHECKHRGOTOId( hr, tpr, IDS_STRING60);
//The new word is stored in szwNewWord and its pronunciation is in szwPronStr.
//First get the pronounciation of the string stored in szwPronStr,
//and then assign the pronounciation to szwNewWord
//
//get phoneid
hr = TTSSymToPhoneId ( LangID, szwPronStr, szPronunciation);
CHECKHRGOTOId(hr, tpr, IDS_STRING77 );
//add the pronounciation of the new word to User's lexicon
hr = cpConlexicon->AddPronunciation(szwNewWord, LangID, SPPS_Noun, szPronunciation);
CHECKHRALTId( hr, SP_ALREADY_IN_LEX, tpr, IDS_STRING87);
hr = cpVoice->Speak(szwNewWord, 0, 0);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING13, " in t_LexiconMultiTest");
hr = cpConlexicon->RemovePronunciation(szwNewWord, LangID, SPPS_Noun, szPronunciation);
CHECKHRALTId(hr, SPERR_NOT_IN_LEX, tpr, IDS_STRING89);
EXIT:
return tpr;
}

View File

@@ -0,0 +1,623 @@
//******************************************************************************
// Copyright (c) Microsoft Corporation. All rights reserved.
// realtime.cpp
//
//******************************************************************************
#include "TTSComp.h"
//******************************************************************************
//***** Helper class to slow down writes to memory stream. It simply forwards all
//***** calls onto IStream. However these tests write output to memory which is
//***** too fast to get events. The write method here has a Sleep(100) statement
//***** in it to make it closer to real time.
//******************************************************************************
class CTestStream : public ISpStream
{
/*=== Methods =======*/
public:
/*--- Constructors/Destructors ---*/
CTestStream(CSpStreamFormat &Fmt, HRESULT * phr)
: m_ulRef(1)
{
*phr = SPCreateStreamOnHGlobal( NULL, true, Fmt.FormatId(), Fmt.WaveFormatExPtr(), &m_cpStream );
}
~CTestStream() { SPDBG_ASSERT(m_ulRef == 0); }
//--- IUnknown ----------------------------------------------
STDMETHODIMP QueryInterface(REFIID riid, void ** ppv)
{
if (riid == __uuidof(ISpStream) ||
riid == __uuidof(ISpStreamFormat) ||
riid == IID_ISequentialStream || // Note: __uuidof() wont work on Windows CE
riid == __uuidof(IUnknown))
{
*ppv = (ISpStream *)this;
m_ulRef++;
return S_OK;
}
*ppv = NULL;
return E_NOINTERFACE;
}
STDMETHODIMP_(ULONG) AddRef()
{
return ++m_ulRef;
}
STDMETHODIMP_(ULONG) Release()
{
if(--m_ulRef == 0)
{
delete this;
}
return m_ulRef;
}
//--- ISequentialStream -------------------------------------
STDMETHOD(Read)( void * pv, ULONG cb, ULONG * pcbRead )
{ return m_cpStream->Read(pv, cb, pcbRead); }
STDMETHOD(Write)( void const* pv, ULONG cb, ULONG * pcbWritten )
{
::Sleep( 2 );
return m_cpStream->Write(pv, cb, pcbWritten);
}
//--- ISpStream -------------------------------------
STDMETHOD (GetFormat)(GUID * pFmtId, WAVEFORMATEX ** ppCoMemWaveFormatEx)
{ return m_cpStream->GetFormat(pFmtId, ppCoMemWaveFormatEx);};
STDMETHOD (SetBaseStream)(IStream * pStream, REFGUID rguidFormat, const WAVEFORMATEX * pWaveFormatEx)
{ return m_cpStream->SetBaseStream(pStream, rguidFormat, pWaveFormatEx);};
STDMETHOD (GetBaseStream)(IStream ** ppStream)
{ return m_cpStream->GetBaseStream(ppStream);};
STDMETHOD (BindToFile)(const WCHAR * pszFileName, SPFILEMODE eMode,
const GUID * pguidFormatId, const WAVEFORMATEX * pWaveformatEx,
ULONGLONG ullEventInterest)
{ return m_cpStream->BindToFile(pszFileName, eMode, pguidFormatId, pWaveformatEx, ullEventInterest);};
STDMETHOD (Close)()
{ return m_cpStream->Close();};
//--- IStream --------------------------------------
STDMETHOD(Seek)( LARGE_INTEGER dlibMove, DWORD dwOrigin,
ULARGE_INTEGER * plibNewPosition )
{ return m_cpStream->Seek(dlibMove, dwOrigin, plibNewPosition); }
STDMETHOD(SetSize)( ULARGE_INTEGER libNewSize )
{ return m_cpStream->SetSize(libNewSize); }
STDMETHOD(CopyTo)( IStream * pstm, ULARGE_INTEGER cb, ULARGE_INTEGER * pcbRead,
ULARGE_INTEGER * pcbWritten )
{ return m_cpStream->CopyTo(pstm, cb, pcbRead, pcbWritten); }
STDMETHOD(Commit)( DWORD grfCommitFlags )
{ return m_cpStream->Commit(grfCommitFlags); }
STDMETHOD(Revert)( void )
{ return m_cpStream->Revert(); }
STDMETHOD(LockRegion)( ULARGE_INTEGER libOffset, ULARGE_INTEGER cb,
DWORD dwLockType )
{ return m_cpStream->LockRegion(libOffset, cb, dwLockType); }
STDMETHOD(UnlockRegion)( ULARGE_INTEGER libOffset, ULARGE_INTEGER cb,
DWORD dwLockType )
{ return m_cpStream->UnlockRegion( libOffset, cb, dwLockType); }
STDMETHOD(Stat)( STATSTG * pstatstg, DWORD grfStatFlag )
{ return m_cpStream->Stat(pstatstg, grfStatFlag); }
STDMETHOD(Clone)( IStream ** ppstm )
{ return m_cpStream->Clone(ppstm); }
/*=== Member Data ===*/
protected:
CComPtr<ISpStream> m_cpStream;
ULONG m_ulRef;
};
//******************************************************************************
//***** TestProc()'s
//******************************************************************************
/*****************************************************************************/
TESTPROCAPI t_RealTimeRateChange(UINT uMsg, TPPARAM tpParam, LPFUNCTION_TABLE_ENTRY lpFTE)
{
// This test changes the rate of a TTS driver on the fly and checks to see if
// it actually sped up.
// NOTE - this test uses the SAPI Event Model to get bookmark event and will fail
//if engines have not implemented bookmark event.
// Message check
if (uMsg != TPM_EXECUTE)
{
return TPR_NOT_HANDLED;
}
HRESULT hr = S_OK;
int tpr = TPR_PASS;
CComPtr<ISpVoice> cpLocalVoice;
// Create the SAPI voice
DOCHECKHRGOTO (hr = cpLocalVoice.CoCreateInstance( CLSID_SpVoice ););
tpr = t_RealTimeRateChange_Test(uMsg, tpParam, lpFTE, cpLocalVoice, false);
EXIT:
return tpr;
}
/*****************************************************************************/
TESTPROCAPI t_RealTimeRateChange_Test(UINT uMsg,
TPPARAM tpParam,
LPFUNCTION_TABLE_ENTRY lpFTE,
ISpVoice *cpVoice,
bool bCalledByMulti)
{
HRESULT hr = S_OK;
int tpr = TPR_PASS;
// Message check
if (uMsg != TPM_EXECUTE)
{
return TPR_NOT_HANDLED;
}
STATSTG Stat;
ULONG cSamples1=0, cSamples2=0, cSamples3=0;
WCHAR szwSpeakStr[MAX_PATH]=L"";
const char * TEST_TOPIC = "";
CSpStreamFormat NewFmt(SPSF_22kHz16BitMono, &hr);
CHECKHRGOTOId( hr, tpr, IDS_STRING84);
//get the speak string
DOCHECKHRGOTO (hr = GetWStrFromRes( IDS_STRING53, szwSpeakStr ););
DOCHECKHRGOTO (hr = cpVoice->SetNotifyWin32Event(););
//set interest events
DOCHECKHRGOTO (hr = cpVoice->SetInterest( SPFEI(SPEI_TTS_BOOKMARK), 0););
//set the rate to the minimum value
DOCHECKHRGOTO (hr = cpVoice->SetRate( -10 ););
//======================================================================
TEST_TOPIC = "t_RealTimeRateChange test: First stream";
//======================================================================
{
g_pKato->Comment(5, "Real time SetRate to -5 test - Thread Id: %x", GetCurrentThreadId());
//*** First stream with rate set to -5 below default
// Create memory stream #1
CComPtr<CTestStream> cpMemStream1;
cpMemStream1.p = new CTestStream(NewFmt, &hr);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING81, TEST_TOPIC);
//clean up the event queue
while(S_OK == cpVoice->WaitForNotifyEvent(0));
// Set the output to memory
hr = cpVoice->SetOutput( cpMemStream1, TRUE);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING60, TEST_TOPIC);
hr = cpVoice->Speak( szwSpeakStr, SPF_ASYNC | SPF_IS_XML, NULL );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING13, TEST_TOPIC);
//wait for bookmark event
hr = cpVoice->WaitForNotifyEvent(TTS_WAITTIME);
if (bCalledByMulti )
{
//In Multi threaded case
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING62, TEST_TOPIC);
}
else
{
//normal case
CHECKASSERTGOTOIdEx( (hr == S_OK), tpr, IDS_STRING62, TEST_TOPIC);
}
//set the rate. At this time, the engine is busying in processing Speak call
hr = cpVoice->SetRate( -5 );
CHECKHRIdEx( hr, tpr, IDS_STRING16, TEST_TOPIC);
hr = cpVoice->WaitUntilDone( TTS_WAITTIME_LONG );
if (!bCalledByMulti )
{
CHECKASSERTGOTOIdEx( (hr == S_OK), tpr, IDS_STRING61, TEST_TOPIC);
}
else
{
CHECKHRIdEx( hr, tpr, IDS_STRING61, TEST_TOPIC);
}
// Get stream size
hr = cpMemStream1->Stat( &Stat, STATFLAG_NONAME );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING90, TEST_TOPIC);
cSamples1 = (ULONG)Stat.cbSize.QuadPart / sizeof(SHORT);
}
//======================================================================
TEST_TOPIC = "t_RealTimeRateChange test: Second stream";
//======================================================================
{
g_pKato->Comment(5, "Real time SetRate to 0 test - Thread Id: %x", GetCurrentThreadId());
//*** Second stream with rate set to default
CComPtr<CTestStream> cpMemStream2;
cpMemStream2.p = new CTestStream(NewFmt, &hr);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING81, TEST_TOPIC);
//clean up the event queue
while(S_OK == cpVoice->WaitForNotifyEvent(0));
// Set the output to memory
hr = cpVoice->SetOutput( cpMemStream2, TRUE);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING60, TEST_TOPIC);
hr = cpVoice->Speak( szwSpeakStr, SPF_ASYNC | SPF_IS_XML, NULL );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING13, TEST_TOPIC);
//wait for bookmark event
hr = cpVoice->WaitForNotifyEvent(TTS_WAITTIME);
if (bCalledByMulti )
{
//In Multi threaded case
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING62, TEST_TOPIC);
}
else
{
//normal case
CHECKASSERTGOTOIdEx( (hr == S_OK), tpr, IDS_STRING62, TEST_TOPIC);
}
//set the rate. At this time, the engine is busying in processing Speak call
hr = cpVoice->SetRate( 0 );
CHECKHRIdEx( hr, tpr, IDS_STRING16, TEST_TOPIC);
hr = cpVoice->WaitUntilDone( TTS_WAITTIME_LONG );
if (!bCalledByMulti )
{
CHECKASSERTGOTOIdEx( (hr == S_OK), tpr, IDS_STRING61, TEST_TOPIC);
}
else
{
CHECKHRIdEx( hr, tpr, IDS_STRING61, TEST_TOPIC);
}
// Get stream size
hr = cpMemStream2->Stat( &Stat, STATFLAG_NONAME );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING90, TEST_TOPIC);
cSamples2 = (ULONG)Stat.cbSize.QuadPart / sizeof(SHORT);
}
//======================================================================
TEST_TOPIC = "t_RealTimeRateChange test: third stream";
//======================================================================
{
g_pKato->Comment(5, "Real time SetRate to 10 test - Thread Id: %x", GetCurrentThreadId());
//*** third stream with rate set to 10 above default
// Create memory stream #3
CComPtr<CTestStream> cpMemStream3;
cpMemStream3.p = new CTestStream(NewFmt, &hr);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING81, TEST_TOPIC);
//clean up the event queue
while(S_OK == cpVoice->WaitForNotifyEvent(0));
// Set the output to memory
hr = cpVoice->SetOutput(cpMemStream3, TRUE);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING60, TEST_TOPIC);
hr = cpVoice->Speak( szwSpeakStr, SPF_ASYNC | SPF_IS_XML, NULL );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING13, TEST_TOPIC);
//wait for bookmark event
hr = cpVoice->WaitForNotifyEvent(TTS_WAITTIME);
if (bCalledByMulti )
{
//In Multi threaded case
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING62, TEST_TOPIC);
}
else
{
//normal case
CHECKASSERTGOTOIdEx( (hr == S_OK), tpr, IDS_STRING62, TEST_TOPIC);
}
//set the rate. At this time, the engine is busying in processing Speak call
hr = cpVoice->SetRate( 10 );
CHECKHRIdEx( hr, tpr, IDS_STRING16, TEST_TOPIC);
hr = cpVoice->WaitUntilDone( TTS_WAITTIME_LONG );
if (!bCalledByMulti )
{
CHECKASSERTGOTOIdEx( (hr == S_OK), tpr, IDS_STRING61, TEST_TOPIC);
}
else
{
CHECKHRIdEx( hr, tpr, IDS_STRING61, TEST_TOPIC);
}
// Get stream size
hr = cpMemStream3->Stat( &Stat, STATFLAG_NONAME );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING90, TEST_TOPIC);
cSamples3 = (ULONG)Stat.cbSize.QuadPart / sizeof(SHORT);
}
//In Multithreaded case, the test only checks to ensure the system does not fail
if (!bCalledByMulti )
{
// Now compare the values from the 3 streams
// Note - The higher rate, the shorter the overall stream length
//
CHECKASSERTGOTOId(( cSamples1 > 0 ), tpr, IDS_STRING54);
CHECKASSERTGOTOId(( cSamples2 > 0 ), tpr, IDS_STRING54);
CHECKASSERTGOTOId(( cSamples3 > 0 ), tpr, IDS_STRING54);
CHECKASSERTId(( cSamples1 > cSamples2 ), tpr, IDS_STRING54);
CHECKASSERTId(( cSamples2 > cSamples3 ), tpr, IDS_STRING54);
}
EXIT:
//set back to default
cpVoice->SetRate( 0 );
return tpr;
}
/*****************************************************************************/
TESTPROCAPI t_RealTimeVolumeChange(UINT uMsg, TPPARAM tpParam, LPFUNCTION_TABLE_ENTRY lpFTE)
{
// This test changes the volume of a TTS driver on the fly and checks to see if
// it actually got louder.
// NOTE - this test uses the SAPI Event Model to get bookmark event and will fail
//if engines have not implemented bookmark event.
// Message check
if (uMsg != TPM_EXECUTE)
{
return TPR_NOT_HANDLED;
}
HRESULT hr = S_OK;
int tpr = TPR_PASS;
CComPtr<ISpVoice> cpLocalVoice;
// Create the SAPI voice
DOCHECKHRGOTO (hr = cpLocalVoice.CoCreateInstance( CLSID_SpVoice ););
tpr = t_RealTimeVolumeChange_Test(uMsg, tpParam, lpFTE, cpLocalVoice, false);
EXIT:
return tpr;
}
/*****************************************************************************/
TESTPROCAPI t_RealTimeVolumeChange_Test(UINT uMsg,
TPPARAM tpParam,
LPFUNCTION_TABLE_ENTRY lpFTE,
ISpVoice *cpVoice,
bool bCalledByMulti)
{
HRESULT hr = S_OK;
int tpr = TPR_PASS;
// Message check
if (uMsg != TPM_EXECUTE)
{
return TPR_NOT_HANDLED;
}
WCHAR szwSpeakStr[MAX_PATH]=L"";
ULONG totalAmp1 = 0, totalAmp2 = 0, totalAmp3 = 0;
const char * TEST_TOPIC = "";
CSpStreamFormat NewFmt(SPSF_22kHz16BitMono, &hr);
CHECKHRGOTOId( hr, tpr, IDS_STRING84);
LARGE_INTEGER l;
l.QuadPart = 0;
//get the speak string
DOCHECKHRGOTO (hr = GetWStrFromRes( IDS_STRING53, szwSpeakStr ););
DOCHECKHRGOTO (hr = cpVoice->SetNotifyWin32Event(););
//set interest events
DOCHECKHRGOTO (hr = cpVoice->SetInterest( SPFEI(SPEI_TTS_BOOKMARK), 0););
//set the start volume to max
DOCHECKHRGOTO (hr = cpVoice->SetVolume( 100 ););
//======================================================================
TEST_TOPIC = "t_RealTimeVolumeChangeTest: Stream 1 with Volume 100";
//======================================================================
{
g_pKato->Comment(5, "Real time SetVolume to 90 test - Thread Id: %x", GetCurrentThreadId());
// Create memory for stream #1
CComPtr<CTestStream> cpMemStream1;
cpMemStream1.p = new CTestStream(NewFmt, &hr);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING81, TEST_TOPIC);
//clean up the event queue
while(S_OK == cpVoice->WaitForNotifyEvent(0));
// Set the default output format
hr = cpVoice->SetOutput( cpMemStream1, TRUE);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING60, TEST_TOPIC);
hr = cpVoice->Speak( szwSpeakStr, SPF_ASYNC | SPF_IS_XML, NULL );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING13, TEST_TOPIC);
//wait for bookmark event
hr = cpVoice->WaitForNotifyEvent(TTS_WAITTIME);
if (bCalledByMulti )
{
//In Multi threaded case
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING62, TEST_TOPIC);
}
else
{
//normal case
CHECKASSERTGOTOIdEx( (hr == S_OK), tpr, IDS_STRING62, TEST_TOPIC);
}
//set the volume. At this time, the engine is busying in processing Speak call
hr = cpVoice->SetVolume( 90 );
CHECKHRIdEx( hr, tpr, IDS_STRING18, TEST_TOPIC);
hr = cpVoice->WaitUntilDone( TTS_WAITTIME_LONG );
if (!bCalledByMulti )
{
CHECKASSERTGOTOIdEx( (hr == S_OK), tpr, IDS_STRING61, TEST_TOPIC);
}
else
{
CHECKHRIdEx( hr, tpr, IDS_STRING61, TEST_TOPIC);
}
// Reset stream to beginning
hr = cpMemStream1->Seek( l, SEEK_SET, NULL );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING79, TEST_TOPIC);
// get the sum of the amplitude from the stream 1
hr = GetAmpFromSamples (cpMemStream1, &totalAmp1 );
CHECKHRGOTOIdEx(hr, tpr, IDS_STRING82, TEST_TOPIC );
}
//======================================================================
TEST_TOPIC = "t_RealTimeVolumeChangeTest: Stream 2 with Volume 50";
//======================================================================
// Create stream #2
{
g_pKato->Comment(5, "Real time SetVolume to 50 test - Thread Id: %x", GetCurrentThreadId());
// Create memory for stream #2
CComPtr<CTestStream> cpMemStream2;
cpMemStream2.p = new CTestStream(NewFmt, &hr);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING81, TEST_TOPIC);
//clean up the event queue
while(S_OK == cpVoice->WaitForNotifyEvent(0));
// Set the default output format
hr = cpVoice->SetOutput(cpMemStream2, TRUE);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING60, TEST_TOPIC);
hr = cpVoice->Speak( szwSpeakStr, SPF_ASYNC | SPF_IS_XML, NULL );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING13, TEST_TOPIC);
//wait for bookmark event
hr = cpVoice->WaitForNotifyEvent(TTS_WAITTIME);
if (bCalledByMulti )
{
//In Multi threaded case
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING62, TEST_TOPIC);
}
else
{
//normal case
CHECKASSERTGOTOIdEx( (hr == S_OK), tpr, IDS_STRING62, TEST_TOPIC);
}
//set the volume. At this time, the engine is busying in processing Speak call
hr = cpVoice->SetVolume( 50 );
CHECKHRIdEx( hr, tpr, IDS_STRING18, TEST_TOPIC);
hr = cpVoice->WaitUntilDone( TTS_WAITTIME_LONG );
if (!bCalledByMulti )
{
CHECKASSERTGOTOIdEx( (hr == S_OK), tpr, IDS_STRING61, TEST_TOPIC);
}
else
{
CHECKHRIdEx( hr, tpr, IDS_STRING61, TEST_TOPIC);
}
// Reset stream to beginning
hr = cpMemStream2->Seek( l, SEEK_SET, NULL );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING79, TEST_TOPIC);
// get the sum of the amplitude from the stream 2
hr = GetAmpFromSamples (cpMemStream2, &totalAmp2 );
CHECKHRGOTOIdEx(hr, tpr, IDS_STRING82, TEST_TOPIC );
}
//======================================================================
TEST_TOPIC = "t_RealTimeVolumeChangeTest: Stream 3 with Volume 1";
//======================================================================
{
g_pKato->Comment(5, "Real time SetVolume to 1 test - Thread Id: %x", GetCurrentThreadId());
// Create memory for stream #3
CComPtr<CTestStream> cpMemStream3;
cpMemStream3.p = new CTestStream(NewFmt, &hr);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING81, TEST_TOPIC);
//clean up the event queue
while(S_OK == cpVoice->WaitForNotifyEvent(0));
// Set the default output format
hr = cpVoice->SetOutput( cpMemStream3, TRUE);
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING60, TEST_TOPIC);
hr = cpVoice->Speak( szwSpeakStr, SPF_ASYNC | SPF_IS_XML, NULL );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING13, TEST_TOPIC);
//wait for bookmark event
hr = cpVoice->WaitForNotifyEvent(TTS_WAITTIME);
if (bCalledByMulti )
{
//In Multi threaded case
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING62, TEST_TOPIC);
}
else
{
//normal case
CHECKASSERTGOTOIdEx( (hr == S_OK), tpr, IDS_STRING62, TEST_TOPIC);
}
//set the volume. At this time, the engine is busying in processing Speak call
hr = cpVoice->SetVolume( 1 );
CHECKHRIdEx( hr, tpr, IDS_STRING18, TEST_TOPIC);
hr = cpVoice->WaitUntilDone( TTS_WAITTIME_LONG );
if (!bCalledByMulti )
{
CHECKASSERTGOTOIdEx( (hr == S_OK), tpr, IDS_STRING61, TEST_TOPIC);
}
else
{
CHECKHRIdEx( hr, tpr, IDS_STRING61, TEST_TOPIC);
}
// Reset stream to beginning
hr = cpMemStream3->Seek( l, SEEK_SET, NULL );
CHECKHRGOTOIdEx( hr, tpr, IDS_STRING79, TEST_TOPIC);
// get the sum of the amplitude from the stream 3
hr = GetAmpFromSamples (cpMemStream3, &totalAmp3 );
CHECKHRGOTOIdEx(hr, tpr, IDS_STRING82, TEST_TOPIC );
}
if (!bCalledByMulti )
{
// Now compare the values from the 3 streams
CHECKASSERTGOTOId(( totalAmp1 > 0 ), tpr, IDS_STRING55);
CHECKASSERTGOTOId(( totalAmp2 > 0 ), tpr, IDS_STRING55);
CHECKASSERTGOTOId(( totalAmp3 > 0 ), tpr, IDS_STRING55);
CHECKASSERTId(( totalAmp1 > totalAmp2 ), tpr, IDS_STRING55);
CHECKASSERTId(( totalAmp2 > totalAmp3 ), tpr, IDS_STRING55);
}
EXIT:
//set back to default
cpVoice->SetVolume( 100 );
return tpr;
}

View File

@@ -0,0 +1,137 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by ttscomp.rc
//
#define IDS_STRING1 1
#define IDS_STRING2 2
#define IDS_STRING3 3
#define IDS_STRING4 4
#define IDS_STRING5 5
#define IDS_STRING6 6
#define IDS_STRING7 7
#define IDS_STRING8 8
#define IDS_STRING9 9
#define IDS_STRING10 10
#define IDS_STRING11 11
#define IDS_STRING12 12
#define IDS_STRING13 13
#define IDS_STRING14 14
#define IDS_STRING15 15
#define IDS_STRING16 16
#define IDS_STRING17 17
#define IDS_STRING18 18
#define IDS_STRING19 19
#define IDS_STRING20 20
#define IDS_STRING21 21
#define IDS_STRING22 22
#define IDS_STRING23 23
#define IDS_STRING24 24
#define IDS_STRING25 25
#define IDS_STRING26 26
#define IDS_STRING27 27
#define IDS_STRING28 28
#define IDS_STRING29 29
#define IDS_STRING30 30
#define IDS_STRING31 31
#define IDS_STRING32 32
#define IDS_STRING33 33
#define IDS_STRING34 34
#define IDS_STRING35 35
#define IDS_STRING36 36
#define IDS_STRING37 37
#define IDS_STRING38 38
#define IDS_STRING39 39
#define IDS_STRING40 40
#define IDS_STRING41 41
#define IDS_STRING42 42
#define IDS_STRING43 43
#define IDS_STRING44 44
#define IDS_STRING45 45
#define IDS_STRING46 46
#define IDS_STRING47 47
#define IDS_STRING48 48
#define IDS_STRING49 49
#define IDS_STRING50 50
#define IDS_STRING51 51
#define IDS_STRING52 52
#define IDS_STRING53 53
#define IDS_STRING54 54
#define IDS_STRING55 55
#define IDS_STRING56 56
#define IDS_STRING57 57
#define IDS_STRING58 58
#define IDS_STRING59 59
#define IDS_STRING60 60
#define IDS_STRING61 61
#define IDS_STRING62 62
#define IDS_STRING63 63
#define IDS_STRING64 64
#define IDS_STRING65 65
#define IDS_STRING66 66
#define IDS_STRING67 67
#define IDS_STRING68 68
#define IDS_STRING69 69
#define IDS_STRING70 70
#define IDS_STRING71 71
#define IDS_STRING72 72
#define IDS_STRING73 73
#define IDS_STRING74 74
#define IDS_STRING75 75
#define IDS_STRING76 76
#define IDS_STRING77 77
#define IDS_STRING78 78
#define IDS_STRING79 79
#define IDS_STRING81 81
#define IDS_STRING82 82
#define IDS_STRING83 83
#define IDS_STRING84 84
#define IDS_STRING85 85
#define IDS_STRING86 86
#define IDS_STRING87 87
#define IDS_STRING88 88
#define IDS_STRING89 89
#define IDS_STRING90 90
#define IDS_STRING91 91
#define IDS_STRING92 92
#define IDS_STRING93 93
#define IDS_STRING94 94
#define IDS_STRING95 95
#define IDS_STRING96 96
#define IDS_STRING97 97
#define IDS_STRING98 98
#define IDS_STRING99 99
#define IDS_STRING100 100
#define IDS_STRING101 101
#define IDS_STRING102 102
#define IDD_DIALOG1 102
#define IDS_STRING103 103
#define IDS_STRING104 104
#define IDS_STRING105 105
#define IDS_STRING106 106
#define IDS_STRING107 107
#define IDS_STRING108 108
#define IDS_STRING109 109
#define IDS_STRING110 110
#define IDS_STRING111 111
#define IDS_STRING112 112
#define IDS_STRING113 113
#define IDS_STRING114 114
#define IDS_STRING115 115
#define IDS_STRING116 116
#define IDS_STRING117 117
#define IDS_STRING118 118
#define IDS_STRING119 119
#define IDS_STRING120 120
#define IDS_STRING121 121
#define IDS_STRING122 122
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 103
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1000
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

View File

@@ -0,0 +1,176 @@
//******************************************************************************
// Copyright (c) Microsoft Corporation. All rights reserved.
// spgeterrormsg.cpp
//
//******************************************************************************
#include "ttscomp.h"
#pragma warning (disable : 4786)
#include <map>
typedef std::map<HRESULT, LPCSTR> HRMAP;
typedef HRMAP::value_type HRPAIR;
void InitSpErrorMsg(HRMAP& rhrmap);
inline LPCSTR SpGetErrorMsg(HRESULT hr)
{
static char szMessageBuffer[MAX_PATH];
static bool s_fInit;
static HRMAP s_hrmap;
if(!s_fInit)
{
InitSpErrorMsg(s_hrmap);
s_fInit = true;
}
HRMAP::iterator it = s_hrmap.find(hr);
if(it != s_hrmap.end())
{
return it->second;
}
else if(FAILED(hr)) // FormatMessage will treat SUCCEEDED(hr) as Win32 error code
{
DWORD cbWrite = ::FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, hr, MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT), szMessageBuffer, 256, NULL);
if(cbWrite > 0)
{
// truncate the ending CRLF
szMessageBuffer[strlen(szMessageBuffer) - 2] = 0;
return szMessageBuffer;
}
}
sprintf(szMessageBuffer, "0x%08x", hr);
return szMessageBuffer;
}
inline void InitSpErrorMsg(HRMAP& rhrmap)
{
#define ADD_HR_PAIR(hr) rhrmap.insert(HRPAIR(hr, #hr))
#define ADD_WIN32_PAIR(errno) rhrmap.insert(HRPAIR(SpHrFromWin32(errno), "SpHrFromWin32("#errno")"))
ADD_HR_PAIR(S_OK);
ADD_HR_PAIR(S_FALSE);
// If we have two names for the same hr, the first one inserted will count.
// So the SAPI names are put before standard names.
// The following error codes are based on sperror.h#10
// Note: Please update the version number above when new codes added.
ADD_HR_PAIR(SPERR_UNINITIALIZED);
ADD_HR_PAIR(SPERR_ALREADY_INITIALIZED);
ADD_HR_PAIR(SPERR_UNSUPPORTED_FORMAT);
ADD_HR_PAIR(SPERR_INVALID_FLAGS);
ADD_HR_PAIR(SP_END_OF_STREAM);
ADD_HR_PAIR(SPERR_DEVICE_BUSY);
ADD_HR_PAIR(SPERR_DEVICE_NOT_SUPPORTED);
ADD_HR_PAIR(SPERR_DEVICE_NOT_ENABLED);
ADD_HR_PAIR(SPERR_NO_DRIVER);
ADD_HR_PAIR(SPERR_FILE_MUST_BE_UNICODE);
ADD_HR_PAIR(SP_INSUFFICIENT_DATA);
ADD_HR_PAIR(SPERR_INVALID_PHRASE_ID);
ADD_HR_PAIR(SPERR_BUFFER_TOO_SMALL);
ADD_HR_PAIR(SPERR_FORMAT_NOT_SPECIFIED);
ADD_HR_PAIR(SPERR_AUDIO_STOPPED);
ADD_HR_PAIR(SP_AUDIO_PAUSED);
ADD_HR_PAIR(SPERR_RULE_NOT_FOUND);
ADD_HR_PAIR(SPERR_TTS_ENGINE_EXCEPTION);
ADD_HR_PAIR(SPERR_TTS_NLP_EXCEPTION);
ADD_HR_PAIR(SPERR_ENGINE_BUSY);
ADD_HR_PAIR(SP_AUDIO_CONVERSION_ENABLED);
ADD_HR_PAIR(SP_NO_HYPOTHESIS_AVAILABLE);
ADD_HR_PAIR(SPERR_CANT_CREATE);
ADD_HR_PAIR(SP_ALREADY_IN_LEX);
ADD_HR_PAIR(SPERR_NOT_IN_LEX);
ADD_HR_PAIR(SP_LEX_NOTHING_TO_SYNC);
ADD_HR_PAIR(SPERR_LEX_VERY_OUT_OF_SYNC);
ADD_HR_PAIR(SPERR_UNDEFINED_FORWARD_RULE_REF);
ADD_HR_PAIR(SPERR_EMPTY_RULE);
ADD_HR_PAIR(SPERR_GRAMMAR_COMPILER_INTERNAL_ERROR);
ADD_HR_PAIR(SPERR_RULE_NOT_DYNAMIC);
ADD_HR_PAIR(SPERR_DUPLICATE_RULE_NAME);
ADD_HR_PAIR(SPERR_DUPLICATE_RESOURCE_NAME);
ADD_HR_PAIR(SPERR_TOO_MANY_GRAMMARS);
ADD_HR_PAIR(SPERR_CIRCULAR_REFERENCE);
ADD_HR_PAIR(SPERR_INVALID_IMPORT);
ADD_HR_PAIR(SPERR_INVALID_WAV_FILE);
ADD_HR_PAIR(SP_REQUEST_PENDING);
ADD_HR_PAIR(SPERR_ALL_WORDS_OPTIONAL);
ADD_HR_PAIR(SPERR_INSTANCE_CHANGE_INVALID);
ADD_HR_PAIR(SPERR_RULE_NAME_ID_CONFLICT);
ADD_HR_PAIR(SPERR_NO_RULES);
ADD_HR_PAIR(SPERR_CIRCULAR_RULE_REF);
ADD_HR_PAIR(SP_NO_PARSE_FOUND);
ADD_HR_PAIR(SPERR_INVALID_HANDLE);
ADD_HR_PAIR(SPERR_REMOTE_CALL_TIMED_OUT);
ADD_HR_PAIR(SPERR_AUDIO_BUFFER_OVERFLOW);
ADD_HR_PAIR(SPERR_NO_AUDIO_DATA);
ADD_HR_PAIR(SPERR_DEAD_ALTERNATE);
ADD_HR_PAIR(SPERR_HIGH_LOW_CONFIDENCE);
ADD_HR_PAIR(SPERR_INVALID_FORMAT_STRING);
ADD_HR_PAIR(SP_UNSUPPORTED_ON_STREAM_INPUT);
ADD_HR_PAIR(SPERR_APPLEX_READ_ONLY);
ADD_HR_PAIR(SPERR_NO_TERMINATING_RULE_PATH);
ADD_HR_PAIR(SP_WORD_EXISTS_WITHOUT_PRONUNCIATION);
ADD_HR_PAIR(SPERR_STREAM_CLOSED);
ADD_HR_PAIR(SPERR_NO_MORE_ITEMS);
ADD_HR_PAIR(SPERR_NOT_FOUND);
ADD_HR_PAIR(SPERR_INVALID_AUDIO_STATE);
ADD_HR_PAIR(SPERR_GENERIC_MMSYS_ERROR);
ADD_HR_PAIR(SPERR_MARSHALER_EXCEPTION);
ADD_HR_PAIR(SPERR_NOT_DYNAMIC_GRAMMAR);
ADD_HR_PAIR(SPERR_AMBIGUOUS_PROPERTY);
ADD_HR_PAIR(SPERR_INVALID_REGISTRY_KEY);
ADD_HR_PAIR(SPERR_INVALID_TOKEN_ID);
ADD_HR_PAIR(SPERR_XML_BAD_SYNTAX);
ADD_HR_PAIR(SPERR_XML_RESOURCE_NOT_FOUND);
ADD_HR_PAIR(SPERR_TOKEN_IN_USE);
ADD_HR_PAIR(SPERR_TOKEN_DELETED);
ADD_HR_PAIR(SPERR_MULTI_LINGUAL_NOT_SUPPORTED);
ADD_HR_PAIR(SPERR_EXPORT_DYNAMIC_RULE);
ADD_HR_PAIR(SPERR_STGF_ERROR);
ADD_HR_PAIR(SPERR_WORDFORMAT_ERROR);
ADD_HR_PAIR(SPERR_STREAM_NOT_ACTIVE);
ADD_HR_PAIR(SPERR_ENGINE_RESPONSE_INVALID);
ADD_HR_PAIR(SPERR_SR_ENGINE_EXCEPTION);
ADD_HR_PAIR(SPERR_STREAM_POS_INVALID);
ADD_HR_PAIR(SP_RECOGNIZER_INACTIVE);
ADD_HR_PAIR(SPERR_REMOTE_CALL_ON_WRONG_THREAD);
ADD_HR_PAIR(SPERR_REMOTE_PROCESS_TERMINATED);
ADD_HR_PAIR(SPERR_REMOTE_PROCESS_ALREADY_RUNNING);
ADD_HR_PAIR(SPERR_LANGID_MISMATCH);
ADD_HR_PAIR(SP_PARTIAL_PARSE_FOUND);
ADD_HR_PAIR(SPERR_NOT_TOPLEVEL_RULE);
ADD_HR_PAIR(SP_NO_RULE_ACTIVE);
ADD_HR_PAIR(SPERR_LEX_REQUIRES_COOKIE);
ADD_HR_PAIR(SP_STREAM_UNINITIALIZED);
ADD_HR_PAIR(SPERR_UNSUPPORTED_LANG);
ADD_HR_PAIR(SPERR_VOICE_PAUSED);
ADD_HR_PAIR(SPERR_AUDIO_BUFFER_UNDERFLOW);
ADD_HR_PAIR(SPERR_AUDIO_STOPPED_UNEXPECTEDLY);
ADD_HR_PAIR(SPERR_NO_WORD_PRONUNCIATION);
ADD_HR_PAIR(SPERR_ALTERNATES_WOULD_BE_INCONSISTENT);
// These are standard error codes:
ADD_HR_PAIR(E_NOTIMPL);
ADD_HR_PAIR(E_UNEXPECTED);
ADD_HR_PAIR(E_OUTOFMEMORY);
ADD_HR_PAIR(E_INVALIDARG);
ADD_HR_PAIR(E_NOINTERFACE);
ADD_HR_PAIR(E_POINTER);
ADD_HR_PAIR(E_HANDLE);
ADD_HR_PAIR(E_ABORT);
ADD_HR_PAIR(E_FAIL);
ADD_HR_PAIR(E_ACCESSDENIED);
ADD_HR_PAIR(REGDB_E_CLASSNOTREG);
ADD_HR_PAIR(REGDB_E_IIDNOTREG);
ADD_WIN32_PAIR(ERROR_BAD_EXE_FORMAT);
ADD_WIN32_PAIR(ERROR_RESOURCE_DATA_NOT_FOUND);
ADD_WIN32_PAIR(ERROR_RESOURCE_TYPE_NOT_FOUND);
ADD_WIN32_PAIR(ERROR_RESOURCE_NAME_NOT_FOUND);
ADD_WIN32_PAIR(ERROR_RESOURCE_LANG_NOT_FOUND);
#undef ADD_HR_PAIR
#undef ADD_WIN32_PAIR
}

View File

@@ -0,0 +1,9 @@
//******************************************************************************
// Copyright (c) Microsoft Corporation. All rights reserved.
// spgeterrormsg.h
//
//******************************************************************************
#include <windows.h>
extern LPCSTR SpGetErrorMsg(HRESULT hr);

View File

@@ -0,0 +1,186 @@
//******************************************************************************
// Copyright (c) Microsoft Corporation. All rights reserved.
// stress.cpp
//
//******************************************************************************
#include "TTSComp.h"
//******************************************************************************
//***** Internal Functions
//******************************************************************************
extern CRITICAL_SECTION g_csProcess;
#define NUM_STRESS_RUNS 20
//******************************************************************************
//***** TestProc()'s
//******************************************************************************
/*****************************************************************************/
TESTPROCAPI t_MultiInstanceTest(UINT uMsg, TPPARAM tpParam, LPFUNCTION_TABLE_ENTRY lpFTE)
{
// This test randomly calls all the other functions contained in this dll. This
// function will be called on multiple threads and each thread has its own voice
// Object.
// Message check
if (uMsg == TPM_QUERY_THREAD_COUNT)
{
CleanupVoiceAndEngine();
((LPTPS_QUERY_THREAD_COUNT)tpParam)->dwThreadCount = 4;
return TPR_HANDLED;
}
// Message check
if (uMsg != TPM_EXECUTE)
{
return TPR_NOT_HANDLED;
}
else
{
srand(reinterpret_cast<LPTPS_EXECUTE>(tpParam)->dwRandomSeed);
}
HRESULT hr = S_OK;
int tpr = TPR_PASS;
int iRand, i;
CComPtr<ISpVoice> cpLocalVoice;
//create a SAPI voice, each thread has its own voice
hr = cpLocalVoice.CoCreateInstance( CLSID_SpVoice );
CHECKHRGOTOId( hr, tpr, IDS_STRING85 );
for( i=0; i<NUM_STRESS_RUNS;i++ )
{
iRand = GET_RANDOM( 0, 18);
switch( iRand )
{
case 0:
g_pKato->Comment(5, TEXT("Test #0 - Enter t_ISpTTSEngine_Speak - Thread Id: %x"), GetCurrentThreadId());
tpr = t_ISpTTSEngine_Speak_Test( uMsg, tpParam, NULL, cpLocalVoice, true );
g_pKato->Comment(5, TEXT("Test #0 - Exit t_ISpTTSEngine_Speak - Thread Id: %x"), GetCurrentThreadId());
break;
case 1:
g_pKato->Comment(5, TEXT("Test #1 - Enter t_ISpTTSEngine_Skip - Thread Id: %x"), GetCurrentThreadId());
tpr = t_ISpTTSEngine_Skip_Test ( uMsg, tpParam, NULL, cpLocalVoice, true );
g_pKato->Comment(5, TEXT("Test #1 - Exit t_ISpTTSEngine_Skip - Thread Id: %x"), GetCurrentThreadId());
break;
case 2:
g_pKato->Comment(5, TEXT("Test #2 - Enter t_ISpTTSEngine_GetOutputFormat - Thread Id: %x"), GetCurrentThreadId());
tpr = t_ISpTTSEngine_GetOutputFormat_Test( uMsg, tpParam, NULL, cpLocalVoice, true );
g_pKato->Comment(5, TEXT("Test #2 - Exit t_ISpTTSEngine_GetOutputFormat - Thread Id: %x"), GetCurrentThreadId());
break;
case 3:
g_pKato->Comment(5, TEXT("Test #3 - Enter t_ISpTTSEngine_SetRate - Thread Id: %x"), GetCurrentThreadId());
tpr = t_ISpTTSEngine_SetRate_Test( uMsg, tpParam, NULL , cpLocalVoice, true );
g_pKato->Comment(5, TEXT("Test #3 - Exit t_ISpTTSEngine_SetRate - Thread Id: %x"), GetCurrentThreadId());
break;
case 4:
g_pKato->Comment(5, TEXT("Test #4 - Enter t_ISpTTSEngine_SetVolume - Thread Id: %x"), GetCurrentThreadId());
tpr = t_ISpTTSEngine_SetVolume_Test( uMsg, tpParam, NULL , cpLocalVoice, true );
g_pKato->Comment(5, TEXT("Test #4 - Exit t_ISpTTSEngine_SetVolume - Thread Id: %x"), GetCurrentThreadId());
break;
case 5:
g_pKato->Comment(5, TEXT("Test #5 - Enter t_CheckEventsSAPI - Thread Id: %x"), GetCurrentThreadId());
tpr = t_CheckEventsSAPI_Test( uMsg, tpParam, NULL, cpLocalVoice, true );
g_pKato->Comment(5, TEXT("Test #5 - Exit t_CheckEventsSAPI - Thread Id: %x"), GetCurrentThreadId());
break;
case 6:
g_pKato->Comment(5, TEXT("Test #6 - Enter t_XMLBookmarkTest - Thread Id: %x"), GetCurrentThreadId());
tpr = t_XMLBookmark_Test( uMsg, tpParam, NULL, cpLocalVoice, true );
g_pKato->Comment(5, TEXT("Test #6 - Exit t_XMLBookmarkTest - Thread Id: %x"), GetCurrentThreadId());
break;
case 7:
g_pKato->Comment(5, TEXT("Test #7 - Enter t_XMLSilenceTest - Thread Id: %x"), GetCurrentThreadId());
tpr = t_XMLSilence_Test( uMsg, tpParam, NULL, cpLocalVoice, true );
g_pKato->Comment(5, TEXT("Test #7 - Exit t_XMLSilenceTest - Thread Id: %x"), GetCurrentThreadId());
break;
case 8:
g_pKato->Comment(5, TEXT("Test #8 - Enter t_XMLSpellTest - Thread Id: %x"), GetCurrentThreadId());
tpr = t_XMLSpell_Test( uMsg, tpParam, NULL, cpLocalVoice, true );
g_pKato->Comment(5, TEXT("Test #8 - Exit t_XMLSpellTest - Thread Id: %x"), GetCurrentThreadId());
break;
case 9:
g_pKato->Comment(5, TEXT("Test #9 - Enter t_XMLPronounceTest - Thread Id: %x"), GetCurrentThreadId());
tpr = t_XMLPronounce_Test( uMsg, tpParam, NULL, cpLocalVoice, true );
g_pKato->Comment(5, TEXT("Test #9 - Exit t_XMLPronounceTest - Thread Id: %x"), GetCurrentThreadId());
break;
case 10:
g_pKato->Comment(5, TEXT("Test #10 - Enter t_XMLRateTest - Thread Id: %x"), GetCurrentThreadId());
tpr = t_XMLRate_Test( uMsg, tpParam, NULL, cpLocalVoice, true );
g_pKato->Comment(5, TEXT("Test #10 - Exit t_XMLRateTest - Thread Id: %x"), GetCurrentThreadId());
break;
case 11:
g_pKato->Comment(5, TEXT("Test #11 - Enter t_XMLVolumeTest - Thread Id: %x"), GetCurrentThreadId());
tpr = t_XMLVolume_Test( uMsg, tpParam, NULL, cpLocalVoice, true );
g_pKato->Comment(5, TEXT("Test #11 - Exit t_XMLVolumeTest - Thread Id: %x"), GetCurrentThreadId());
break;
case 12:
g_pKato->Comment(5, TEXT("Test #12 - Enter t_XMLPitchTest - Thread Id: %x"), GetCurrentThreadId());
tpr = t_XMLPitch_Test( uMsg, tpParam, NULL, cpLocalVoice, true );
g_pKato->Comment(5, TEXT("Test #12 - Exit t_XMLPitchTest - Thread Id: %x"), GetCurrentThreadId());
break;
case 13:
g_pKato->Comment(5, TEXT("Test #13 - Enter t_RealTimeRateChangeTest - Thread Id: %x"), GetCurrentThreadId());
tpr = t_RealTimeRateChange_Test( uMsg, tpParam, NULL, cpLocalVoice, true );
g_pKato->Comment(5, TEXT("Test #13 - Exit t_RealTimeRateChangeTest - Thread Id: %x"), GetCurrentThreadId());
break;
case 14:
g_pKato->Comment(5, TEXT("Test #14 - Enter t_RealTimeVolumeChangeTest - Thread Id: %x"), GetCurrentThreadId());
tpr = t_RealTimeVolumeChange_Test( uMsg, tpParam, NULL , cpLocalVoice, true );
g_pKato->Comment(5, TEXT("Test #14 - Exit t_RealTimeVolumeChangeTest - Thread Id: %x"), GetCurrentThreadId());
break;
case 15:
g_pKato->Comment(5, TEXT("Test #15 - Enter t_SpeakStop_Test - Thread Id: %x"), GetCurrentThreadId());
tpr = t_SpeakStop_Test( uMsg, tpParam, NULL, cpLocalVoice, true );
g_pKato->Comment(5, TEXT("Test #15 - Exit t_SpeakStop_Test - Thread Id: %x"), GetCurrentThreadId());
break;
case 16:
g_pKato->Comment(5, TEXT("Test #16 - Enter t_LexiconMultiTest Test - Thread Id: %x"), GetCurrentThreadId());
tpr = t_LexiconMulti_Test( uMsg, tpParam, NULL, cpLocalVoice, true );
g_pKato->Comment(5, TEXT("Test #16 - Exit t_LexiconMultiTest Test - Thread Id: %x"), GetCurrentThreadId());
break;
case 17:
g_pKato->Comment(5, TEXT("Test #17 - Enter t_XMLSAPIMarkupTest - Thread Id: %x"), GetCurrentThreadId());
tpr = t_XMLSAPIMarkup_Test( uMsg, tpParam, NULL, cpLocalVoice, true );
g_pKato->Comment(5, TEXT("Test #17 - Exit t_XMLSAPIMarkupTest - Thread Id: %x"), GetCurrentThreadId());
break;
case 18:
g_pKato->Comment(5, TEXT("Test #18 - Enter t_XMLContext_Test - Thread Id: %x"), GetCurrentThreadId());
tpr = t_XMLContext_Test( uMsg, tpParam, NULL, cpLocalVoice, true );
g_pKato->Comment(5, TEXT("Test #18 - Exit t_XMLContext_Test - Thread Id: %x"), GetCurrentThreadId());
break;
}
if( tpr != TPR_PASS )
{
return tpr;
}
}
EXIT:
return tpr;
}

View File

@@ -0,0 +1,156 @@
# Microsoft Developer Studio Project File - Name="ttscomp" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=ttscomp - 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 "tts.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 "tts.mak" CFG="ttscomp - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "ttscomp - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "ttscomp - 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)" == "ttscomp - 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 "TTSCOMP_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\common\include" /I "..\..\..\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TTSCOMP_EXPORTS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /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 f0r.lib urlmon.lib kato.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 /dll /incremental:yes /machine:I386 /out:"Release/ttscomp.dll" /pdbtype:sept /libpath:"..\common\lib" /libpath:"..\..\..\lib\i386"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "ttscomp - 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 "TTSCOMP_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\common\include" /I "..\..\..\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "TTSCOMP_EXPORTS" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /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 f0d.lib urlmon.lib kato.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 /dll /debug /machine:I386 /out:"Debug/ttscomp.dll" /pdbtype:sept /libpath:"..\common\lib" /libpath:"..\..\..\lib\i386"
!ENDIF
# Begin Target
# Name "ttscomp - Win32 Release"
# Name "ttscomp - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Group "Test Modules"
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\audiostate.cpp
# End Source File
# Begin Source File
SOURCE=.\compevents.cpp
# End Source File
# Begin Source File
SOURCE=.\ispttsengine.cpp
# End Source File
# Begin Source File
SOURCE=.\lexicon.cpp
# End Source File
# Begin Source File
SOURCE=.\realtime.cpp
# End Source File
# Begin Source File
SOURCE=.\stress.cpp
# End Source File
# Begin Source File
SOURCE=.\ttsmarkup.cpp
# End Source File
# End Group
# Begin Source File
SOURCE=.\spgeterrormsg.cpp
# End Source File
# Begin Source File
SOURCE=.\ttscomp.cpp
# End Source File
# Begin Source File
SOURCE=.\ttscomp.rc
# End Source File
# Begin Source File
SOURCE=..\Common\def\ttscomp.def
# End Source File
# Begin Source File
SOURCE=..\Common\cpp\TUXDLL.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

View File

@@ -0,0 +1,69 @@
//******************************************************************************
// Copyright (c) Microsoft Corporation. All rights reserved.
// ttscomp.cpp
//
//******************************************************************************
#include "TTSComp.h"
// BASE is a unique value assigned to a given tester or component. This value,
// when combined with each of the following test's unique IDs, allows every
// test case within the entire team to be uniquely identified.
#define BASE 0x000A4000
// Our function table that we pass to Tux
FUNCTION_TABLE_ENTRY g_lpFTE[] = {
TEXT("TTS Compliance Test" ), 0, 0, 0, NULL,
TEXT("ISpTTSEngine" ), 1, 0, 0, NULL,
TEXT( "Speak" ), 2, 0, BASE+ 1, t_ISpTTSEngine_Speak,
TEXT( "Skip" ), 2, 0, BASE+ 2, t_ISpTTSEngine_Skip,
TEXT( "GetOutputFormat" ), 2, 0, BASE+ 3, t_ISpTTSEngine_GetOutputFormat,
TEXT( "SetRate" ), 2, 0, BASE+ 4, t_ISpTTSEngine_SetRate,
TEXT( "SetVolume" ), 2, 0, BASE+ 5, t_ISpTTSEngine_SetVolume,
TEXT( "Eventing" ), 1, 0, 0, NULL,
TEXT( "Check SAPI required Events" ), 2, 0, BASE+ 101, t_CheckEventsSAPI,
TEXT("TTS XML Markup" ), 1, 0, 0, NULL,
TEXT( "Bookmark" ), 2, 0, BASE+ 201, t_XMLBookmark,
TEXT( "Silence" ), 2, 0, BASE+ 202, t_XMLSilence,
TEXT( "Spell" ), 2, 0, BASE+ 203, t_XMLSpell,
TEXT( "Pronounce" ), 2, 0, BASE+ 204, t_XMLPronounce,
TEXT( "Rate" ), 2, 0, BASE+ 205, t_XMLRate,
TEXT( "Volume" ), 2, 0, BASE+ 206, t_XMLVolume,
TEXT( "Pitch" ), 2, 0, BASE+ 207, t_XMLPitch,
TEXT( "Non-SAPI tags" ), 2, 0, BASE+ 208, t_XMLNonSapiTagsTest,
TEXT( "Context" ), 2, 0, BASE+ 212, t_XMLContext,
TEXT("Real Time Rate/Vol Tests" ), 1, 0, 0, NULL,
TEXT( "Real time rate change" ), 2, 0, BASE+ 301, t_RealTimeRateChange,
TEXT( "Real time volume change" ), 2, 0, BASE+ 302, t_RealTimeVolumeChange,
TEXT("Audio State Tests" ), 1, 0, 0, NULL,
TEXT( "Speak Stop" ), 2, 0, BASE+ 402, t_SpeakStop,
TEXT( "Speak Destroy" ), 2, 0, BASE+ 403, t_SpeakDestroy,
TEXT("Lexicon Tests" ), 1, 0, 0, NULL,
TEXT( "User Lexicon Test" ), 2, 0, BASE+ 501, t_UserLexiconTest,
TEXT( "App Lexicon Test" ), 2, 0, BASE+ 502, t_AppLexiconTest,
TEXT("Multiple Instance Test" ), 1, 0, 0, NULL,
TEXT( "Multiple-Instance Test" ), 2, 0, BASE+ 601, t_MultiInstanceTest,
TEXT("Features" ), 0, 0, 0, NULL,
TEXT( "Emph" ), 1, 0, BASE+ 801, t_XMLEmphTest,
TEXT( "Phoneme & Viseme Events" ), 1, 0, BASE+ 805, t_CheckEventsNotRequire,
TEXT( "PartOfSp" ), 1, 0, BASE+ 806, t_XMLPartOfSpTest,
NULL , 0, 0, 0, NULL // marks end of list
};
// Stub function for cleaning up globals before dll is unloaded
void CleanupTest()
{
CleanupVoiceAndEngine();
}
HRESULT PreTestSetup(void) {
return S_OK;
}
HRESULT PostTestCleanup(void) {
return S_OK;
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,532 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// Japanese resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_JPN)
#ifdef _WIN32
LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
#pragma code_page(932)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_STRING1 "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20"
IDS_STRING5 "SpeakStop <20><><EFBFBD>s"
IDS_STRING6 "<22><><EFBFBD>̒<EFBFBD><CC92><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͏I<CD8F><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȃ<EFBFBD><C882>ł<EFBFBD><C582><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>B<EFBFBD><42><EFBFBD>̃R<CC83>[<5B>h<EFBFBD>ŕ<EFBFBD><C595><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B<EFBFBD>G<EFBFBD><47><EFBFBD>W<EFBFBD><57><EFBFBD>͊ԈႢ<D488>Ȃ<EFBFBD><C882><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͂<EFBFBD><CD82>ł<EFBFBD><C582>B"
IDS_STRING7 "SpeakDestroy <20><><EFBFBD>s"
IDS_STRING8 "<22>݂Ȃ<DD82><C882><EFBFBD> <BOOKMARK MARK=""12""/> <20><><EFBFBD><EFBFBD><EFBFBD>ɂ<EFBFBD><C982><EFBFBD>"
IDS_STRING9 "SAPI required Eventing <20><><EFBFBD>s"
IDS_STRING10 "<22><><EFBFBD><EFBFBD><EFBFBD>̓e<CD83>X<EFBFBD>g<EFBFBD>ł<EFBFBD><C582>B"
IDS_STRING11 "<22><><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD><C682>B<EFBFBD><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD><C682>B<EFBFBD><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD><C682>B B<><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD> B<><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD> B<><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD> B<><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD> B<><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD> B<><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD> B<><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD> B<><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD> B<><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD> B<><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD> B<><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD> B<><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD> B<><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD> B<><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD> B<><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD> B<><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD> B<><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD> B<><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD> B<><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD> B<><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD> B<><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD> B<><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD> B<><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD> B<><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD> B<><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD> B<><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD> B<><42><EFBFBD>Ƃ<EFBFBD><C682><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƃ<EFBFBD>"
IDS_STRING12 "Initialization function <20><><EFBFBD>s"
IDS_STRING13 "ISpVoice::Speak <20><><EFBFBD>s"
IDS_STRING14 "ISpTTSEngine::GetOutputFormat <20><><EFBFBD>s"
IDS_STRING15 "SAPI feature(optional) events <20><><EFBFBD>s"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_STRING16 "ISpVoice::SetRate <20><><EFBFBD>s"
IDS_STRING17 "ISpVoice::GetRate <20><><EFBFBD>s"
IDS_STRING18 "ISpVoice::SetVolume <20><><EFBFBD>s"
IDS_STRING19 "ISpVoice::GetVolume <20><><EFBFBD>s"
IDS_STRING20 " <20>u<EFBFBD>b<EFBFBD>N<EFBFBD>}<7D>[<5B>N<EFBFBD>B <BOOKMARK MARK=""123""/> <20>e<EFBFBD>X<EFBFBD>g<EFBFBD>B"
IDS_STRING21 "123"
IDS_STRING22 "Engine bookmark <20><><EFBFBD>s"
IDS_STRING23 "<22>݂Ȃ<DD82><C882>񂱂<EFBFBD><F182B182>ɂ<EFBFBD><C982><EFBFBD>"
IDS_STRING24 "<22>݂Ȃ<DD82><C882><EFBFBD> <SILENCE MSEC=""8000""/> <20><><EFBFBD><EFBFBD><EFBFBD>ɂ<EFBFBD><C982><EFBFBD>"
IDS_STRING25 "Engine Silence tag <20><><EFBFBD>s"
IDS_STRING26 "<SAPI>ENGLISH LANGUAGE</SAPI>"
IDS_STRING27 "<SPELL>ENGLISH LANGUAGE</SPELL>"
IDS_STRING28 "Engine Spell <20><><EFBFBD>s"
IDS_STRING29 "Engine Pronounce <20><><EFBFBD>s"
IDS_STRING30 "<RATE SPEED=""-5""><3E><><EFBFBD><EFBFBD><EFBFBD>ɂ<EFBFBD><C982><EFBFBD></RATE>"
IDS_STRING31 "<RATE SPEED=""5""><3E><><EFBFBD><EFBFBD><EFBFBD>ɂ<EFBFBD><C982><EFBFBD></RATE>"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_STRING32 "Engine rate <20><><EFBFBD>s"
IDS_STRING33 "<VOLUME LEVEL=""100""><3E><><EFBFBD><EFBFBD><EFBFBD>ɂ<EFBFBD><C982><EFBFBD></VOLUME>"
IDS_STRING34 "<VOLUME LEVEL=""1""><3E><><EFBFBD><EFBFBD><EFBFBD>ɂ<EFBFBD><C982><EFBFBD></VOLUME>"
IDS_STRING35 "Engine volumeE <20><><EFBFBD>s"
IDS_STRING36 "<PITCH MIDDLE=""0""><3E><><EFBFBD><EFBFBD>ɂ<EFBFBD><C982><EFBFBD></PITCH>"
IDS_STRING37 "<PITCH MIDDLE=""-10""><3E><><EFBFBD><EFBFBD>ɂ<EFBFBD><C982><EFBFBD></PITCH>"
IDS_STRING38 "<PITCH MIDDLE=""+10""><3E><><EFBFBD><EFBFBD>ɂ<EFBFBD><C982><EFBFBD></PITCH>"
IDS_STRING39 "Engine pitch <20><><EFBFBD>s"
IDS_STRING41 "<22>݂Ȃ<DD82><C882><EFBFBD> <SILENCE MSEC=""%d""/> <20><><EFBFBD><EFBFBD><EFBFBD>ɂ<EFBFBD><C982><EFBFBD>"
IDS_STRING42 "<EMPH><3E><><EFBFBD><EFBFBD><EFBFBD>ɂ<EFBFBD><C982><EFBFBD></EMPH>"
IDS_STRING43 "<PRON SYM=""<22>\<5C><><EFBFBD><EFBFBD><EFBFBD>Z<EFBFBD>i<EFBFBD>J<EFBFBD>C<EFBFBD>X<EFBFBD>g<EFBFBD><67><EFBFBD>n<EFBFBD>J<EFBFBD>e<EFBFBD>`<60>X<EFBFBD>C""><3E><><EFBFBD><EFBFBD><EFBFBD>ɂ<EFBFBD><C982><EFBFBD></PRON>"
IDS_STRING44 "<RATE SPEED=""%d""><3E><><EFBFBD><EFBFBD><EFBFBD>ɂ<EFBFBD><C982><EFBFBD></RATE>"
IDS_STRING45 "<VOLUME LEVEL=""%d""><3E><><EFBFBD><EFBFBD><EFBFBD>ɂ<EFBFBD><C982><EFBFBD></VOLUME>"
IDS_STRING46 "<PITCH MIDDLE=""%d""><3E><><EFBFBD><EFBFBD><EFBFBD>ɂ<EFBFBD><C982><EFBFBD></PITCH>"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_STRING48 "<22>N<EFBFBD>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
IDS_STRING49 "<PARTOFSP PART=""noun"">%s</PARTOFSP>"
IDS_STRING50 "<PARTOFSP PART=""verb"">%s</PARTOFSP>"
IDS_STRING51 "Engine partofspeech <20><><EFBFBD>s"
IDS_STRING52 "<22>\<5C><><EFBFBD><EFBFBD><EFBFBD>Z<EFBFBD>i<EFBFBD>J<EFBFBD>C<EFBFBD>X<EFBFBD>g<EFBFBD><67><EFBFBD>n<EFBFBD>J<EFBFBD>e<EFBFBD>`<60>X<EFBFBD>C<EFBFBD>}<7D>`<60>Z<EFBFBD>`<60>~<7E>C<EFBFBD>g<EFBFBD>C<EFBFBD>J<EFBFBD>C<EFBFBD>T<EFBFBD>J<EFBFBD>J<EFBFBD><4A><EFBFBD>g<EFBFBD>Z<EFBFBD>C<EFBFBD>C<EFBFBD>\<5C>C<EFBFBD>~<7E>L<EFBFBD>j<EFBFBD>~<7E>C"
IDS_STRING53 " <BOOKMARK MARK='1234'/><3E><><EFBFBD>̕<EFBFBD><CC95><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̓<EFBFBD><CD83>A<EFBFBD><41><EFBFBD>^<5E>C<EFBFBD><43><EFBFBD>̑<EFBFBD><CC91>x<EFBFBD>Ɖ<EFBFBD><C689>ʃe<CA83>X<EFBFBD>g<EFBFBD>Ŏg<C58E><67><EFBFBD>܂<EFBFBD><DC82>B<EFBFBD><42><EFBFBD>x<EFBFBD>Ɖ<EFBFBD><C689>ʂ͒<CA82><CD92>ɍ<EFBFBD><C98D><EFBFBD>܂<EFBFBD><DC82>B<EFBFBD>G<EFBFBD><47><EFBFBD>W<EFBFBD><57><EFBFBD>́A<CD81><41><EFBFBD>̕ω<CC95><CF89><EFBFBD><EFBFBD>ǂݎ<C782><DD8E><EFBFBD><EFBFBD>܂<EFBFBD><DC82>B"
IDS_STRING54 "Real time SetRate <20><><EFBFBD>s"
IDS_STRING55 "Real time SetVolume <20><><EFBFBD>s"
IDS_STRING56 "<22><>"
IDS_STRING57 "<PRON SYM=""<22>N<EFBFBD>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>e<EFBFBD><65><EFBFBD>X<EFBFBD><58><EFBFBD>V<EFBFBD>C<EFBFBD>~<7E>J<EFBFBD>C<EFBFBD>X<EFBFBD>J<EFBFBD>C<EFBFBD>T<EFBFBD>J<EFBFBD><4A><EFBFBD><EFBFBD><EFBFBD>i<EFBFBD>e<EFBFBD>j<EFBFBD>V<EFBFBD>N<EFBFBD>J<EFBFBD><4A><EFBFBD>g<EFBFBD>Z<EFBFBD><5A><EFBFBD>m<EFBFBD>C<EFBFBD>~<7E>N<EFBFBD>C<EFBFBD>X<EFBFBD>C""><3E><></PRON>"
IDS_STRING59 "ISpVoice::Skip <20><><EFBFBD>s"
IDS_STRING60 "ISpVoice::SetOutput <20><><EFBFBD>s"
IDS_STRING61 "ISpVoice::WaitUntilDone <20><><EFBFBD>s"
IDS_STRING62 "ISpVoice::WaitForNotifyEvent <20><><EFBFBD>s"
IDS_STRING63 "<SAPI><3E><><EFBFBD><EFBFBD><EFBFBD>B <20>ɁB <20><><EFBFBD><EFBFBD><EFBFBD>B <20><><EFBFBD><EFBFBD><EFBFBD>B <20><><EFBFBD>B <20><EFBFBD>B <20><><EFBFBD><EFBFBD><EFBFBD>B <20>͂<EFBFBD><CD82>B <20><><EFBFBD><EFBFBD>B <20><><EFBFBD><EFBFBD>B<BOOKMARK MARK=""123""/><3E>B<EFBFBD><42><EFBFBD><EFBFBD><EFBFBD>B <20>ɁB <20><><EFBFBD><EFBFBD><EFBFBD>B <20><><EFBFBD><EFBFBD><EFBFBD>B <20><><EFBFBD>B <20><EFBFBD>B <20><><EFBFBD><EFBFBD><EFBFBD>B <20>͂<EFBFBD><CD82>B <20><><EFBFBD><EFBFBD>B <20><><EFBFBD><EFBFBD>B</SAPI>"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_STRING64 "<22>R<EFBFBD><52><EFBFBD>s<EFBFBD><73><EFBFBD>[<5B>^"
IDS_STRING65 "This is the TTS Compliance "
IDS_STRING66 "Non-SAPI tags <20><><EFBFBD>s"
IDS_STRING67 "<SOMEBOGUSTAGS> Non-SAPI tags </SOMEBOGUSTAGS>"
IDS_STRING68 "<SAPI><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82><EFBFBD><EFBFBD>H<EFBFBD>@<40>܂<EFBFBD><DC82><EFBFBD><EFBFBD>H</SAPI>"
IDS_STRING69 "<SAPI><EMPH><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>܂<EFBFBD><DC82><EFBFBD><EFBFBD>H<EFBFBD>@</EMPH><3E>܂<EFBFBD><DC82><EFBFBD><EFBFBD>H</SAPI>"
IDS_STRING70 "Engine Emph tag <20><><EFBFBD>s"
IDS_STRING71 "<22><><EFBFBD><EFBFBD><EFBFBD>i<EFBFBD>`<60>X<EFBFBD>C<EFBFBD>i<EFBFBD>g<EFBFBD>j<EFBFBD>~<7E>L<EFBFBD>}<7D>`<60>Z<EFBFBD>`<60>~<7E>C<EFBFBD>g<EFBFBD>C<EFBFBD>J<EFBFBD>C<EFBFBD>~<7E>L<EFBFBD>j<EFBFBD>~<7E>C<EFBFBD>`<60>~<7E>V<EFBFBD>J<EFBFBD>C<EFBFBD>g<EFBFBD>J<EFBFBD>j<EFBFBD>~<7E>L<EFBFBD>Z<EFBFBD>X<EFBFBD><58><EFBFBD>~<7E>i<EFBFBD>~<7E>\<5C>j<EFBFBD>`<60>J<EFBFBD>j<EFBFBD><6A><EFBFBD>~"
IDS_STRING74 "App Lexicon <20><><EFBFBD>s"
IDS_STRING75 "User Lexicon <20><><EFBFBD>s"
IDS_STRING76 "<22>n<EFBFBD><6E>"
IDS_STRING77 "TTSSymToPhoneId <20><><EFBFBD>s"
IDS_STRING78 "Out of memory!"
IDS_STRING79 "ISpStream::Seek <20><><EFBFBD>s"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_STRING81 "SPCreateStreamOnHGlobal or create CTestStream <20><><EFBFBD>s"
IDS_STRING82 "GetAmpFromSamples <20><><EFBFBD>s"
IDS_STRING83 "GetWStrFromRes <20><><EFBFBD>s"
IDS_STRING84 "new CSpStreamFormat or AssignFormat <20><><EFBFBD>s"
IDS_STRING85 "CoCreateInstance <20><><EFBFBD>s"
IDS_STRING86 "GetPronunciations <20><><EFBFBD>s"
IDS_STRING87 "AddPronunciation <20><><EFBFBD>s"
IDS_STRING88 "t_SpeakTwoStreams <20><><EFBFBD>s"
IDS_STRING89 "RemovePronunciation <20><><EFBFBD>s"
IDS_STRING90 "Get stream size <20><><EFBFBD>s"
IDS_STRING91 "GetFreqFromSamples <20><><EFBFBD>s"
IDS_STRING93 "SPBindToFile <20><><EFBFBD>s"
IDS_STRING94 "<22>N<EFBFBD>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>N<EFBFBD>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>e<EFBFBD><65><EFBFBD>X<EFBFBD><58><EFBFBD>V<EFBFBD><56><EFBFBD><EFBFBD><EFBFBD>i<EFBFBD>`<60>X<EFBFBD>C<EFBFBD>i<EFBFBD>g<EFBFBD>j<EFBFBD>~<7E>L<EFBFBD>}<7D>`<60>Z<EFBFBD>`<60>~<7E>C<EFBFBD>g<EFBFBD>C<EFBFBD>J<EFBFBD>C<EFBFBD>~<7E>L<EFBFBD>j<EFBFBD>~<7E>C<EFBFBD>`<60>~<7E>V<EFBFBD>J<EFBFBD>C<EFBFBD>g<EFBFBD>J<EFBFBD>j<EFBFBD>~<7E>L<EFBFBD>Z<EFBFBD>X<EFBFBD><58><EFBFBD>~<7E>i<EFBFBD>~<7E>\<5C>j<EFBFBD>`<60>J<EFBFBD>j<EFBFBD><6A><EFBFBD>~"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_STRING96 "RegRecursiveCopyKey <20><><EFBFBD>s"
IDS_STRING97 "RegRecursiveDeleteKey <20><><EFBFBD>s"
IDS_STRING98 "CreateAppLexicon <20><><EFBFBD>s"
IDS_STRING99 "<context id='date_mdy'>12/21/99</context><context id='date_mdy'>12.21.00</context> <context id='date_mdy'>12-21-9999</context>"
IDS_STRING100 "<context id='date_dmy'>21/12/00</context><context id='date_dmy'>21.12.33</context><context id='date_dmy'>21-12-1999</context>"
IDS_STRING101 "<context id='date_ymd'>99/12/21</context><context id='date_ymd'>99.12.21</context> <context id='date_ymd'>1999-12-21</context>"
IDS_STRING102 "<context id='date_ym'>99-12</context><context id='date_ym'>1999.12</context><context id='date_ym'>99/12</context>"
IDS_STRING103 "<context id='date_my'>12-99</context><context id='date_my'>12.1999</context><context id='date_my'>12/99</context>"
IDS_STRING104 "<context id='date_dm'>21.12</context> <context id='date_dm'>21-12</context> <context id='date_dm'>21/12</context>"""
IDS_STRING105 "<context id='date_md'>12-21</context> <context id='date_md'>12.21</context> <context id='date_md'>12/21</context>"
IDS_STRING106 "<context ID = 'date_year'> 1999</context> <context ID = 'date_year'> 2001</context>"
IDS_STRING107 "<context id='time'>12:30:10</context><context id='time'>12:30</context><context id='time'>1'21""</context>"
IDS_STRING108 "<context id='number_cardinal'>3432</context>"
IDS_STRING109 "<context id='number_digit'>3432</context>"
IDS_STRING110 "<context id='number_fraction'>3/15</context>"
IDS_STRING111 "<context id='number_decimal'>423.12433</context>"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_STRING112 "<context id='phone_number'>(425)706-2693</context>"
IDS_STRING113 "<context id='currency'> \\ 12312.91</context>"
IDS_STRING114 "<context id='web_url'>http://www.Microsoft.com</context>"
IDS_STRING115 "<context id='email_address'>bob@microsoft.com</context>"
IDS_STRING116 "<context ID = 'address'><3E>X<EFBFBD>֔ԍ<D694><D48D>@996-8890<39>@<40><><EFBFBD><EFBFBD><EFBFBD>s<EFBFBD>`<60><><EFBFBD>Z<EFBFBD>{<7B>؁@1-5-6</context> "
IDS_STRING117 "<context ID = 'address_postal'> A2C 4X5</context> "
IDS_STRING118 "<CONTEXT ID = 'MS_My_Context'><3E>e<EFBFBD>X<EFBFBD>g</CONTEXT>"
IDS_STRING119 "MSN <20><><EFBFBD>[<5B><><EFBFBD>}<7D>K<EFBFBD>W<EFBFBD><57><EFBFBD><EFBFBD>MSN <20><><EFBFBD>[<5B><><EFBFBD><EFBFBD><EFBFBD>O<EFBFBD><4F><EFBFBD>X<EFBFBD>g<EFBFBD>̃T<CC83>[<5B>r<EFBFBD>X<EFBFBD>J<EFBFBD>n<EFBFBD>ɂ<EFBFBD><C982><EFBFBD><EFBFBD>A<EFBFBD><41><EFBFBD>[<5B>U<EFBFBD>[<5B>́A16,000<30><30><EFBFBD><EFBFBD><EFBFBD>z<EFBFBD><7A><EFBFBD><EFBFBD>[<5B><><EFBFBD>}<7D>K<EFBFBD>W<EFBFBD><57><EFBFBD>ƁA11,000<30>ȏ<EFBFBD><C88F>̃<EFBFBD><CC83>[<5B><><EFBFBD><EFBFBD><EFBFBD>O<EFBFBD><4F><EFBFBD>X<EFBFBD>g<EFBFBD>̏<EFBFBD><CC8F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>AMSN<53><4E><EFBFBD>ŗ<EFBFBD><C597>p<EFBFBD>ł<EFBFBD><C582><EFBFBD><EFBFBD><EFBFBD>ɂȂ<C982><C882>܂<EFBFBD><DC82>B My name is Frances Sandy Joseph Hill Alam Jr. I was born in <context id='date_mdy'>12/1/2006</context>, <context id='TIME'>12:30:11</context>pm on 123 St., St. Luis. I weight 6.23456789 lb I got my B.S., M.S., and Ph.D from Flintstone Univ. in Mars planet. I have created many 3D pictures. I have to pay $123123123123.5 tax every year. It costs about 85% of my income. Anyway, life is a box of M & M chocolate. Usually I watch DVD and listen MTV on VH1 between 3pm to 12am w/o Mathew. If you like, Go to http://www.DoesNotExist.com/ and send your comments to ttsengines@hotmail.com or call me at <context id='phone_number'>(888)888-CONTEXT</context>, or mail to: <context ID='address'>1845666 9th Ave. NE Earth, WA 98188 </context>."
IDS_STRING120 "GetEvents <20><><EFBFBD>s"
IDS_STRING121 "<22><><EFBFBD><EFBFBD><EFBFBD>i<EFBFBD>`<60>X<EFBFBD>C<EFBFBD>i<EFBFBD>g<EFBFBD>j<EFBFBD>~<7E>L<EFBFBD>}<7D>`<60>Z<EFBFBD>`<60>~<7E>C<EFBFBD>g<EFBFBD>C<EFBFBD>J<EFBFBD>C<EFBFBD>~<7E>L<EFBFBD>j<EFBFBD>~<7E>C<EFBFBD>`<60>~<7E>V<EFBFBD>J<EFBFBD>C<EFBFBD>g<EFBFBD>J<EFBFBD>j<EFBFBD>~<7E>L<EFBFBD>Z<EFBFBD>X<EFBFBD><58><EFBFBD>~<7E>i<EFBFBD>~<7E>\<5C>j<EFBFBD>`<60>J<EFBFBD>j<EFBFBD><6A><EFBFBD>~"
IDS_STRING122 "<22>N<EFBFBD>C<EFBFBD><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
END
#endif // Japanese resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Chinese (P.R.C.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
#ifdef _WIN32
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
#pragma code_page(936)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_STRING1 "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20"
IDS_STRING5 "SpeakStop <20><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܡ<EFBFBD>"
IDS_STRING6 "<22><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1B1BB><EFBFBD>ɵij<C9B5><C4B3>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD>г<EFBFBD><D0B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD><CDB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
IDS_STRING7 "SpeakDestroy <20><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܡ<EFBFBD>"
IDS_STRING8 "<22><><EFBFBD><EFBFBD><BOOKMARK MARK=""12""/> <20><><EFBFBD>硣"
IDS_STRING9 "SAPI required Events <20><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>"
IDS_STRING10 "<22><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>ԡ<EFBFBD>"
IDS_STRING11 "<22>úúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúúú<C3BA>"
IDS_STRING12 "<22><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܡ<EFBFBD>"
IDS_STRING13 "ISpVoice::Speak ʧ<>ܡ<EFBFBD>"
IDS_STRING14 "ISpTTSEngine::GetOutputFormat ʧ<>ܡ<EFBFBD>"
IDS_STRING15 "SAPI feature(optional) events <20><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_STRING16 "ISpVoice::SetRate ʧ<>ܡ<EFBFBD>"
IDS_STRING17 "ISpVoice::GetRate ʧ<>ܡ<EFBFBD>"
IDS_STRING18 "ISpVoice::SetVolume ʧ<>ܡ<EFBFBD>"
IDS_STRING19 "ISpVoice::GetVolume ʧ<>ܡ<EFBFBD>"
IDS_STRING20 " <20>顣ǩ<E9A1A3><C7A9> <BOOKMARK MARK=""123""/> <20><><EFBFBD>ԡ<EFBFBD>"
IDS_STRING21 "123"
IDS_STRING22 "Engine BOOKMARK <20><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>"
IDS_STRING23 "<22><><EFBFBD>ã<EFBFBD><C3A3><EFBFBD><EFBFBD>硣"
IDS_STRING24 "<22><><EFBFBD><EFBFBD> <SILENCE MSEC=""8000""/> <20><><EFBFBD>硣"
IDS_STRING25 "Engine Silence tag <20><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>"
IDS_STRING26 "<SAPI>ENGLISH LANGUAGE</SAPI>"
IDS_STRING27 "<SPELL>ENGLISH LANGUAGE</SPELL>"
IDS_STRING28 "Engine Spell tag <20><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>"
IDS_STRING29 "Engine Pron tag <20><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>"
IDS_STRING30 "<RATE SPEED=""-5""><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></RATE>"
IDS_STRING31 "<RATE SPEED=""5""><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></RATE>"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_STRING32 "Engine Rate <20><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>"
IDS_STRING33 "<VOLUME LEVEL=""100""><3E><><EFBFBD><EFBFBD></VOLUME>"
IDS_STRING34 "<VOLUME LEVEL=""1""><3E><><EFBFBD><EFBFBD></VOLUME>"
IDS_STRING35 "Engine Volume <20><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>"
IDS_STRING36 "<PITCH MIDDLE=""0""><3E><><EFBFBD><EFBFBD></PITCH>"
IDS_STRING37 "<PITCH MIDDLE=""-10""><3E><><EFBFBD><EFBFBD></PITCH>"
IDS_STRING38 "<PITCH MIDDLE=""+10""><3E><><EFBFBD><EFBFBD></PITCH>"
IDS_STRING39 "Engine Pitch <20><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>"
IDS_STRING41 "<22><><EFBFBD><EFBFBD> <SILENCE MSEC=""%d""/> <20><><EFBFBD>硣"
IDS_STRING42 "<EMPH><3E><><EFBFBD><EFBFBD></EMPH>"
IDS_STRING43 "<PRON SYM=""jiao 1 ao 4 nin 2 hao 3""><3E><><EFBFBD><EFBFBD></PRON>"
IDS_STRING44 "<RATE SPEED=""%d""><3E><><EFBFBD><EFBFBD></RATE>"
IDS_STRING45 "<VOLUME LEVEL=""%d""><3E><><EFBFBD><EFBFBD></VOLUME>"
IDS_STRING46 "<PITCH MIDDLE=""%d""><3E><><EFBFBD><EFBFBD></PITCH>"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_STRING48 "hao 3 kuai 4"
IDS_STRING49 "<PARTOFSP PART=""noun"">%s</PARTOFSP>"
IDS_STRING50 "<PARTOFSP PART=""verb"">%s</PARTOFSP>"
IDS_STRING51 "Engine Part Of Speech <20><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>"
IDS_STRING52 "shou 3 shu 4 mu 4 lu 4 di 4 zhei 5 wo 3 wu 2 lun 4 xi 1 fang 1 xiao 3 xie 3 she 2 ma 3 mao 1 meng 4 shao 4 nian 2"
IDS_STRING53 "<22><> <BOOKMARK MARK=""1234""/><3E><><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵʱ<CAB5><CAB1><EFBFBD>ʺ<EFBFBD><CABA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԡ<EFBFBD><D4A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʺ<EFBFBD><CABA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>м䱻<D0BC><E4B1BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD>Щ<EFBFBD><D0A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"
IDS_STRING54 "Engine Real time SetRate <20><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>"
IDS_STRING55 "Engine Real time SetVolume <20><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>"
IDS_STRING56 "<22><>"
IDS_STRING57 "<PRON SYM=""shan 4 liang 2 chao 1 yue 4 jing 1 chang 2 qi 4 che 1 chi 2 dao 4 shou 3 shu 4 mu 4 lu 4 di 4 zhei 5 wo 3 wu 2 lun 4 xi 1 fang 1 xiao 3 xie 3 she 2 ma 3 mao 1 meng 4 shao 4 nian 2 feng 1 fen 1 bie 2 fa 1 zhan 3""><3E><></PRON>"
IDS_STRING59 "ISpVoice::Skip ʧ<><CAA7>"
IDS_STRING60 "ISpVoice::SetOutput ʧ<><CAA7>"
IDS_STRING61 "ISpVoice::WaitUntilDone ʧ<><CAA7>"
IDS_STRING62 "ISpVoice::WaitForNotifyEvent ʧ<><CAA7>"
IDS_STRING63 "<SAPI><3E><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>Ӷ<EFBFBD><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ġ<EFBFBD><C4A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E5A1A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߡ<EFBFBD><DFA1><EFBFBD><EFBFBD>Ӱˡ<D3B0><CBA1><EFBFBD><EFBFBD>Ӿš<D3BE> <20><><EFBFBD><EFBFBD>ʮ<EFBFBD><CAAE> <BOOKMARK MARK=""123""/><3E><> <20><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD>Ӷ<EFBFBD><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ġ<EFBFBD><C4A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E5A1A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ߡ<EFBFBD><DFA1><EFBFBD><EFBFBD>Ӱˡ<D3B0><CBA1><EFBFBD><EFBFBD>ӡ<EFBFBD> <20><><EFBFBD><EFBFBD>ʮ<EFBFBD><CAAE> </SAPI>"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_STRING64 "<22><>"
IDS_STRING65 "<22><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>Ķ<EFBFBD><C4B6><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>ԵIJ<D4B5><C4B2><EFBFBD>"
IDS_STRING66 "Engine Non SAPI tags <20><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>"
IDS_STRING67 "<SOMEBOGUSTAGS><3E><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>DZ<EFBFBD>׼<EFBFBD><D7BC><EFBFBD><EFBFBD></SOMEBOGUSTAGS>"
IDS_STRING68 "<SAPI><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?</SAPI>"
IDS_STRING69 "<SAPI><EMPH><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></EMPH><3E><><EFBFBD><EFBFBD>?</SAPI>"
IDS_STRING70 "Engine EMPH <20><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>"
IDS_STRING71 "jian 3 cha 2 chan 3 ye 4 shou 3 shu 4 mu 4 lu 4 di 4 zhei 5 wo 3 wu 2 lun 4 xi 1 fang 1 xiao 3 xie 3 she 2 ma 3 mao 1 meng 4 shao 4 nian 2 fo 2 chuang 4 ye 4 lun 2 chuan 2 fu 4 qin 1 kan 4 fei 1 fan 4 er 3 nu 3 li 4 a 1 fei 1 lu 4 di 4"
IDS_STRING74 "App Lexicon <20><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>"
IDS_STRING75 "User Lexicon <20><><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>"
IDS_STRING76 "<22><>"
IDS_STRING77 "TTSSymToPhoneId ʧ<><CAA7>"
IDS_STRING78 "<22>ڴ治<DAB4><E6B2BB>!"
IDS_STRING79 "ISpStream::Seek ʧ<><CAA7>"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_STRING81 "SPCreateStreamOnHGlobal or create CTestStream ʧ<><CAA7>"
IDS_STRING82 "GetAmpFromSamples ʧ<><CAA7>"
IDS_STRING83 "GetWStrFromRes ʧ<><CAA7>"
IDS_STRING84 "CSpStreamFormat or AssignFormat ʧ<><CAA7>"
IDS_STRING85 "CoCreateInstance ʧ<><CAA7>"
IDS_STRING86 "GetPronunciation ʧ<><CAA7>"
IDS_STRING87 "AddPronunciation ʧ<><CAA7>"
IDS_STRING88 "t_SpeakTwoStreams ʧ<><CAA7>"
IDS_STRING89 "RemovePronunciation ʧ<><CAA7>"
IDS_STRING90 "Get stream size ʧ<><CAA7>"
IDS_STRING91 "GetFreqFromSamples ʧ<><CAA7>"
IDS_STRING93 "SPBindToFile ʧ<><CAA7>"
IDS_STRING94 "fei 1 fei 1 shu 4 mu 4 lu 4 di 4 zhei 5 wo 3 wu 2 lun 4 xi 1 fang 1 xiao 3 xie 3 she 2 ma 3 mao 1 meng 4 ga 1 ma 3 gan 1 jing 4 tie 3 qi 4 ni 3 hao 3 hao 3"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_STRING96 "RegRecursiveCopyKey ʧ<><CAA7>"
IDS_STRING97 "RegRecursiveDeleteKey ʧ<><CAA7>"
IDS_STRING98 "CreateAppLexicon ʧ<><CAA7>"
IDS_STRING99 "<context id='date_mdy'>12/21/99</context><context id='date_mdy'>12.21.00</context> <context id='date_mdy'>12-21-9999</context>"
IDS_STRING100 "<context id='date_dmy'>21/12/00</context><context id='date_dmy'>21.12.33</context><context id='date_dmy'>21-12-1999</context>"
IDS_STRING101 "<context id='date_ymd'>99/12/21</context><context id='date_ymd'>99.12.21</context> <context id='date_ymd'>1999-12-21</context>"
IDS_STRING102 "<context id='date_ym'>99-12</context><context id='date_ym'>1999.12</context><context id='date_ym'>99/12</context>"
IDS_STRING103 "<context id='date_my'>12-99</context><context id='date_my'>12.1999</context><context id='date_my'>12/99</context>"
IDS_STRING104 "<context id='date_dm'>21.12</context> <context id='date_dm'>21-12</context> <context id='date_dm'>21/12</context>"""
IDS_STRING105 "<context id='date_md'>12-21</context> <context id='date_md'>12.21</context> <context id='date_md'>12/21</context>"
IDS_STRING106 "<context ID = 'date_year'> 1999</context> <context ID = 'date_year'> 2001</context>"
IDS_STRING107 "<context id='time'>12:30:10</context><context id='time'>12:30</context><context id='time'>1'21""</context>"
IDS_STRING108 "<context id='number_cardinal'>3432</context>"
IDS_STRING109 "<context id='number_digit'>3432</context>"
IDS_STRING110 "<context id='number_fraction'>3/15</context>"
IDS_STRING111 "<context id='number_decimal'>423.12433</context>"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_STRING112 "<context id='phone_number'>(425)706-2693</context>"
IDS_STRING113 "<context id='currency'> <20><> 12312.91</context>"
IDS_STRING114 "<context id='web_url'>http://www.Microsoft.com</context>"
IDS_STRING115 "<context id='email_address'>bob@microsoft.com</context>"
IDS_STRING116 "<context ID = 'address'><3E>й<EFBFBD><D0B9>Ϻ<EFBFBD><CFBA><EFBFBD><EFBFBD>Ͼ<EFBFBD>·178<37><38> 3 Ū 4 <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 203203</context> "
IDS_STRING117 "<context ID = 'address_postal'>A2C 4X5</context> "
IDS_STRING118 "<CONTEXT ID = 'MS_My_Context'><3E><><EFBFBD><EFBFBD></CONTEXT>"
IDS_STRING119 "<22>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>ֽд<D6BD>ɽ<EFBFBD><C9BD> <20>ҳ<EFBFBD><D2B3><EFBFBD><EFBFBD><EFBFBD><context id='date_mdy'>12/1/2006</context> <context id='TIME'>12:30:11</context>pm <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҳ<EFBFBD><D2B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֡<EFBFBD><D6A1><EFBFBD><EFBFBD><EFBFBD> 6.23456789lb<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> B.S. M.S. <20><> Ph.D. <20><>ÿ<EFBFBD><C3BF>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD> <20><>123123123123.5 <20><>˰<EFBFBD><CBB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Լռ85%<25>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EBA1A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Σ<EFBFBD><CEA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB> M&M <20>ɿ<EFBFBD><C9BF><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD>ҿ<EFBFBD>DVD<56><44>3pm<70><6D>12pm<70><6D><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EBBFB4><EFBFBD><EFBFBD> http://www.DoesNotExist.com<6F><6D> ͬʱ<CDAC><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>ttsengines@hotmial.com<6F><6D> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <context id='phone_number'>(888)888-CONTEXT</context> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <context ID='address'> <20>й<EFBFBD><D0B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>20<32>ţ<EFBFBD><C5A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̫<EFBFBD><CCAB>ϵ 98008<30><38></context>"
IDS_STRING120 "GetEvents ʧ<><CAA7>"
IDS_STRING121 "fei 1 fei 1 shu 4 mu 4 lu 4 di 4 zhei 5 wo 3 wu 2 lun 4 xi 1 fang 1 xiao 3 xie 3 she 2 ma 3 mao 1 meng 4 ga 1 ma 3 gan 1 jing 4 tie 3 qi 4 ni 3 hao 3 hao 3"
IDS_STRING122 "fei 1 fei 1 shu 4 mu 4 lu 4 di 4"
END
#endif // Chinese (P.R.C.) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""version.rc2""\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE DISCARDABLE
BEGIN
IDS_STRING1 "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20"
IDS_STRING5 "SpeakStop test failed."
IDS_STRING6 "This is a long string of text that will not complete because we release it in the next line of code. We expect the engine to clean-up correctly and not fault."
IDS_STRING7 "SpeakDestroy test failed."
IDS_STRING8 "Hello <BOOKMARK MARK=""12""/> world."
IDS_STRING9 "SAPI required Eventing test failed!"
IDS_STRING10 "This is a test."
IDS_STRING11 "blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah."
IDS_STRING12 "Initialization function failed. Skipping tests."
IDS_STRING13 "ISpVoice::Speak failed"
IDS_STRING14 "ISpTTSEngine::GetOutputFormat failed"
IDS_STRING15 "SAPI feature Eventing test failed!"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_STRING16 "ISpVoice::SetRate failed"
IDS_STRING17 "ISpVoice::GetRate failed"
IDS_STRING18 "ISpVoice::SetVolume failed"
IDS_STRING19 "ISpVoice::GetVolume failed"
IDS_STRING20 " Book. mark. <BOOKMARK MARK='123'/> test1."
IDS_STRING21 "123"
IDS_STRING22 "Engine bookmark test failed."
IDS_STRING23 "Hello world."
IDS_STRING24 "Hello <SILENCE MSEC=""8000""/> world."
IDS_STRING25 "Engine Silence tag test failed!"
IDS_STRING26 "<SAPI>ENGLISH LANGUAGE</SAPI>"
IDS_STRING27 "<SPELL>ENGLISH LANGUAGE</SPELL>"
IDS_STRING28 "Engine Spell test failed!"
IDS_STRING29 "Engine Pronounce test failed!"
IDS_STRING30 "<RATE SPEED=""-5"">hello world</RATE>"
IDS_STRING31 "<RATE SPEED=""5"">hello world</RATE>"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_STRING32 "Engine rate test failed!"
IDS_STRING33 "<VOLUME LEVEL=""100"">hello</VOLUME>"
IDS_STRING34 "<VOLUME LEVEL=""1"">hello</VOLUME>"
IDS_STRING35 "Engine volume test failed!"
IDS_STRING36 "<PITCH MIDDLE=""0"">a</PITCH>"
IDS_STRING37 "<PITCH MIDDLE=""-10"">a</PITCH>"
IDS_STRING38 "<PITCH MIDDLE=""+10"">a</PITCH>"
IDS_STRING39 "Engine pitch test failed!"
IDS_STRING41 "Hello <SILENCE MSEC=""%d""/> world."
IDS_STRING42 "<EMPH>hello</EMPH>"
IDS_STRING43 "<PRON SYM=""aa n th ow p ow l ow jh iy"">hello</PRON>"
IDS_STRING44 "<RATE SPEED=""%d"">hello</RATE>"
IDS_STRING45 "<VOLUME LEVEL=""%d"">hello</VOLUME>"
IDS_STRING46 "<PITCH MIDDLE=""%d"">hello</PITCH>"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_STRING48 "h l ow"
IDS_STRING49 "<PARTOFSP PART=""noun"">%s</PARTOFSP>"
IDS_STRING50 "<PARTOFSP PART=""verb"">%s</PARTOFSP>"
IDS_STRING51 "Engine partofspeech test failed!"
IDS_STRING52 "n ow n p r ow n ow aa ae ah ao aw b ch eh er"
IDS_STRING53 "This <BOOKMARK MARK='1234'/>string is used in the real time rate and volume tests. It's rate and volume are adjusted mid stream. Engines should pick these changes up."
IDS_STRING54 "Real time SetRate test failed!"
IDS_STRING55 "Real time SetVolume test failed."
IDS_STRING56 "a"
IDS_STRING57 "<PRON SYM=""aa n th ow p ow l ow jh iy aa n th ow p ow l ow jh iy aa n th ow p ow l ow jh iy"">a</PRON>"
IDS_STRING59 "ISpVoice::Skip failed"
IDS_STRING60 "ISpVoice::SetOutput failed"
IDS_STRING61 "ISpVoice::WaitUntilDone failed"
IDS_STRING62 "ISpVoice::WaitForNotifyEvent failed"
IDS_STRING63 "<SAPI>one. two. three. four. five. six. seven. eight. nine. ten. <BOOKMARK MARK=""123""/>bookmark event. one. two. three. four. five. six. seven. eight. nine. ten. </SAPI>"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_STRING64 "Computer"
IDS_STRING65 "This is the TTS Compliance Test"
IDS_STRING66 "Non-SAPI tags Test Failed"
IDS_STRING67 "<SOMEBOGUSTAGS> Non-SAPI tags test </SOMEBOGUSTAGS>"
IDS_STRING68 "<SAPI>Do you hear me?</SAPI>"
IDS_STRING69 "<SAPI><EMPH>Do you hear</EMPH>me?</SAPI>"
IDS_STRING70 "Engine Emph tag test failed"
IDS_STRING71 "dh aa n th ow p ow l ow jh iy aa n th ow p ow l ow jh iy aa n th ow p ow l ow jh ch ow ao ah ow ow p ow l ow jh ch ow ao ah ow"
IDS_STRING74 "App Lexicon test failed"
IDS_STRING75 "User Lexicon test failed!"
IDS_STRING76 "test"
IDS_STRING77 "TTSSymToPhoneId failed"
IDS_STRING78 "Out of memory!"
IDS_STRING79 "ISpStream::Seek failed"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_STRING81 "SPCreateStreamOnHGlobal or create CTestStream failed"
IDS_STRING82 "GetAmpFromSamples failed"
IDS_STRING83 "GetWStrFromRes failed"
IDS_STRING84 "new CSpStreamFormat or AssignFormat failed"
IDS_STRING85 "CoCreateInstance failed"
IDS_STRING86 "GetPronunciations failed"
IDS_STRING87 "AddPronunciation failed"
IDS_STRING88 "t_SpeakTwoStreams failed"
IDS_STRING89 "RemovePronunciation failed"
IDS_STRING90 "Get stream size failed"
IDS_STRING91 "GetFreqFromSamples failed"
IDS_STRING93 "SPBindToFile failed"
IDS_STRING94 "h eh l ow w er l d h eh l ow w er l d h eh l ow w er l d h eh l ow w er l d"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_STRING96 "RegRecursiveCopyKey failed"
IDS_STRING97 "RegRecursiveDeleteKey failed"
IDS_STRING98 "CreateAppLexicon failed"
IDS_STRING99 "<context id='date_mdy'>12/21/99</context><context id='date_mdy'>12.21.00</context> <context id='date_mdy'>12-21-9999</context>"
IDS_STRING100 "<context id='date_dmy'>21/12/00</context><context id='date_dmy'>21.12.33</context><context id='date_dmy'>21-12-1999</context>"
IDS_STRING101 "<context id='date_ymd'>99/12/21</context><context id='date_ymd'>99.12.21</context> <context id='date_ymd'>1999-12-21</context>"
IDS_STRING102 "<context id='date_ym'>99-12</context><context id='date_ym'>1999.12</context><context id='date_ym'>99/12</context>"
IDS_STRING103 "<context id='date_my'>12-99</context><context id='date_my'>12.1999</context><context id='date_my'>12/99</context>"
IDS_STRING104 "<context id='date_dm'>21.12</context> <context id='date_dm'>21-12</context> <context id='date_dm'>21/12</context>"""
IDS_STRING105 "<context id='date_md'>12-21</context> <context id='date_md'>12.21</context> <context id='date_md'>12/21</context>"
IDS_STRING106 "<context ID = 'date_year'> 1999</context> <context ID = 'date_year'> 2001</context>"
IDS_STRING107 "<context id='time'>12:30:10</context><context id='time'>12:30</context><context id='time'>1'21""</context>"
IDS_STRING108 "<context id='number_cardinal'>3432</context>"
IDS_STRING109 "<context id='number_digit'>3432</context>"
IDS_STRING110 "<context id='number_fraction'>3/15</context>"
IDS_STRING111 "<context id='number_decimal'>423.12433</context>"
END
STRINGTABLE DISCARDABLE
BEGIN
IDS_STRING112 "<context id='phone_number'>(425)706-2693</context>"
IDS_STRING113 "<context id='currency'>$12312.90</context>"
IDS_STRING114 "<context id='web_url'>http://www.Microsoft.com</context>"
IDS_STRING115 "<context id='email_address'>bob@microsoft.com</context>"
IDS_STRING116 "<context ID = 'address'>One Microsoft Way, Redmond, WA, 98052</context> "
IDS_STRING117 "<context ID = 'address_postal'> A2C 4X5</context> "
IDS_STRING118 "<CONTEXT ID = 'MS_My_Context'> text </CONTEXT>"
IDS_STRING119 "My name is Frances Sandy Joseph Hill Alam Jr. I was born in <context id='date_mdy'>12/1/2006</context>, <context id='TIME'>12:30:11</context>pm on 123 St., St. Luis. I weight 6.23456789 lb I got my B.S., M.S., and Ph.D from Flintstone Univ. in Mars planet. I have created many 3D pictures. I have to pay $123123123123.5 tax every year. It costs about 85% of my income. Anyway, life is a box of M & M chocolate. Usually I watch DVD and listen MTV on VH1 between 3pm to 12am w/o Mathew. If you like, Go to http://www.DoesNotExist.com/ and send your comments to ttsengines@hotmail.com or call me at <context id='phone_number'>(888)888-CONTEXT</context>, or mail to: <context ID='address'>1845666 9th Ave. NE Earth, WA 98188 </context>."
IDS_STRING120 "GetEvents failed"
IDS_STRING121 "aa dh aa n th ow p ow l ow jh iy aa n th ow p ow l ow jh iy aa n th ow p ow l ow jh ch ow ao ah ow ow p ow l ow jh ch ow ao ah ow"
IDS_STRING122 "aa dh aa n th ow"
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#include "version.rc2"
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,44 @@
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", "\0"
VALUE "CompanyName", "Microsoft Corp.\0"
VALUE "FileDescription", "Microsoft TTS Compliance Test Tool\0"
VALUE "FileVersion", "1, 0, 0, 1\0"
VALUE "InternalName", "ttscomp\0"
VALUE "LegalCopyright", "Copyright (c) Microsoft Corporation. All rights reserved.\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "ttscomp.dll\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "Microsoft Corp. SAPI5 samples\0"
VALUE "ProductVersion", "1, 0, 0, 1\0"
VALUE "SpecialBuild", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
#endif // !_MAC