diff options
| author | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
|---|---|---|
| committer | Joe Ludwig <[email protected]> | 2013-06-26 15:22:04 -0700 |
| commit | 39ed87570bdb2f86969d4be821c94b722dc71179 (patch) | |
| tree | abc53757f75f40c80278e87650ea92808274aa59 /mp/src/public/phonemeextractor/phonemeextractor.h | |
| download | source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip | |
First version of the SOurce SDK 2013
Diffstat (limited to 'mp/src/public/phonemeextractor/phonemeextractor.h')
| -rw-r--r-- | mp/src/public/phonemeextractor/phonemeextractor.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/mp/src/public/phonemeextractor/phonemeextractor.h b/mp/src/public/phonemeextractor/phonemeextractor.h new file mode 100644 index 00000000..c6d68b10 --- /dev/null +++ b/mp/src/public/phonemeextractor/phonemeextractor.h @@ -0,0 +1,50 @@ +//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $NoKeywords: $
+//=============================================================================//
+
+#ifndef PHONEMEEXTRACTOR_H
+#define PHONEMEEXTRACTOR_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "interface.h"
+
+class CSentence;
+
+typedef enum
+{
+ SPEECH_API_SAPI = 0,
+ SPEECH_API_LIPSINC,
+} PE_APITYPE;
+
+typedef enum
+{
+ SR_RESULT_NORESULT = 0,
+ SR_RESULT_ERROR,
+ SR_RESULT_SUCCESS,
+ SR_RESULT_FAILED
+} SR_RESULT;
+
+abstract_class IPhonemeExtractor
+{
+public:
+ virtual PE_APITYPE GetAPIType() const = 0;
+
+ // Used for menus, etc
+ virtual char const *GetName() const = 0;
+
+ virtual SR_RESULT Extract(
+ const char *wavfile,
+ int numsamples,
+ void (*pfnPrint)( PRINTF_FORMAT_STRING const char *fmt, ... ),
+ CSentence& inwords,
+ CSentence& outwords ) = 0;
+};
+
+#define VPHONEME_EXTRACTOR_INTERFACE "PHONEME_EXTRACTOR_001"
+
+#endif // PHONEMEEXTRACTOR_H
|