# HG changeset patch # User hgs # Date 1285760705 -10800 # Node ID 55e13740998cdebb77b44d30dd1684afb07492ab # Parent 46385f45ba4ee9b1667c483a7fa279f53fc5d516 201038 diff -r 46385f45ba4e -r 55e13740998c ocrsrv_stub/sysdef_1_4_0.dtd --- a/ocrsrv_stub/sysdef_1_4_0.dtd Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 46385f45ba4e -r 55e13740998c ocrsrv_stub/sysdef_1_5_1.dtd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ocrsrv_stub/sysdef_1_5_1.dtd Wed Sep 29 14:45:05 2010 +0300 @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 46385f45ba4e -r 55e13740998c omasuplasnconverterstubimpl/package_definition.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/omasuplasnconverterstubimpl/package_definition.xml Wed Sep 29 14:45:05 2010 +0300 @@ -0,0 +1,10 @@ + + + + + + + + + + diff -r 46385f45ba4e -r 55e13740998c omasuplasnconverterstubimpl/package_map.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/omasuplasnconverterstubimpl/package_map.xml Wed Sep 29 14:45:05 2010 +0300 @@ -0,0 +1,1 @@ + diff -r 46385f45ba4e -r 55e13740998c power_save_display_mode_stub/sysdef_1_4_0.dtd --- a/power_save_display_mode_stub/sysdef_1_4_0.dtd Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 46385f45ba4e -r 55e13740998c power_save_display_mode_stub/sysdef_1_5_1.dtd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/power_save_display_mode_stub/sysdef_1_5_1.dtd Wed Sep 29 14:45:05 2010 +0300 @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/adaptationhwdevice/bwins/asrsadaptationhwdeviceu.def --- a/srsfenginestub/adaptationhwdevice/bwins/asrsadaptationhwdeviceu.def Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -EXPORTS - ??1CASRSAdaptHwDevice@@UAE@XZ @ 1 NONAME ; CASRSAdaptHwDevice::~CASRSAdaptHwDevice(void) - ??1CASRSHwDevice@@UAE@XZ @ 2 NONAME ; CASRSHwDevice::~CASRSHwDevice(void) - ?CancelAdaptation@CASRSAdaptHwDevice@@QAEXXZ @ 3 NONAME ; void CASRSAdaptHwDevice::CancelAdaptation(void) - ?Clear@CASRSAdaptHwDevice@@UAEXXZ @ 4 NONAME ; void CASRSAdaptHwDevice::Clear(void) - ?Clear@CASRSHwDevice@@UAEXXZ @ 5 NONAME ; void CASRSHwDevice::Clear(void) - ?CustomInterface@CASRSAdaptHwDevice@@UAEPAXVTUid@@@Z @ 6 NONAME ; void * CASRSAdaptHwDevice::CustomInterface(class TUid) - ?CustomInterface@CASRSHwDevice@@UAEPAXVTUid@@@Z @ 7 NONAME ; void * CASRSHwDevice::CustomInterface(class TUid) - ?InitializeL@CASRSAdaptHwDevice@@UAEXXZ @ 8 NONAME ; void CASRSAdaptHwDevice::InitializeL(void) - ?InitializeL@CASRSHwDevice@@UAEXXZ @ 9 NONAME ; void CASRSHwDevice::InitializeL(void) - ?NewL@CASRSAdaptHwDevice@@SAPAV1@AAVMASRAdaptationHwDeviceObserver@@@Z @ 10 NONAME ; class CASRSAdaptHwDevice * CASRSAdaptHwDevice::NewL(class MASRAdaptationHwDeviceObserver &) - ?NewL@CASRSHwDevice@@SAPAV1@XZ @ 11 NONAME ; class CASRSHwDevice * CASRSHwDevice::NewL(void) - ?StartAdaptationL@CASRSAdaptHwDevice@@QAEXABVTDesC8@@AAVCSIModelBank@@AAVCSIPronunciation@@W4TLanguage@@@Z @ 12 NONAME ; void CASRSAdaptHwDevice::StartAdaptationL(class TDesC8 const &, class CSIModelBank &, class CSIPronunciation &, enum TLanguage) - diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/adaptationhwdevice/eabi/asrsadaptationhwdeviceu.def --- a/srsfenginestub/adaptationhwdevice/eabi/asrsadaptationhwdeviceu.def Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -EXPORTS - _ZN13CASRSHwDevice11InitializeLEv @ 1 NONAME - _ZN13CASRSHwDevice15CustomInterfaceE4TUid @ 2 NONAME - _ZN13CASRSHwDevice4NewLEv @ 3 NONAME - _ZN13CASRSHwDevice5ClearEv @ 4 NONAME - _ZN13CASRSHwDeviceD0Ev @ 5 NONAME - _ZN13CASRSHwDeviceD1Ev @ 6 NONAME - _ZN13CASRSHwDeviceD2Ev @ 7 NONAME - _ZN18CASRSAdaptHwDevice11InitializeLEv @ 8 NONAME - _ZN18CASRSAdaptHwDevice15CustomInterfaceE4TUid @ 9 NONAME - _ZN18CASRSAdaptHwDevice16CancelAdaptationEv @ 10 NONAME - _ZN18CASRSAdaptHwDevice16StartAdaptationLERK6TDesC8R12CSIModelBankR16CSIPronunciation9TLanguage @ 11 NONAME - _ZN18CASRSAdaptHwDevice4NewLER30MASRAdaptationHwDeviceObserver @ 12 NONAME - _ZN18CASRSAdaptHwDevice5ClearEv @ 13 NONAME - _ZN18CASRSAdaptHwDeviceD0Ev @ 14 NONAME - _ZN18CASRSAdaptHwDeviceD1Ev @ 15 NONAME - _ZN18CASRSAdaptHwDeviceD2Ev @ 16 NONAME - _ZTI13CASRSHwDevice @ 17 NONAME ; ## - _ZTI18CASRSAdaptHwDevice @ 18 NONAME ; ## - _ZTV13CASRSHwDevice @ 19 NONAME ; ## - _ZTV18CASRSAdaptHwDevice @ 20 NONAME ; ## - diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/adaptationhwdevice/group/asradaptationhwdevicestub.mmp --- a/srsfenginestub/adaptationhwdevice/group/asradaptationhwdevicestub.mmp Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for AdaptationHwDeviceStub -* -*/ - - - - -#include - -#if defined( WINS ) || defined( WINSCW ) -TARGET asrsadaptationhwdevice.dll -#else -TARGET asrsadaptationhwdevice_stub.dll -#endif - -TARGETTYPE DLL -UID 0x1000008D 0x101FF938 // UID: - -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE asrsadaptationhwdevice.cpp - -SOURCEPATH ../../common/src -SOURCE asrshwdevice.cpp - -USERINCLUDE ../inc ../src -USERINCLUDE ../../common/inc - -// This is a SYSTEMINCLUDE macro containing the middleware -// layer specific include directories -APP_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE ../../common/inc - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY asrsadaptationhwdevice.lib - -// On ROM dll name is without the _stub part so that it can easily be -// replaced with the real dll -LINKAS asrsadaptationhwdevice.dll - -CAPABILITY CAP_GENERAL_DLL diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/adaptationhwdevice/group/bld.inf --- a/srsfenginestub/adaptationhwdevice/group/bld.inf Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for AdaptationHwDeviceStub -* -*/ - - - - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -asradaptationhwdevicestub.mmp - -// End of File \ No newline at end of file diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/adaptationhwdevice/src/asrsadaptationhwdevice.cpp --- a/srsfenginestub/adaptationhwdevice/src/asrsadaptationhwdevice.cpp Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,157 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: SIND hardware device for model adaptation -* -*/ - - - - - - -// INCLUDE FILES -#include "asrsadaptationhwdevice.h" - - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CASRSAdaptHwDevice::CASRSAdaptHwDevice -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// - -CASRSAdaptHwDevice::CASRSAdaptHwDevice( - MASRAdaptationHwDeviceObserver& anObserver - ) -: iObserver( anObserver ), - iAlgorithm( NULL ), - iIsInitialised( EFalse ), - iReserved( 0 ) - { - // Nothing - } - -// ----------------------------------------------------------------------------- -// CASRSAdaptHwDevice::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CASRSAdaptHwDevice::ConstructL(void) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSAdaptHwDevice::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CASRSAdaptHwDevice* CASRSAdaptHwDevice::NewL( - MASRAdaptationHwDeviceObserver& anObserver ) // The observer - { - CASRSAdaptHwDevice* self = new( ELeave ) CASRSAdaptHwDevice( anObserver ); - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - - return self; - } - - -// ----------------------------------------------------------------------------- -// CASRSAdaptHwDevice::~CASRSAdaptHwDevice -// Destructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CASRSAdaptHwDevice::~CASRSAdaptHwDevice() - { - } - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// ----------------------------------------------------------------------------- -// CustomInterface -// Provides clients with an interface, given an UID. -// Returns: NULL - No custom interface with that UID -// ----------------------------------------------------------------------------- -// -EXPORT_C TAny* CASRSAdaptHwDevice::CustomInterface( - TUid /*aInterfaceId*/ ) // UID of the interface - { - return NULL; - } - -// ----------------------------------------------------------------------------- -// InitializeL -// Initializes the device. Subsequent calls reset the device. -// Returns: none -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSAdaptHwDevice::InitializeL(void) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// Clear -// Clears the device -// Returns: None -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSAdaptHwDevice::Clear(void) - { - } - -// ----------------------------------------------------------------------------- -// Start the adaptation. It will adapt the acoustic models given the feature vector set and phoneme sequences -// of a correctly recognized utterance -// -// Returns: None -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSAdaptHwDevice::StartAdaptationL ( const TDesC8& /*aAdaptationData*/, - CSIModelBank& /*aModelBank*/, - CSIPronunciation& /*aPronunciation*/, - TLanguage /*aLanguage*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CancelAdaptation -// Cancels Adaptation . No callback is sent to the client. -// Returns: None -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSAdaptHwDevice::CancelAdaptation() - { - } - - - -// ================================ OTHER EXPORTED FUNCTIONS =============================== - -// for DLL goodness -#ifndef EKA2 -GLDEF_C TInt E32Dll( TDllReason /*aReason*/ ) - { - return KErrNone; - } -#endif - - -// End of File diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/adaptationhwdevice/src/asrsadaptationhwdevice.h --- a/srsfenginestub/adaptationhwdevice/src/asrsadaptationhwdevice.h Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,216 +0,0 @@ -/* -* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ARM hardware device for grammar compiling -* -*/ - - - - - - -#ifndef ASRADAPTATIONHWDEVICE_H -#define ASRADAPTATIONHWDEVICE_H - -// INCLUDES -#include -#include - -// Implementation -class CAsrAdaptationAlgorithm; - -// CLASS DECLARATION -/** -* Callback class for adaptation. -* -* !!@lib asrsadaptationhwdevice.lib -* @since 2.8 -*/ -class MASRAdaptationHwDeviceObserver - { -public: - /**!!! - * - * @since 2.8 - * @param none - * @return - */ - - virtual void MaahdAdaptationComplete(TInt aError) = 0; -}; - - - -/** -* Adaptation class -* -* !!@lib asrsadaptationhwdevice.lib -* @since 2.8 -*/ -class CASRSAdaptHwDevice : public CASRSHwDevice - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CASRSAdaptHwDevice* NewL( - MASRAdaptationHwDeviceObserver& aObserver ); - - /** - * Destructor. - */ - IMPORT_C virtual ~CASRSAdaptHwDevice(); - - public: // New functions - - /** - * Retrieve a custom interface - * @since 2.8 - * @param none - * @return Pointer to a custom interface - */ - IMPORT_C TAny* CustomInterface(TUid aInterfaceId); - - /** - * Initializes the device. Subsequent calls reset the device. - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C void InitializeL(); - - /** - * Clears the device. - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C void Clear(); - - - /** - * Start the adaptation. It will adapt the acoustic models given the feature vector set and phoneme sequences - * of a correctly recognized utterance - * @since 2.8 - * @param aAdaptationData: Buffer that stores data(feature vector) for the speaker adaptation. - * @param aModelBank: Model bank, which is the acoustic model to be adapted. - * @param aPronunciation: Pronunciation of the adaptation utterance. - * @param aLanguage : adaptation language - * @return none - */ - IMPORT_C void StartAdaptationL(const TDesC8& aAdaptationData, - CSIModelBank& aModelBank, - CSIPronunciation& aPronunciation,TLanguage aLanguage); - - - - /** - * Cancel the Adaptation process. No callback is sent to the client. - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C void CancelAdaptation(); - - /** - * Cancels adaptation. No callback is sent to the client. - * @since 2.8 - * @param none - * @return none - */ -/* IMPORT_C void CancelCombination();*/ - - public: // Functions from base classes - - /** - * From ?base_class ?member_description. - * @since ?Series60_version - * @param ?arg1 ?description - * @return ?description - */ - //?type ?member_function( ?type ?arg1 ); - - protected: // New functions - - /** - * ?member_description. - * @since ?Series60_version - * @param ?arg1 ?description - * @return ?description - */ - //?type ?member_function( ?type ?arg1 ); - - protected: // Functions from base classes - - /** - * From ?base_class ?member_description - */ - //?type ?member_function(); - - private: - - /** - * C++ default constructor. - */ - CASRSAdaptHwDevice(MASRAdaptationHwDeviceObserver& anObserver); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - - - - // Prohibit copy constructor if not deriving from CBase. - // CASRGrCompilerHwDevice( const CASRGrCompilerHwDevice& ); - // Prohibit assigment operator if not deriving from CBase. - // CASRGrCompilerHwDevice& operator=( const CASRGrCompilerHwDevice& ); - - public: // Data - // ?one_line_short_description_of_data - //?data_declaration; - - protected: // Data - // ?one_line_short_description_of_data - //?data_declaration; - - private: // Data - // pronunciation tree builder algorithm - // CPTBAlgorithm* iPtb; - - // The observer - MASRAdaptationHwDeviceObserver& iObserver; - - // Implementation-specific functions and data - CAsrAdaptationAlgorithm *iAlgorithm; - - // Has Initialize() been called - TBool iIsInitialised; - - // Reserved pointer for future extension. - TAny* iReserved; - - public: // Friend classes - //?friend_class_declaration; - protected: // Friend classes - //?friend_class_declaration; - private: // Friend classes - //?friend_class_declaration; - - }; -#endif // ?INCLUDE_H - -// End of File diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/common/inc/asrshwdevice.h --- a/srsfenginestub/common/inc/asrshwdevice.h Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,149 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: TTP hardware device -* -*/ - - - - - - -#ifndef ASRHWDEVICE_H -#define ASRHWDEVICE_H - -// INCLUDES -#include - -// CLASS DECLARATION - -/** -* Base class for all hw devices -* -* -* @lib asrsadaptationhwdevice.lib -* @since 2.8 -*/ -class CASRSHwDevice : public CBase - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CASRSHwDevice* NewL(); - - /** - * Destructor. - */ - IMPORT_C virtual ~CASRSHwDevice(); - - public: // New functions - - /** - * Use to initilize HW device - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C virtual void InitializeL(); - - /** - * Use to clear HW device - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C virtual void Clear(); - - /** - * Use to get custom interface - * @since 2.8 - * @param aInterfaceId Identifier of the intercace implementation - * @return Pointer to the interface implementation or NULL. - */ - IMPORT_C virtual TAny* CustomInterface( TUid aInterfaceId ); - - public: // Functions from base classes - - /** - * From ?base_class ?member_description. - * @since ?Series60_version - * @param ?arg1 ?description - * @return ?description - */ - //?type ?member_function( ?type ?arg1 ); - - protected: // New functions - - /** - * ?member_description. - * @since ?Series60_version - * @param ?arg1 ?description - * @return ?description - */ - //?type ?member_function( ?type ?arg1 ); - - protected: // Functions from base classes - - /** - * From ?base_class ?member_description - */ - //?type ?member_function(); - - - - /** - * C++ default constructor. - */ - CASRSHwDevice(); - - private: - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - // Prohibit copy constructor if not deriving from CBase. - // ?classname( const ?classname& ); - // Prohibit assigment operator if not deriving from CBase. - // ?classname& operator=( const ?classname& ); - - public: // Data - // ?one_line_short_description_of_data - //?data_declaration; - - protected: // Data - // ?one_line_short_description_of_data - //?data_declaration; - - private: // Data - // ?one_line_short_description_of_data - //?data_declaration; - - // Reserved pointer for future extension - //TAny* iReserved; - - public: // Friend classes - //?friend_class_declaration; - protected: // Friend classes - //?friend_class_declaration; - private: // Friend classes - //?friend_class_declaration; - - }; - -#endif // ?INCLUDE_H - -// End of File diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/common/inc/nsssispeechrecognitiondataclient.h --- a/srsfenginestub/common/inc/nsssispeechrecognitiondataclient.h Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,213 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This file contains definition of the SISpeechRecognitionDataClient structure and API. -* -*/ - - - - - -#ifndef __SRSSIDATA_CLIENT_H__ -#define __SRSSIDATA_CLIENT_H__ - -// INCLUDES -#include - - -// FORWARD DECLARATION -class CSIResultSet; - - -// CLASS DECLARATION - -/** -* Class to encapsulate a client recognition result. -* The result is formulated for client consumption. -* -* @lib nsssispeechrecognitiondata.lib -* @since 2.5 -*/ - -class CSIClientResult : public CBase -{ -public: // Constructors and destructor - /** - * Destructor. - */ - IMPORT_C ~CSIClientResult(); - /** - * Two-phased constructor. - */ - IMPORT_C static CSIClientResult* NewL(); - IMPORT_C static CSIClientResult* NewLC(); - IMPORT_C static CSIClientResult* NewL(TSIGrammarID aGrammarID, TSIRuleID aRuleID); - IMPORT_C static CSIClientResult* NewLC(TSIGrammarID aGrammarID, TSIRuleID aRuleID); - - /** - * Use to set the grammar Id on the result. - * @since 2.5 - * @param aGrammarID - grammar identifier. - * @return None. - */ - IMPORT_C void SetGrammarID(TSIGrammarID aGrammarID); - - /** - * Use to retrieve the grammar Id of the result. - * @since 2.5 - * @param None. - * @return Grammar identifier. - */ - IMPORT_C TSIGrammarID GrammarID() const; - - /** - * Use to set the rule Id of the result. - * @since 2.5 - * @param aRuleID - rule identifier. - * @return None. - */ - IMPORT_C void SetRuleID(TSIRuleID aRuleID); - - /** - * Use to retrieve the rule Id of the result. - * @since 2.5 - * @param None. - * @return Rule identifier. - */ - IMPORT_C TSIRuleID RuleID() const; - -private: - void ConstructL(); - CSIClientResult(); - CSIClientResult(TSIGrammarID aGrammarID, TSIRuleID aRuleID); - -private: - TSIGrammarID iGrammarID; - TSIRuleID iRuleID; -}; - - -/** -* Class to encapsulate a client recogntion result set -* This is a lightweight result set formulated for client consumption -* -* @lib nsssispeechrecognitiondata.lib -* @since 2.5 -*/ - -class CSIClientResultSet : public CBase -{ -public: // Constructors and destructor - /** - * Destructor. - */ - IMPORT_C ~CSIClientResultSet(); - - /** - * Two-phased constructor. - */ - IMPORT_C static CSIClientResultSet* NewL(); - IMPORT_C static CSIClientResultSet* NewLC(); - - /** - * Use to add a result to the result set. - * @since 2.5 - * @param aResult - reference to the result object to be added. - * @return KErrNone, if the insertion is successful, otherwise one of the system wide error codes. - */ - IMPORT_C void AddL( const CSIClientResult* aResult); - - - /** - * Use to delete a result to the result set. - * @since 2.5 - * @param aIndex Index of . - * @return - */ - IMPORT_C void DeleteL(TInt aIndex) ; - /** - * Sets the maximum number of best matches (N-best) expected in the recognition result after recognition. - * @since 2.5 - * @param aMaxResults - the maximum number of matches expected in the recognition result. - * @return None. - */ - IMPORT_C void SetMaxResultsL(TInt aMaxResults); - - /** - * Use to retrieve the current value of the max number of expected after recognition. - * @since 2.5 - * @param None. - * @return The maximum number of best matches (N-best) expected in the recognition result. - */ - IMPORT_C TInt MaxResults() const; - - /** - * Use to retrieve a result at a given index within the result set. - * @since 2.5 - * @param None. - * @return Pointer to CSIClientResult object. - */ - IMPORT_C const CSIClientResult& AtL(TInt anIndex) const; - - /** - * Use to set the number of results actually returned after recogntion. - * @since 2.5 - * @param aResultCount - number of results returned by the recognizer. - * @return None. - */ - IMPORT_C void SetResultCount(TInt aResultCount); - - /** - * Use to retrieve the number of results actually returned after recogntion. - * @since 2.5 - * @param None. - * @return Number of results actually returned after recogntion. - */ - IMPORT_C TInt ResultCount() const; - - - IMPORT_C CSIResultSet& SIResultSet() const; - - - IMPORT_C void SetSIResultSet(CSIResultSet* aSIResultSet); - - /** - * Internalize to a data stream - * @since 2.8 - * @param aStream Data stream - * @return None - */ - IMPORT_C virtual void InternalizeL( RReadStream& aStream ); - - /** - * Externalize from a data stream - * @since 2.8 - * @param None - * @return aStream Data stream - */ - IMPORT_C virtual void ExternalizeL( RWriteStream& aStream ) const; - -private: - void ConstructL(); - CSIClientResultSet(); - -private: - TInt iMaxResults; - TInt iResultCount; - RPointerArray iResultArray; - CSIResultSet* iSIResultSet; -}; - -#endif - \ No newline at end of file diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/common/inc/nsssispeechrecognitiondatacommon.h --- a/srsfenginestub/common/inc/nsssispeechrecognitiondatacommon.h Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,228 +0,0 @@ -/* -* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This file contains common data shared between SISpeechRecognitionDataClient -* %version: 10 % -* and SISpeechRecognitionDataDevASR. -* -* Copyright © 2002-2006 Nokia Corporation. -*/ - - - - - -#ifndef NSSSISPEECHRECOGNITIONDATACOMMON_H -#define NSSSISPEECHRECOGNITIONDATACOMMON_H - -// INCLUDES -#include - -// For externalize/internalize -#include -// For -#include - -// TYPEDEFS -typedef TUint16 TSIModelBankID; -typedef TUint16 TSIModelID; - -typedef TUint16 TSILexiconID; -typedef TUint32 TSIPronunciationID; - -typedef TUint16 TSIGrammarID; -typedef TUint32 TSIRuleID; -typedef TUint8 TSIRuleVariantID; - -typedef RArray TSIPronunciationIDSequence; - -// Language array which is used as an element of another RArray -typedef RArray RLanguageArray; - -// CONSTANTS -const TSIPronunciationID KUndefinedPronounciationID = 0x0; - -const TSIModelBankID KInvalidModelBankID = 0x7fff; -const TSIModelID KInvalidModelID = 0x7fff; -const TSILexiconID KInvalidLexiconID = 0x7fff; -const TSIPronunciationID KInvalidPronunciationID=0x7fffffff; -const TSIGrammarID KInvalidGrammarID = 0x7fff; -const TSIRuleID KInvalidRuleID = 0x7fffffff; -const TSIRuleVariantID KInvalidRuleVariantID = 0x7f; - -// ASCII phonemes can't be longer than this. -const TInt KMaxPhonemeLength = 7; - -const TUint8 KPhonemeSeparator = '-'; - - - -// CONSTANTS -const TInt KUidAsrEventTrainReadyVal = 0x101FBF9E; -const TInt KUidAsrEventTrainVal = 0x101FBF9F; -const TInt KUidAsrEventAddPronunciationVal = 0x101FBFA0; -const TInt KUidAsrEventAddRuleVal = 0x101FBFA1; -const TInt KUidAsrEventLoadModelsVal = 0x101FBFA2; -const TInt KUidAsrEventLoadLexiconVal = 0x101FBFA3; -const TInt KUidAsrEventLoadGrammarVal = 0x101FBFA4; -const TInt KUidAsrEventRecognitionReadyVal = 0x101FBFA5; -const TInt KUidAsrEventRecognitionVal = 0x101FBFA6; -const TInt KUidAsrEventUnloadRuleVal = 0x101FBFA7; -const TInt KUidAsrEventRecordStartedVal = 0x101FBFA8; -const TInt KUidAsrEventRecordVal = 0x101FBFA9; -const TInt KUidAsrEventEouDetectedVal = 0x101FBFAA; -const TInt KUidAsrEventPlayStartedVal = 0x101FBFAB; -const TInt KUidAsrEventPlayVal = 0x101FBFAC; -const TInt KUidAsrEventCreateGrammarVal = 0x101FBFAD; -const TInt KUidAsrEventCreateLexiconVal = 0x101FBFAE; -const TInt KUidAsrEventCreateModelBankVal = 0x101FBFAF; -const TInt KUidAsrEventRemoveGrammarVal = 0x101FBFB0; -const TInt KUidAsrEventRemoveLexiconVal = 0x101FBFB1; -const TInt KUidAsrEventRemoveModelBankVal = 0x101FBFB2; -const TInt KUidAsrEventRemoveRuleVal = 0x101FBFB3; -const TInt KUidAsrEventRemovePronunciationVal = 0x101FBFB4; -const TInt KUidAsrEventRemoveModelVal = 0x101FBFB5; -const TInt KUidAsrEventGetAvailableStorageVal = 0x101FBFB6; -const TInt KUidAsrEventGetRuleValidityVal = 0x101FBFB7; -const TInt KUidAsrEventGetUtteranceDurationVal = 0x101FBFB8; -const TInt KUidAsrEventGetModelCountVal = 0x101FBFB9; -const TInt KUidAsrEventGetAllRuleIDsVal = 0x101FBFBA; -const TInt KUidAsrEventGetAllPronunciationIDsVal = 0x101FBFBB; -const TInt KUidAsrEventGetAllModelIDsVal = 0x101FBFBC; -const TInt KUidAsrEventGetAllClientGrammarIDsVal = 0x101FBFBD; -const TInt KUidAsrEventGetAllClientLexiconIDsVal = 0x101FBFBE; -const TInt KUidAsrEventGetAllClientModelBankIDsVal = 0x101FBFBF; -const TInt KUidAsrEventGetAllGrammarIDsVal = 0x101FBFC0; -const TInt KUidAsrEventGetAllLexiconIDsVal = 0x101FBFC1; -const TInt KUidAsrEventGetAllModelBankIDsVal = 0x101FBFC2; - -// SI event values -// !!!! There are not unique! Just successors of SD numbers. -const TInt KUidAsrEventAdaptVal = 0x101FBFC3; -const TInt KUidAsrEventAddVoiceTagVal = 0x101FBFC4; -const TInt KUidAsrEventAddVoiceTagsVal = 0x101FBFC5; -const TInt KUidAsrEventSIRecognitionVal = 0x101FBFC6; -const TInt KUidAsrEventAddRuleVariantVal= 0x101FBFC7; -const TInt KUidAsrEventCreateRuleVal = 0x101FBFC8; -const TInt KUidAsrEventEndRecordVal = 0x101FBFC9; -const TInt KUidAsrEventUnloadGrammarVal = 0x101FBFCA; - - -const TInt KUidAsrEventUpdateGrammarAndLexiconVal = 0x101FBFCB; -const TInt KUidAsrEventActivateGrammarVal = 0x101FBFCC; -const TInt KUidAsrEventDeactivateGrammarVal = 0x101FBFCD; -const TInt KUidAsrEventRemoveRulesVal = 0x101FBFCE; - -const TInt KUidAsrEventGetPronunciationCountVal = 0x101FBFCF; -const TInt KUidAsrEventGetRuleCountVal = 0x101FBFD0; - -const TInt KUidAsrEventPreStartSamplingVal = 0x101FBFD1; - -const TUid KUidAsrEventTrainReady = {KUidAsrEventTrainReadyVal}; -const TUid KUidAsrEventTrain = {KUidAsrEventTrainVal}; -const TUid KUidAsrEventAddPronunciation = {KUidAsrEventAddPronunciationVal}; -const TUid KUidAsrEventAddRule = {KUidAsrEventAddRuleVal}; -const TUid KUidAsrEventLoadModels = {KUidAsrEventLoadModelsVal}; -const TUid KUidAsrEventLoadLexicon = {KUidAsrEventLoadLexiconVal}; -const TUid KUidAsrEventLoadGrammar = {KUidAsrEventLoadGrammarVal}; -const TUid KUidAsrEventRecognitionReady = {KUidAsrEventRecognitionReadyVal}; -const TUid KUidAsrEventRecognition = {KUidAsrEventRecognitionVal}; -const TUid KUidAsrEventUnloadRule = {KUidAsrEventUnloadRuleVal}; -const TUid KUidAsrEventRecordStarted = {KUidAsrEventRecordStartedVal}; -const TUid KUidAsrEventRecord = {KUidAsrEventRecordVal}; -const TUid KUidAsrEventEouDetected = {KUidAsrEventEouDetectedVal}; -const TUid KUidAsrEventPlayStarted = {KUidAsrEventPlayStartedVal}; -const TUid KUidAsrEventPlay = {KUidAsrEventPlayVal}; -const TUid KUidAsrEventCreateGrammar = {KUidAsrEventCreateGrammarVal}; -const TUid KUidAsrEventCreateLexicon = {KUidAsrEventCreateLexiconVal}; -const TUid KUidAsrEventCreateModelBank = {KUidAsrEventCreateModelBankVal}; -const TUid KUidAsrEventRemoveGrammar = {KUidAsrEventRemoveGrammarVal}; -const TUid KUidAsrEventRemoveLexicon = {KUidAsrEventRemoveLexiconVal}; -const TUid KUidAsrEventRemoveModelBank = {KUidAsrEventRemoveModelBankVal}; -const TUid KUidAsrEventRemoveRule = {KUidAsrEventRemoveRuleVal}; -const TUid KUidAsrEventRemovePronunciation = {KUidAsrEventRemovePronunciationVal}; -const TUid KUidAsrEventRemoveModel = {KUidAsrEventRemoveModelVal}; -const TUid KUidAsrEventGetAvailableStorage = {KUidAsrEventGetAvailableStorageVal}; -const TUid KUidAsrEventGetRuleValidity = {KUidAsrEventGetRuleValidityVal}; -const TUid KUidAsrEventGetUtteranceDuration = {KUidAsrEventGetUtteranceDurationVal}; - -const TUid KUidAsrEventGetModelCount = {KUidAsrEventGetModelCountVal}; -const TUid KUidAsrEventGetPronunciationCount = {KUidAsrEventGetPronunciationCountVal}; -const TUid KUidAsrEventGetRuleCount = {KUidAsrEventGetRuleCountVal}; - -const TUid KUidAsrEventGetAllRuleIDs = {KUidAsrEventGetAllRuleIDsVal}; -const TUid KUidAsrEventGetAllPronunciationIDs = {KUidAsrEventGetAllPronunciationIDsVal}; -const TUid KUidAsrEventGetAllModelIDs = {KUidAsrEventGetAllModelIDsVal}; -const TUid KUidAsrEventGetAllClientGrammarIDs = {KUidAsrEventGetAllClientGrammarIDsVal}; -const TUid KUidAsrEventGetAllClientLexiconIDs = {KUidAsrEventGetAllClientLexiconIDsVal}; -const TUid KUidAsrEventGetAllClientModelBankIDs = {KUidAsrEventGetAllClientModelBankIDsVal}; -const TUid KUidAsrEventGetAllGrammarIDs = {KUidAsrEventGetAllGrammarIDsVal}; -const TUid KUidAsrEventGetAllLexiconIDs = {KUidAsrEventGetAllLexiconIDsVal}; -const TUid KUidAsrEventGetAllModelBankIDs = {KUidAsrEventGetAllModelBankIDsVal}; - -// SI event UIDs -const TUid KUidAsrEventAdapt = {KUidAsrEventAdaptVal}; -const TUid KUidAsrEventAddVoiceTag = {KUidAsrEventAddVoiceTagVal}; -const TUid KUidAsrEventAddVoiceTags = {KUidAsrEventAddVoiceTagsVal}; -const TUid KUidAsrEventSIRecognition = {KUidAsrEventSIRecognitionVal}; -const TUid KUidAsrEventAddRuleVariant= {KUidAsrEventAddRuleVariantVal}; -const TUid KUidAsrEventCreateRule = {KUidAsrEventCreateRuleVal}; -const TUid KUidAsrEventEndRecord = {KUidAsrEventEndRecordVal}; -const TUid KUidAsrEventUnloadGrammar = {KUidAsrEventUnloadGrammarVal}; -const TUid KUidAsrEventUpdateGrammarAndLexicon = {KUidAsrEventUpdateGrammarAndLexiconVal}; - -const TUid KUidAsrEventActivateGrammar = {KUidAsrEventActivateGrammarVal}; -const TUid KUidAsrEventDeactivateGrammar = {KUidAsrEventDeactivateGrammarVal}; -const TUid KUidAsrEventRemoveRules = {KUidAsrEventRemoveRulesVal}; - -const TInt KUidMediaTypeSIVal = 0x101FF932; -const TUid KUidMediaTypeSI = {KUidMediaTypeSIVal}; - -const TUid KUidAsrEventPreStartSampling = {KUidAsrEventPreStartSamplingVal}; - -// Speech Recognition Errors -const TInt KErrAsrNoSpeech = -12050; -const TInt KErrAsrSpeechTooEarly = -12051; -const TInt KErrAsrSpeechTooLong = -12052; -const TInt KErrAsrSpeechTooShort = -12053; -const TInt KErrAsrNoMatch = -12054; -const TInt KErrAsrDataRightViolation = -12055; -const TInt KErrAsrNotRegisted = -12056; -const TInt KErrAsrInvalidState = -12057; -const TInt KErrAsrInitializationFailure = -12058; - -// Pre-defined Engine Parameter Identifiers starts from index 0x01 -// User-define Engine Parameter Identifiers starts from index 0x10000 and end at index KMaxTInt. -const TInt KRecognizerMode = 0x01; -const TInt KGrammarSupport = 0x02; -const TInt KLoadMultipleGrammars = 0x03; -const TInt KLoadMultipleLexicons = 0x04; -const TInt KLoadMultipleModelBanks = 0x05; -const TInt KModelStorageCapacity = 0x06; -const TInt KMaxLoadableModels = 0x07; -const TInt KMaxFrontEndBackEndDelay = 0x08; -const TInt KSamplingRate = 0x09; -const TInt KBitsPerSample = 0x0A; - -// Lexicon reference counter identifier -const TInt KLexiconReferenceCounter = 0x0B; - - -enum TNSSRecognitionMode -{ - ENSSSdMode, - ENSSSiMode, - ENSSSdSiMode -}; - -#endif // NSSSISPEECHRECOGNITIONDATACOMMON_H diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/common/inc/nsssispeechrecognitiondatadevasr.h --- a/srsfenginestub/common/inc/nsssispeechrecognitiondatadevasr.h Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1303 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This file contains definition of the SISpeechRecognitionDataDevASR structure and API. -* -*/ - - - - - -#ifndef __SRSIDATA_DEVASR_H__ -#define __SRSIDATA_DEVASR_H__ - -// INCLUDES -#include - -// FORWARD DECLARATION -class CSILexicon; -class CSICompiledGrammar; - - -// CLASS DECLARATION - -/** -* Class to encapsulate a user defined parameters -* -* @lib nsssispeechrecognitiondata.lib -* @since 2.8 -*/ -class CSIParameters : public CBase - { - public: // Constructors and destructor - /** - * Destructor. - */ - IMPORT_C virtual ~CSIParameters(); - - /** - * Two-phased constructor. - */ - IMPORT_C static CSIParameters* NewL(); - - IMPORT_C static CSIParameters* NewLC(); - public: // New functions - - /** - * Use to set an internal parameter. - * @since 2.8 - * @param aParameterIndex Parameter index - * @param aParameter Parameter value - * @return None. - */ - IMPORT_C virtual void SetParameterL( const TInt aParameterID, const TInt aParameterValue ); - - /** - * Use to retrieve an internal parameter. - * @since 2.8 - * @param aParameterIndex Parameter index - * @return Parameter value. - */ - IMPORT_C virtual TInt ParameterL( const TInt aParameterID ) const; - - /** - * Internalize to a data stream - * @since 2.8 - * @param aStream Data stream - * @return None - */ - IMPORT_C virtual void InternalizeL(RReadStream& aStream ); - - /** - * Externalize from a data stream - * @since 2.8 - * @param None - * @return aStream Data stream - */ - IMPORT_C virtual void ExternalizeL(RWriteStream& aStream ) const; - - /** - * Returns all set parameters and their values. - * @since 2.8 - * @param "RArray& aParameterIDs" This array will contain parameter IDs after call. - * @param "RArray& aParameterValues" This array will contain parameter values after call. - */ - IMPORT_C virtual void ListParametersL( RArray& aParameterIDs, RArray& aParameterValues ) const; - - protected: - IMPORT_C virtual void ConstructL(); - IMPORT_C CSIParameters(); - - private: - RArray iParameterIDs; - RArray iParameterValues; - }; - -/** -* Class to encapsulate a Speaker Independent Rule variant -* -* @lib nsssispeechRecognitionData.lib -* @since 2.8 -*/ -class CSIRuleVariant : public CSIParameters - { - public: // Constructors and destructor - /** - * Destructor. - */ - IMPORT_C virtual ~CSIRuleVariant(); - - /** - * Two-phased constructor. - */ - IMPORT_C static CSIRuleVariant* NewL( const TSIRuleVariantID aRuleVariantID, - const TSILexiconID aLexiconID); - IMPORT_C static CSIRuleVariant* NewLC( const TSIRuleVariantID aRuleVariantID, - const TSILexiconID aLexiconID); - - public: // New functions - - /** - * Use to get the pronunciation Ids. - * @since 2.8 - * @param None. - * @return Pronunciation identifier. - */ - IMPORT_C virtual void GetPronunciationIDsL( TSIPronunciationIDSequence& aPronunciationIDs ) const; - - /** - * Use to set the pronunciation Ids. - * @since 2.8 - * @param Pronunciation identifier . - */ - IMPORT_C virtual void SetPronunciationIDsL( const TSIPronunciationIDSequence& aPronunciationIDs ); - - /** - * Get Language of the rule variant - * @since 2.8 - * @return Language of the rule variant - */ - IMPORT_C virtual TLanguage Language() const; - - /** - * Set Language of the rule variant - * @since 2.8 - * @param Language of the rule variant - * @return None - */ - IMPORT_C virtual void SetLanguage(TLanguage aLanguage); - - - /** - * Use to retrieve the lexicon Id. - * @since 2.8 - * @param None. - * @return Lexicon identifier. - */ - IMPORT_C virtual TSILexiconID LexiconID() const; - - /** - * Use to retrieve the rule variant Id. - * @since 2.8 - * @param None. - * @return Rule identifier. - */ - IMPORT_C virtual TSIRuleVariantID RuleVariantID() const; - - - - - protected: - IMPORT_C virtual void ConstructL(); - IMPORT_C CSIRuleVariant( const TSIRuleVariantID aRuleVariantID, - const TSILexiconID aLexiconID ); - - private: - TSIRuleVariantID iRuleVariantID; - TSIPronunciationIDSequence iPronunciationIDs; - TSILexiconID iLexiconID; - TLanguage iLanguage; - TInt* iParameterArray; - TInt iNParameters; - TAny* iReserved; - }; - -/** -* Class to encapsulate a Speaker Independent Rule -* -* @lib nsssispeechrecognitiondata.lib -* @since 2.8 -*/ -class CSIRule : public CBase - { - public:// Constructors and destructor - /** - * Destructor. - */ - IMPORT_C virtual ~CSIRule(); - - /** - * Two-phased constructor. - */ - IMPORT_C static CSIRule* NewL( const TSIRuleID aRuleID ); - IMPORT_C static CSIRule* NewLC( const TSIRuleID aRuleID ); - - public: // New functions - /** - * Use to retrieve the rule Id. - * @since 2.8 - * @param None. - * @return Rule identifier. - */ - IMPORT_C virtual TSIRuleID RuleID() const; - /** - * Use to retrieve number of rule variants. - * @since 2.8 - * @param None. - * @return Number of rule variants. - */ - IMPORT_C virtual TInt Count() const; - - /** - * Use to retrieve the rule variant based on index. - * @since 2.8 - * @param aIndex Index of rule variant. - * @return Rule variant. - */ - IMPORT_C virtual CSIRuleVariant& AtL(TInt aIndex) const; - - - /** - * Use to add new rule variant. - * @since 2.8 - * @param aRuleVariant New rule variant. - * @return None. - */ - IMPORT_C virtual void AddL(CSIRuleVariant* aRuleVariant); - - /** - * Use to retrieve the rule variant index based on Id. - * @since 2.8 - * @param aRuleVariantID Identifier of rule variant. - * @return Rule variant. - */ - IMPORT_C virtual TInt Find(TSIRuleVariantID aRuleVariantID) const; - - - IMPORT_C virtual CSIRuleVariant& RuleVariantL(TSIRuleVariantID aRuleVariantID) const; - - /** - * Use to delete rule variant. - * @since 2.8 - * @param aRuleVariant Rule variant identifier. - * @return None. - */ - IMPORT_C virtual void DeleteL(TSIRuleVariantID aRuleVariantID); - - /** - * Compares two CSIRule objects. - * Returns 0 if rule ids are equal. - * Returns -1 if first id is smaller. - * Returns 1 if second id is smaller. - * - * @param "const CSIRule& aFirst" First rule to compare - * @param "const CSIRule& aSecond" Second rule to compare - * @return 0, -1 or 1 - */ - static TInt Compare( const CSIRule& aFirst, const CSIRule& aSecond ); - - protected: - IMPORT_C virtual void ConstructL(); - IMPORT_C CSIRule( const TSIRuleID aRuleID ); - - private: - TSIRuleID iRuleID; - RPointerArray iRuleVariantArray; - TAny* iReserved; - }; - - -/** -* Class to encapsulate a Speaker Independent Grammar -* A grammar consist of a list of rules -* -* @lib nsssispeechrecognitiondata.lib -* @since 2.8 -*/ -class CSIGrammar : public CBase - { - public:// Constructors and destructor - /** - * Destructor. - */ - IMPORT_C virtual ~CSIGrammar(); - - /** - * Two-phased constructor. - */ - IMPORT_C static CSIGrammar* NewL(const TSIGrammarID aGrammarID); - IMPORT_C static CSIGrammar* NewLC(const TSIGrammarID aGrammarID); - - public: // New functions - - /** - * Use to add a rule to the grammar. - * @since 2.8 - * @param aRule - reference to CSIRule object. - * @return KErrNone, if the insertion is successful, otherwise one of the system wide error codes. - */ - IMPORT_C virtual void AddL(CSIRule* aRule); - - - /** - * Use to return a rule based at an index. - * @since 2.8 - * @param aIndex: an index. Value must not be negative and must not be greater than the number of rules currently in the grammar, otherwise it raises a USER-130 panic. - * @return Reference to CSIRule object. - */ - IMPORT_C virtual CSIRule& AtL(TInt aIndex) const; - - /** - * Use to delete a rule to the grammar. - * @since 2.8 - * @param aRuleID - rule identifier. - * @return None. - */ - IMPORT_C virtual void DeleteL(const TSIRuleID aRuleID); - - /** - * Use to get the number of rules in the grammar - * @since 2.8 - * @param None. - * @return Number of rules. - */ - IMPORT_C virtual TInt Count() const; - - /** - * Use to retrieve the grammar Id of the result. - * @since 2.8 - * @param None. - * @return Grammar identifier. - */ - IMPORT_C virtual TSIGrammarID GrammarID() const; - - /** - * Use to find a rule in the grammar based on rule Id. - * @since 2.8 - * @param aRuleID - rule identifier. - * @return The index of the first matching rule within the grammar. KErrNotFound, if no matching rule can be found. - */ - - IMPORT_C virtual TInt Find(const TSIRuleID aRuleID) const; - - IMPORT_C virtual CSIRule& RuleL(TSIRuleID aRuleID) const; - - /** - * Internalize to a data stream - * @since 2.8 - * @param aStream Data stream - * @return None - */ - IMPORT_C virtual void InternalizeL(RReadStream& aStream ); - - /** - * Externalize from a data stream - * @since 2.8 - * @param None - * @return aStream Data stream - */ - IMPORT_C virtual void ExternalizeL(RWriteStream& aStream ) const; - - protected: - - IMPORT_C virtual void ConstructL(); - IMPORT_C CSIGrammar(const TSIGrammarID aGrammarID); - - private: - TSIGrammarID iGrammarID; - RPointerArray iRuleArray; - TAny* iReserved; - }; - -/** -* Class to encapsulate a compiled grammar (ready for recognition) -* -* @lib nsssispeechrecognitiondata.lib -* @since 2.8 -*/ -class CSICompiledGrammar : public CSIGrammar - { - public:// Constructors and destructor - /** - * Destructor. - */ - IMPORT_C virtual ~CSICompiledGrammar(); - - /** - * Two-phased constructor. - */ - IMPORT_C static CSICompiledGrammar* NewL(const TSIGrammarID aGrammarID); - - IMPORT_C static CSICompiledGrammar* NewLC(const TSIGrammarID aGrammarID); - public: // New functions - - - /** - * Use to delete a rule to the grammar. - * @since 2.8 - * @param aRuleID - rule identifier. - * @return None. - */ - IMPORT_C virtual void DeleteL(const TSIRuleID aRuleID); - /** - * Use to add a rule to the grammar. - * @since 2.8 - * @param aRule - reference to CSIRule object. - * @return KErrNone, if the insertion is successful, otherwise one of the system wide error codes. - */ - IMPORT_C virtual void AddL(CSIRule* aRule); - - - /** - * Use to retrieve the recognition data. - * @since 2.8 - * @param None. - * @return Reference to the recognition data. - */ - IMPORT_C virtual void SetCompiledData( HBufC8* aCompilerData); - - /** - * Function to get compiler data - * @since 2.8 - * @param None - * @return Pointer to data - */ - IMPORT_C virtual TDesC8& CompiledData() const; - - /** - * Internalize to a data stream - * @since 2.8 - * @param aStream Data stream - * @return None - */ - IMPORT_C virtual void InternalizeL(RReadStream& aStream ); - - /** - * Externalize from a data stream - * @since 2.8 - * @param None - * @return aStream Data stream - */ - IMPORT_C virtual void ExternalizeL(RWriteStream& aStream ) const; - - protected: - IMPORT_C virtual void ConstructL(); - - IMPORT_C CSICompiledGrammar(const TSIGrammarID aGrammarID); - - private: - // is compiled data valid - TBool iValidData; - - // data of grammar compiler - HBufC8* iGrammarCompilerData; - TAny* iReserved; - - protected: - - }; - -/** -* Class to define rule variant info -* -* @lib nsssispeechrecognitiondata.lib -* @since 2.8 -*/ -class TSIRuleVariantInfo - { - public: // Constructors and destructor - - /** - * C++ default constructor. - */ - IMPORT_C TSIRuleVariantInfo( const TSIGrammarID aGrammarID, - const TSIRuleID aRuleID, - const TSIRuleVariantID aRuleVariantID ); - - /** - * Destructor. - */ - IMPORT_C virtual ~TSIRuleVariantInfo(); - - public: // New functions - - /** - * Use to get Grammar ID - * @since 2.8 - * @return Identifier of Grammar - */ - IMPORT_C virtual TSIGrammarID GrammarID() const; - - - /** - * Use to get rule ID - * @since 2.8 - * @return Identifier of rule - */ - IMPORT_C virtual TSIRuleID RuleID() const; - - /** - * Use to get rule variant ID - * @since 2.8 - * @return Identifier of rule variant - */ - IMPORT_C virtual TSIRuleVariantID RuleVariantID() const; - - protected: // Data - - - // rule identifier - const TSIGrammarID iGrammarID; - // rule identifier - const TSIRuleID iRuleID; - - // rule variant identifier - const TSIRuleVariantID iRuleVariantID; - - }; - -/** -* Class to encapsulate a Speaker Independent Pronunciation -* -* @lib nsssispeechrecognitiondata.lib -* @since 2.8 -*/ -class CSIPronunciation : public CSIParameters - { - public:// Constructors and destructor - /** - * Destructor. - */ - IMPORT_C virtual ~CSIPronunciation(); - - /** - * Two-phased constructor. - */ - IMPORT_C static CSIPronunciation* NewL(const TSIPronunciationID aPronunciationID, - const TSIModelBankID aModelBankID ); - IMPORT_C static CSIPronunciation* NewLC(const TSIPronunciationID aPronunciationID, - const TSIModelBankID aModelBankID ); - - public: // New functions - /** - * Use to retrieve the model bank Id of the model bank. - * @since 2.8 - * @param None. - * @return Model bank identifier. - */ - IMPORT_C virtual TSIModelBankID ModelBankID() const; - /** - * Use to set the pronunciation Id of this lexicon entry. - * @since 2.8 - * @param Pronunciation identifier. - * @return None. - */ - IMPORT_C virtual void SetPronunciationID(TSIPronunciationID aPronunciationID); - - - /** - * Use to retrieve the pronunciation Id of this lexicon entry. - * @since 2.8 - * @param None. - * @return Pronunciation identifier. - */ - IMPORT_C virtual TSIPronunciationID PronunciationID() const; - /** - * Use to set phoneme sequence. - * @since 2.8 - * @param aPhonemeSequence Phoneme sequence. - * @return None. - */ - IMPORT_C virtual void SetPhonemeSequenceL( const TDesC8& aPhonemeSequence ); - - - /** - * Use to retrieve the phoneme sequence. - * @since 2.8 - * @param None. - * @return Phoneme sequence. - */ - IMPORT_C virtual const TDesC8& PhonemeSequence() const; - - /** - * Compares two CSIPronunciation objects. - * Returns 0 if prununciation ids are equal. - * Returns -1 if first id is smaller. - * Returns 1 if second id is smaller. - * - * @param "const CSIPronunciation& aFirst" First pronunciation to compare - * @param "const CSIPronunciation& aSecond" Second pronunciation to compare - * @return 0, -1 or 1 - */ - static TInt Compare( const CSIPronunciation& aFirst, const CSIPronunciation& aSecond ); - - /** - * Compares two CSIPronunciation objects. - * Returns 0 if phoneme sequences are equal. - * Returns -1 if first phoneme sequence is smaller. - * Returns 1 if second phoneme sequence is smaller. - * - * @param "const CSIPronunciation& aFirst" First pronunciation to compare - * @param "const CSIPronunciation& aSecond" Second pronunciation to compare - * @return 0, -1 or 1 - */ - static TInt ComparePhonemes( const CSIPronunciation& aFirst, const CSIPronunciation& aSecond ); - - - protected: - IMPORT_C virtual void ConstructL(); - IMPORT_C CSIPronunciation(const TSIPronunciationID aPronunciationID, - const TSIModelBankID aModelBankID ); - - private: - TSIPronunciationID iPronunciationID; - TSIModelBankID iModelBankID; - HBufC8* iPhonemeSequence; - TAny* iReserved; - }; - - -/** -* Class to encapsulate a Speaker Independent Lexicon -* -* @lib nsssispeechrecognitiondata.lib -* @since 2.8 -*/ -class CSILexicon : public CBase - { - public:// Constructors and destructor - - /** - * Destructor. - */ - IMPORT_C virtual ~CSILexicon(); - - /** - * Two-phased constructor. - * @param aLexiconID Lexicon ID - * @return Created instance - */ - IMPORT_C static CSILexicon* NewL( const TSILexiconID aLexiconID ); - IMPORT_C static CSILexicon* NewLC( const TSILexiconID aLexiconID ); - - public: // New functions - - /** - * Use to add a lexicon entry to the lexicon. - * Leaves with KErrNoMemory if maximal allowed amount of pronunciations - * is already stored in this lexicon - * @since 2.8 - * @param aPronunciation pointer to CSIPronunciation object. - */ - IMPORT_C virtual void AddL( CSIPronunciation* aPronunciation ); - - /** - * Use to return a pronunciation based at an index. - * @since 2.8 - * @param aIndex Value must not be negative and must not be greater than - * the number of pronunciations currently in the lexicon. - * @return Reference to CSIPronunciation object. - */ - IMPORT_C virtual CSIPronunciation& AtL( TInt aIndex ) const; - - /** - * Deletes a pronunciation based on identifier. - * @since 2.8 - * @param aPronunciationID pronunciation variant identifier. - */ - IMPORT_C virtual void DeleteL( TSIPronunciationID aPronunciationID ); - - /** - * Use to find a pronunciation based on pronunciation Id. - * @since 2.8 - * @param aPronunciationID: pronunciation identifier. - * @return The index of the first matching pronunciation within the lexicon. - * KErrNotFound, if no matching pronunciation can be found. - */ - IMPORT_C virtual TInt Find( const TSIPronunciationID aPronunciationID ) const; - - /** - * Use to find a pronunciation based on phoneme sequence. - * @since 2.8 - * @param aPronunciation: phoneme sequence. - * @return The index of the first matching pronunciation within the lexicon. - * KErrNotFound, if no matching pronunciation can be found. - */ - IMPORT_C virtual TInt Find( const TDesC8& aPhonemeSequence ) const; - - /** - * Use to count the number of lexicon entries in the lexicon. - * @since 2.8 - * @return Number of pronunciations. - */ - IMPORT_C virtual TInt Count() const; - - /** - * Use to retrieve the model bank Id of the model bank. - * @since 2.8 - * @return Model bank identifier. - */ - IMPORT_C virtual TSILexiconID LexiconID() const; - - /** - * Internalize to a data stream - * @since 2.8 - * @param aStream Data stream - */ - IMPORT_C virtual void InternalizeL( RReadStream& aStream ); - - /** - * Externalize from a data stream - * @since 2.8 - * @param aStream Data stream - */ - IMPORT_C virtual void ExternalizeL( RWriteStream& aStream ) const; - - protected: - IMPORT_C void ConstructL(); - IMPORT_C CSILexicon( const TSILexiconID aLexiconID ); - - private: - - /** - * Utility function to add pronunciation to the end of ID-ordered array - * - * @param "CSIPronunciation* aPronunciation" Pronunciation which should be added. - */ - void AddPronunciationToEndL( CSIPronunciation* aPronunciation ); - - private: - // ID of the lexicon - TSILexiconID iLexiconID; - // Pronunciations in the order of IDs - RPointerArray iPronunciationArray; - // Pronunciations in the order of the phoneme sequence - RPointerArray iPronunOrder; - // For future extensions - TAny* iReserved; - }; - - -/** -* Class to encapsulate a Speaker Independent Model -* -* @lib nsssispeechrecognitiondata.lib -* @since 2.8 -*/ -class CSIModel : public CSIParameters - { - public:// Constructors and destructor - /** - * Destructor. - */ - IMPORT_C virtual ~CSIModel(); - - /** - * Two-phased constructors. - */ - //IMPORT_C static CSIModel* NewL(); - //IMPORT_C static CSIModel* NewLC(); - IMPORT_C static CSIModel* NewL( const TSIModelID aModelID ); - IMPORT_C static CSIModel* NewLC( const TSIModelID aModelID ); - - public: // New functions - /** - * Use to set the phoneme Id of this model. - * @since 2.8 - * @param aModelID: phoneme identifier. - * @return None. - */ - IMPORT_C virtual void SetModelID( const TSIModelID aModelID); - - /** - * Use to retreive the phoneme Id of this model. - * @since 2.8 - * @param None. - * @return Phoneme identifier. - */ - IMPORT_C virtual TSIModelID ModelID() const; - - /** - * Use to get a pointer to the acoustic model of this model. - * @since 2.8 - * @param None. - * @return A descriptor to the acoustic model data. - */ - IMPORT_C virtual TDesC8& AcousticModel() const; - - /** - * Use to set the acoustic model of the model. - * @since 2.8 - * @param aAcousticModel: pointer descriptor containing the acoustic model (binary). - * @return None. - */ - IMPORT_C virtual void SetAcousticModel( HBufC8* aAcousticModel ); - - - protected: - IMPORT_C virtual void ConstructL(); - IMPORT_C CSIModel( ); - IMPORT_C CSIModel( const TSIModelID aModelID ); - - private: - TSIModelID iModelID; - HBufC8* iAcousticModel; - TAny* iReserved; - }; - -/** -* Class to encapsulate a Speaker Independent Model Bank -* -* @lib nsssispeechrecognitiondata.lib -* @since 2.8 -*/ -class CSIModelBank : public CBase - { - public:// Constructors and destructor - /** - * Destructor. - */ - IMPORT_C virtual ~CSIModelBank(); - - /** - * Two-phased constructor. - */ - IMPORT_C static CSIModelBank* NewL(const TSIModelBankID aModelBankID); - IMPORT_C static CSIModelBank* NewLC(const TSIModelBankID aModelBankID); - - public: // New functions - - - - /** - * Use to add a model to the model bank. - * @since 2.8 - * @param aModel: reference to CSIModel object. - * @return None - */ - IMPORT_C virtual void AddL(const CSIModel* aModel); - - /** - * Use to return a model at the given index. - * @since 2.8 - * @param Reference to CSIModel object. - * @return None - */ - IMPORT_C virtual CSIModel& AtL(TInt aIndex) const; - - /** - * Deletes a model from model bank. - * @since 2.8 - * @param ID of the model - * @return None - */ - IMPORT_C virtual void DeleteL(TSIModelID aModelID); - - /** - * Use to find a model based on phoneme Id. - * @since 2.8 - * @param None. - * @return Index of the first matching model within the model bank. KErrNotFound, if no matching model can be found.. - */ - IMPORT_C virtual TInt Find(TSIModelID aModelID) const; - - /** - * Use to retreive the number of models in the model bank. - * @since 2.8 - * @param None. - * @return Number of models in the model bank. - */ - IMPORT_C virtual TInt Count() const; - - /** - * Use to return the model bank Id of the model bank. - * @since 2.8 - * @param None. - * @return Model bank identifier. - */ - IMPORT_C virtual TSIModelBankID ModelBankID() const; - - protected: - IMPORT_C virtual void ConstructL(); - IMPORT_C CSIModelBank(const TSIModelBankID aModelBankID); - - private: - TSIModelBankID iModelBankID; - RPointerArray iModelArray; - TAny* iReserved; - }; - -/** -* Class to define pronunciation type. -* -* @lib nsssispeechrecognitiondata.lib -* @since 2.8 -*/ -class CSIPronunciationInfo : public CSIParameters - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CSIPronunciationInfo* NewL(RPointerArray aPronunciationArray, - TLanguage aLanguage ); - IMPORT_C static CSIPronunciationInfo* NewLC(RPointerArray aPronunciationArray, - TLanguage aLanguage ); - - /** - * Destructor. - */ - IMPORT_C virtual ~CSIPronunciationInfo(); - - public: // New functions - - /** - * Use to get phoneme sequence data - * @since 2.8 - * @return Phoneme sequence - */ - IMPORT_C virtual TDesC8& PronunciationL(TInt aIndex) const; - - /** - * Use to set phoneme sequence data - * @since 2.8 - * @return Phoneme sequence - */ - - IMPORT_C virtual void SetPronunciationL( TInt aIndex, HBufC8* aPronunciation); - - IMPORT_C virtual TLanguage Language() const; - - IMPORT_C virtual TInt Count() const; - - - protected: - IMPORT_C virtual void ConstructL(); - IMPORT_C CSIPronunciationInfo( RPointerArray aPronunciationArray,TLanguage aLanguage); - - private: // Data - - // phoneme sequence - //HBufC8* iPronunciation; - RPointerArray iPronunciationArray; - - TLanguage iLanguage; - TAny* iReserved; - }; - -/** -* Class to define word list. The list is used as input parameter for TTP. -* -* @lib SiSpeechRecognitionData.lib -* @since 2.8 -*/ -class CSITtpWordList : public CBase - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CSITtpWordList* NewL(); - IMPORT_C static CSITtpWordList* NewLC(); - - /** - * Destructor. - */ - IMPORT_C virtual ~CSITtpWordList(); - - public: // New functions - - /** - * Use to add a new word - * @since 2.8 - * @param aWord Word to be added - */ - IMPORT_C virtual void AddL( MDesCArray* aWords ); - - /** - * Use to get number of words - * @since 2.8 - * @return number of words - */ - IMPORT_C virtual TInt Count() const; - - /** - * Use to return word at an index - * @since 2.8 - * @param aIndex Index of word - * @return reference to word sequence - */ - IMPORT_C virtual MDesCArray& AtL( const TInt aIndex ) const; - - - /** - * Use to delete word at an index - * @since 2.8 - * @param aIndex Index of word - * @return None - */ - IMPORT_C virtual void DeleteL(TInt aIndex); - - - - /** - * Use to set pronunciation for a word - * @since 2.8 - * @param aIndex Index of word seqence - * @param aPronunciation Pronunciation to be added - */ - IMPORT_C virtual void AppendPronunciationL(TInt aIndex, - CSIPronunciationInfo* aPronunciation); - - - /** - * Use to get pronunciations for a word - * @since 2.8 - * @param aIndex Index of word sequence - * @param aPronunciations Array where to put pronunciations - */ - IMPORT_C virtual void GetPronunciationsL( const TInt aIndex, - RPointerArray& aPronunciations ) const; - - protected: - - /** - * C++ default constructor. - */ - IMPORT_C CSITtpWordList(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - IMPORT_C void ConstructL(); - - private: // Data - - // word array - // RArray iWordArray; - RPointerArray iWordArray; - // index array for pronunciations - RArray iIndexArray; - // pronunciation array - RPointerArray iPronunciationArray; - - // Reserved pointer for future extension - TAny* iReserved; - }; - -/** -* Class to encapsulate a Recognition Result -* -* @lib nsssispeechrecognitiondata.lib -* @since 2.8 -*/ -class CSIResult : public CSIParameters - { - public:// Constructors and destructor - /** - * Destructor. - */ - IMPORT_C virtual ~CSIResult(); - - /** - * Two-phased constructor. - */ - IMPORT_C static CSIResult* NewL(); - IMPORT_C static CSIResult* NewLC(); - - public: // New functions - /** - * Use to set the grammar Id on the result. - * @since 2.8 - * @param aGrammarID - grammar identifier. - * @return None. - */ - IMPORT_C virtual void SetGrammarID(const TSIGrammarID aGrammarID); - - /** - * Use to retrieve the grammar Id of the result. - * @since 2.8 - * @param None. - * @return Grammar identifier. - */ - IMPORT_C virtual TSIGrammarID GrammarID() const; - - /** - * Use to set the rule Id of the result. - * @since 2.8 - * @param aRuleID - rule identifier. - * @return None. - */ - IMPORT_C virtual void SetRuleID(const TSIRuleID aRuleID); - - /** - * Use to retrieve the rule Id of the result. - * @since 2.8 - * @param None. - * @return Rule identifier. - */ - IMPORT_C virtual TSIRuleID RuleID() const; - - /** - * Use to set the rule variant Id of the result. - * @since 2.8 - * @param aRuleID - rule variant identifier. - * @return None. - */ - IMPORT_C virtual void SetRuleVariantID(const TSIRuleVariantID aRuleVariantID); - - /** - * Use to retrieve the rule variant Id of the result. - * @since 2.8 - * @param None. - * @return Rule variant identifier. - */ - IMPORT_C virtual TSIRuleVariantID RuleVariantID() const; - - /** - * Use to set the score for this result. - * @since 2.8 - * @param aScore: score of this result. - * @return None. - */ - IMPORT_C virtual void SetScore(const TInt32 aScore); - - /** - * Use to retreive the score of this result. - * @since 2.8 - * @param None. - * @return Score of this result. - */ - IMPORT_C virtual TInt32 Score() const; - - /** - * Sets the pronunciation information needed for speaker adaptation and playback. - * @since 2.8 - * @param aSIPronunciationInfo Pronunciation information, needed for speaker adaptation and playback - * @return None. - */ - IMPORT_C virtual void SetPronunciation( CSIPronunciation* aSIPronunciation); - - /** - * Gets the pronunciation information needed for speaker adaptation and playback. - * @since 2.8 - * @param None - * @return aSIPronunciationInfo Pronunciation information, needed for speaker adaptation and playback - */ - IMPORT_C virtual CSIPronunciation& Pronunciation() const ; - protected: - IMPORT_C virtual void ConstructL(); - IMPORT_C CSIResult(); - - private: - TSIGrammarID iGrammarID; - TSIRuleID iRuleID; - TSIRuleVariantID iRuleVariantID; - TInt32 iScore; - CSIPronunciation* iSIPronunciation; - TAny* iReserved; - }; - - -/** -* Class to encapsulate a a set of Recognition Result -* -* @lib nsssispeechrecognitiondata.lib -* @since 2.8 -*/ -class CSIResultSet : public CBase - { - public:// Constructors and destructor - /** - * Destructor. - */ - IMPORT_C virtual ~CSIResultSet(); - /** - * Two-phased constructor. - */ - IMPORT_C static CSIResultSet* NewL(); - IMPORT_C static CSIResultSet* NewLC(); - - public: // New functions - /** - * Use to add a result to the rule set. - * @since 2.8 - * @param aResult - reference to the result object to be added. - * @return KErrNone, if the insertion is successful, otherwise one of the system wide error codes. - */ - IMPORT_C virtual void AddL( const CSIResult* aResult); - - /** - * Use to return a result at a given index within the result set. - * @since 2.8 - * @param aIndex - index in the result set. - * @return A reference to CSIResult object. - */ - IMPORT_C virtual CSIResult& AtL(const TInt aIndex); - - /** - * Use to return a result at a given index within the result set. - * @since 2.8 - * @param aIndex - index in the result set. - * @return A constant reference to CSIResult object. - */ - IMPORT_C virtual const CSIResult& AtL(const TInt aIndex) const; - - /** - * Use to retreive the number of result in the result set. - * @since 2.8 - * @param None. - * @return Number of results in the result set. - */ - IMPORT_C virtual TInt Count() const; - - - /** - * Delete a result in the result set. - * @since 2.8 - * @param index of a result - * @return None - */ - IMPORT_C virtual void DeleteL(TInt aIndex); - - /** - * Sets the data needed for speaker adaptation. CSIResultSet takes ownership of the data. - * @since 2.8 - * @param Adaptation data - * @return None - */ - IMPORT_C virtual void SetAdaptationData( HBufC8* aAdaptationData ); - - - /** - * Gets the data needed for speaker adaptation. CSIResultSet takes ownership of the data. - * @since 2.8 - * @param None - * @return Adaptation data - */ - IMPORT_C virtual TDesC8& AdaptationData(); - - /** - * Stores the object to the stream. - * @since 2.8 - * @param aWriteStream The stream to write to. - * @return None - */ - IMPORT_C virtual void ExternalizeL( RWriteStream& aWriteStream ) const; - - /** - * Resurrects an object from the stream. - * @since 2.8 - * @param aReadStream The stream to read from. - * @return None - */ - IMPORT_C virtual void InternalizeL( RReadStream& aReadStream ); - - private: - /** - * By default Symbian 2nd phase constructor is private. - */ - IMPORT_C virtual void ConstructL(); - - /** - * C++ constructor - */ - IMPORT_C CSIResultSet(); - - private: - // The results - RPointerArray iResultArray; - - // Speaker adaptation data - HBufC8* iAdaptationData; - - // Reserved for future extensions - TAny* iReserved; - }; - -#endif - -// End of file diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/common/inc/nssttscommon.h --- a/srsfenginestub/common/inc/nssttscommon.h Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,437 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Data type defininitions for TTS -* %version: 13 % -* -* Copyright © 2004-2006 Nokia Corporation. -*/ - - - - - -#ifndef TTSCOMMON_H -#define TTSCOMMON_H - -// INCLUDES -#include -#include - -// CONSTANTS -// Undefined synthesizing language. The default language of TTS processor will be used. -const TLanguage KTtsUndefinedLanguage( ELangOther ); - -// Undefined duration of segment. The duration will be defined using other properties. -const TInt32 KTtsUndefinedDuration( -1 ); - -// Undefined rate -const TInt KTtsRateUndefined( -1 ); - -// Default volume, which is maximum volume (100%). -const TInt KTtsDefaultVolume( 100 ); - -// Max length of voice name -const TInt KVoiceNameMaxLength( 50 ); - -// Maximum speaking rate -const TInt KTtsMaxSpeakingRate( 100 ); - -// -_LIT( KDefaultVoiceNameMale, "DefaultMale" ); -_LIT( KDefaultVoiceNameFemale, "DefaultFemale" ); - -// DATA TYPES - -// Style identifier -typedef TUint32 TTtsStyleID; - -// Voice identifier -typedef TBuf TTtsVoice; - -// Preferred quality of TTS output -enum TTtsQuality - { - ETtsQualityLowOnly, // Low quality - ETtsQualityHighOnly, // High quality - ETtsQualityHighPreferred, // High quality preferred, low quality fall back can be used - ETtsQualityLowPreferred, // Low quality preferred - ETtsQualityUndefined // Default quality will be used - }; - -// Custom command ids for CTtsUtility::CustomCommand(As|S)ync() -enum TTtsCustomCommandId - { - ETtsCustomCommandSetAudioOutput = 0, // For setting audio output routing - ETtsCustomCommandSetPluginParameter = 1, // For setting plugin parameter - }; - -// FORWARD DECLARATIONS -class CTtsParsedTextBody; - -// CLASS DECLARATION - -/** -* Class to encapsulate speaking style -* -* @lib nssttscommon.lib -* @since 2.8 -*/ -class TTtsStyle - { - public: // Constructor and destructor - - /** - * C++ default constructor. - */ - IMPORT_C TTtsStyle(); - - public: // Data - - // Synthesizing language - TLanguage iLanguage; - - // Voice identifier - TTtsVoice iVoice; - - // Speaking rate in words-per-minute. See TTtsRate. - TInt iRate; - - // Volume scale in percentages. The range is 0..100. - // Zero means silent and 100 maximum volume. - TInt iVolume; - - // Sampling rate - TInt iSamplingRate; - - // TTS quality (preferred or exclusive) - TTtsQuality iQuality; - - // Desired time to take to read the segment in microseconds - TTimeIntervalMicroSeconds32 iDuration; - - // Natural languagege processing on/off - TBool iNlp; - - }; - -/** -* Class to store segment information -* -* @lib nssttscommon.lib -* @since 2.8 -*/ -class TTtsSegment - { - public: // Constructors and destructor - - /** - * C++ default constructor. - * @since 2.8 - * @param aStyleID Indentifier of style. - * @param aText Text for segment - * @param aPhonemeSequence Corresponding phoneme sequence for text - * @param aTrailingSilenceDuration The duration of trailing silence. - */ - IMPORT_C TTtsSegment( const TTtsStyleID aStyleID, - const TDesC& aText = KNullDesC, - const TDesC8& aPhonemeSequence = KNullDesC8, - const TTimeIntervalMicroSeconds32& aTrailingSilenceDuration = KTtsUndefinedDuration ); - - public: // New functions - - /** - * Sets duration of trailing silence. - * @since 2.8 - * @param aDuration Duration of silence. - * @return None - */ - IMPORT_C void SetTrailingSilenceL( const TTimeIntervalMicroSeconds32& aDuration ); - - /** - * Sets phoneme sequence pointer. The phoneme sequence cannot be deleted - * during the life time of this object. - * @since 2.8 - * @param aPhonemeSequence Phoneme sequence. - * @return None - */ - IMPORT_C void SetPhonemeSequencePtr( const TDesC8& aPhonemeSequence ); - - /** - * Returns phoneme sequence pointer of the segment. - * @since 2.8 - * @param None - * @return Pointer to phoneme sequence - */ - IMPORT_C const TDesC8& PhonemeSequencePtr() const; - - /** - * Sets text pointer. The text cannot be deleted - * during the life time of this object. - * @since 2.8 - * @param aText Text. - * @return None - */ - IMPORT_C void SetTextPtr( const TDesC& aText ); - - /** - * Returns text pointer of the segment. - * @since 2.8 - * @param None - * @return Pointer to text. - */ - IMPORT_C const TDesC& TextPtr() const; - - /** - * Gets duration of trailing silence. - * @since 2.8 - * @param None - * @return Duration of silence. - */ - IMPORT_C const TTimeIntervalMicroSeconds32& TrailingSilence() const; - - /** - * Sets style for segment. The style cannot be deleted - * during this object life time. - * @since 2.8 - * @param aStyleID The identifier of the style. - * @return None - */ - IMPORT_C void SetStyleID( TTtsStyleID aStyleID ); - - /** - * Returns identifier of used style. - * @since 2.8 - * @param None - * @return Identifier of style. - */ - IMPORT_C TTtsStyleID StyleID() const; - - /** - * Sets style object for segment. - * - * @since 3.1 - * @param aStyle Style reference. - */ - IMPORT_C void SetStyle( TTtsStyle& aStyle ); - - /** - * Returns style object. - * - * @since 3.1 - * @return Reference to style. - */ - IMPORT_C TTtsStyle& StyleL(); - - /** - * Resets previously set style and segment will use the style ID. - * - * @since 3.1 - */ - IMPORT_C void ResetStyle(); - - private: // Data - - // Style identifier for segment - TTtsStyleID iStyleID; - - // Pointer to text associated for segment - TPtrC iText; - - // Pointer to phoneme sequence associated for segment - TPtrC8 iPhonemeSequence; - - // Duration of trailing silence - TTimeIntervalMicroSeconds32 iTrailingSilenceDuration; - - // Style assigned directly to segment - TTtsStyle iStyle; - - // On if style is directly assigned to the segment - TBool iIncludesStyle; - }; - -/** -* Class to define functions for TTS segment stream. -* Using the class, a client can implement similar classes to CParsedText. -* -* @lib nssttscommon.lib -* @since 2.8 -*/ -class MTtsSegmentStream - { - public: // New functions - - /** - * Returns used phoneme notation of the stream. - * @since 2.8 - * @return Descriptor of used phoneme notation. - */ - virtual TDesC& MTtsPhonemeNotation() = 0; - - /** - * Returns the next segment in the stream. - * @since 2.8 - * @param aSegment The requested segment. - * @return System wide error code. KErrNone if success. - * KErrUnderflow if there is no available segment. - */ - virtual TInt MTtsReceiveSegment( TTtsSegment& aSegment ) = 0; - - /** - * Notifies that the segment has been processed and it can be released. - * @since 2.8 - * @param aSegment The processed segment. - */ - virtual void MTtsSegmentDone( TTtsSegment& aSegment ) = 0; - - }; - -/** -* Class to store parsed text for TTS. -* -* @lib nssttscommon.lib -* @since 2.8 -*/ -class CTtsParsedText : public CBase - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - * @since 2.8 - * @param aText Text to be parsed. - * @param aPhonemeSequence Corresponding phoneme sequence. - * If the sequence is not given, it will be determined automatically. - * @param aPhonemeNotation Identifier of phoneme notation. - * If the descriptor is empty, the TTS engine will use default notation. - * @return Created instance of CTtsParsedText - */ - IMPORT_C static CTtsParsedText* NewL( const TDesC& aText = KNullDesC, - const TDesC8& aPhonemeSequence = KNullDesC8, - const TDesC& aPhonemeNotation = KNullDesC ); - - /** - * Destructor. - */ - IMPORT_C virtual ~CTtsParsedText(); - - public: // New functions - - /** - * Adds new segment and takes its ownership. - * @since 2.8 - * @param aSegment A new segment. - * @param aIndex Index where to add segment. If index is equal or larger - * than NumberOfSegments(), the segment will be added into end. - */ - IMPORT_C void AddSegmentL( const TTtsSegment& aSegment, TInt aIndex = KMaxTInt ); - - /** - * Deletes a segment - * @since 2.8 - * @param aIndex The index of segment to be deleted. The index must be 0..NumberOfSegments()-1. - */ - IMPORT_C void DeleteSegmentL( TInt aIndex ); - - /** - * Checks that the internal structure is valid. - * @since 2.8 - * @return ETrue if valid and EFalse if invalid. - */ - IMPORT_C TBool IsValid() const; - - /** - * Returns the number of segments. - * @since 2.8 - * @return The number of segments - */ - IMPORT_C TInt NumberOfSegments() const; - - /** - * Returns phoneme notation definition. - * @since 2.8 - * @return Notation descriptor. KNullDesC8 if none. - */ - IMPORT_C const TDesC& PhonemeNotation() const; - - /** - * Returns phoneme sequence. - * @since 2.8 - * @return Phoneme sequence. KNullDesC8 if none. - */ - IMPORT_C const TDesC8& PhonemeSequence() const; - - /** - * Returns segment from given index - * @since 2.8 - * @param aIndex The index of segment to be returned. The index must be 0..NumberOfSegments()-1. - * @return Requested segment. - */ - IMPORT_C const TTtsSegment& SegmentL( TInt aIndex ) const; - - /** - * Sets a phoneme notation. The descriptor is copied and can be released after the function call. - * @since 2.8 - * @param aPhonemeNotation Phoneme notation. - */ - IMPORT_C void SetPhonemeNotationL( const TDesC& aPhonemeNotation ); - - /** - * Sets a phoneme sequence. The descriptor is copied and can be released after the function call. - * @since 2.8 - * @param aPhonemeSequence Phoneme sequence. - */ - IMPORT_C void SetPhonemeSequenceL( const TDesC8& aPhonemeSequence ); - - /** - * Sets a text. The descriptor is copied and can be released after the function call. - * @since 2.8 - * @param aText Text. - */ - IMPORT_C void SetTextL( const TDesC& aText ); - - /** - * Returns text. - * @since 2.8 - * @return Text. KNullDesC8 if none. - */ - IMPORT_C const TDesC& Text() const; - - private: - - /** - * C++ default constructor. - */ - CTtsParsedText(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL( const TDesC& aText, - const TDesC8& aPhonemeSequence, - const TDesC& aPhonemeNotation ); - - - private: // Data - - // Implementation for the class - CTtsParsedTextBody* iBody; - - // Reserved pointer for future extension - TAny* iReserved; - - }; -#endif // TTSCOMMON_H - -// End of File diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/common/src/asrshwdevice.cpp --- a/srsfenginestub/common/src/asrshwdevice.cpp Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,106 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Hardware device base class -* -*/ - - - - - - -// INCLUDE FILES -#include "asrshwdevice.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CASRSHwDevice::CASRSHwDevice -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CASRSHwDevice::CASRSHwDevice() - { - } - -// ----------------------------------------------------------------------------- -// CASRSHwDevice::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CASRSHwDevice::ConstructL() - { - } - -// ----------------------------------------------------------------------------- -// CASRSHwDevice::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CASRSHwDevice* CASRSHwDevice::NewL() - { - CASRSHwDevice* self = new( ELeave ) CASRSHwDevice; - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - - return self; - } - - -// ----------------------------------------------------------------------------- -// CASRSHwDevice::~CASRSHwDevice -// Destructor -// ----------------------------------------------------------------------------- -// -EXPORT_C CASRSHwDevice::~CASRSHwDevice() - { - - } - -// ----------------------------------------------------------------------------- -// CASRSHwDevice::InitializeL() -// do nothing -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSHwDevice::InitializeL() - { - // nothing - } - -// ----------------------------------------------------------------------------- -// CASRSHwDevice::Clear() -// do nothing -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSHwDevice::Clear() - { - // nothing - } - -// ----------------------------------------------------------------------------- -// CASRSHwDevice::CustomInterface() -// return empty interface -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TAny* CASRSHwDevice::CustomInterface( TUid /*aInterfaceId*/ ) - { - return NULL; - } - diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/grcompilerhwdevice/bwins/asrsgrcompilerhwdeviceu.def --- a/srsfenginestub/grcompilerhwdevice/bwins/asrsgrcompilerhwdeviceu.def Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ -EXPORTS - ??1CASRSGrCompilerHwDevice@@UAE@XZ @ 1 NONAME ; public: virtual __thiscall CASRSGrCompilerHwDevice::~CASRSGrCompilerHwDevice(void) - ??1CASRSHwDevice@@UAE@XZ @ 2 NONAME ; public: virtual __thiscall CASRSHwDevice::~CASRSHwDevice(void) - ?CancelCombination@CASRSGrCompilerHwDevice@@QAEXXZ @ 3 NONAME ; public: void __thiscall CASRSGrCompilerHwDevice::CancelCombination(void) - ?CancelCompilation@CASRSGrCompilerHwDevice@@QAEXXZ @ 4 NONAME ; public: void __thiscall CASRSGrCompilerHwDevice::CancelCompilation(void) - ?Clear@CASRSHwDevice@@UAEXXZ @ 5 NONAME ; public: virtual void __thiscall CASRSHwDevice::Clear(void) - ?ClearL@CASRSGrCompilerHwDevice@@QAEXXZ @ 6 NONAME ; public: void __thiscall CASRSGrCompilerHwDevice::ClearL(void) - ?CombineGrammarL@CASRSGrCompilerHwDevice@@QAEXABV?$RPointerArray@VCSICompiledGrammar@@@@ABV?$RPointerArray@VTSIRuleVariantInfo@@@@@Z @ 7 NONAME ; public: void __thiscall CASRSGrCompilerHwDevice::CombineGrammarL(class RPointerArray const &,class RPointerArray const &) - ?CompileGrammarL@CASRSGrCompilerHwDevice@@QAEXAAVCSICompiledGrammar@@@Z @ 8 NONAME ; public: void __thiscall CASRSGrCompilerHwDevice::CompileGrammarL(class CSICompiledGrammar &) - ?CustomInterface@CASRSGrCompilerHwDevice@@UAEPAXVTUid@@@Z @ 9 NONAME ; public: virtual void * __thiscall CASRSGrCompilerHwDevice::CustomInterface(class TUid) - ?CustomInterface@CASRSHwDevice@@UAEPAXVTUid@@@Z @ 10 NONAME ; public: virtual void * __thiscall CASRSHwDevice::CustomInterface(class TUid) - ?InitializeL@CASRSGrCompilerHwDevice@@UAEXXZ @ 11 NONAME ; public: virtual void __thiscall CASRSGrCompilerHwDevice::InitializeL(void) - ?InitializeL@CASRSHwDevice@@UAEXXZ @ 12 NONAME ; public: virtual void __thiscall CASRSHwDevice::InitializeL(void) - ?NewL@CASRSGrCompilerHwDevice@@SAPAV1@AAVMASRSGrCompilerHwDeviceObserver@@@Z @ 13 NONAME ; public: static class CASRSGrCompilerHwDevice * __cdecl CASRSGrCompilerHwDevice::NewL(class MASRSGrCompilerHwDeviceObserver &) - ?NewL@CASRSHwDevice@@SAPAV1@XZ @ 14 NONAME ; public: static class CASRSHwDevice * __cdecl CASRSHwDevice::NewL(void) - ?ResolveResult@CASRSGrCompilerHwDevice@@QBEXABV?$RArray@I@@AAVCSIResultSet@@ABV?$RPointerArray@VCSICompiledGrammar@@@@ABVTDesC8@@@Z @ 15 NONAME ; public: void __thiscall CASRSGrCompilerHwDevice::ResolveResult(class RArray const &,class CSIResultSet &,class RPointerArray const &,class TDesC8 const &)const - diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/grcompilerhwdevice/eabi/asrsgrcompilerhwdeviceu.def --- a/srsfenginestub/grcompilerhwdevice/eabi/asrsgrcompilerhwdeviceu.def Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -EXPORTS - _ZN13CASRSHwDevice11InitializeLEv @ 1 NONAME - _ZN13CASRSHwDevice15CustomInterfaceE4TUid @ 2 NONAME - _ZN13CASRSHwDevice4NewLEv @ 3 NONAME - _ZN13CASRSHwDevice5ClearEv @ 4 NONAME - _ZN13CASRSHwDeviceD0Ev @ 5 NONAME - _ZN13CASRSHwDeviceD1Ev @ 6 NONAME - _ZN13CASRSHwDeviceD2Ev @ 7 NONAME - _ZN23CASRSGrCompilerHwDevice11InitializeLEv @ 8 NONAME - _ZN23CASRSGrCompilerHwDevice15CombineGrammarLERK13RPointerArrayI18CSICompiledGrammarERKS0_I18TSIRuleVariantInfoE @ 9 NONAME - _ZN23CASRSGrCompilerHwDevice15CompileGrammarLER18CSICompiledGrammar @ 10 NONAME - _ZN23CASRSGrCompilerHwDevice15CustomInterfaceE4TUid @ 11 NONAME - _ZN23CASRSGrCompilerHwDevice17CancelCombinationEv @ 12 NONAME - _ZN23CASRSGrCompilerHwDevice17CancelCompilationEv @ 13 NONAME - _ZN23CASRSGrCompilerHwDevice4NewLER31MASRSGrCompilerHwDeviceObserver @ 14 NONAME - _ZN23CASRSGrCompilerHwDevice6ClearLEv @ 15 NONAME - _ZN23CASRSGrCompilerHwDeviceD0Ev @ 16 NONAME - _ZN23CASRSGrCompilerHwDeviceD1Ev @ 17 NONAME - _ZN23CASRSGrCompilerHwDeviceD2Ev @ 18 NONAME - _ZNK23CASRSGrCompilerHwDevice13ResolveResultERK6RArrayIjER12CSIResultSetRK13RPointerArrayI18CSICompiledGrammarERK6TDesC8 @ 19 NONAME - _ZTI13CASRSHwDevice @ 20 NONAME ; ## - _ZTI23CASRSGrCompilerHwDevice @ 21 NONAME ; ## - _ZTV13CASRSHwDevice @ 22 NONAME ; ## - _ZTV23CASRSGrCompilerHwDevice @ 23 NONAME ; ## diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/grcompilerhwdevice/group/asrsgrcompilerhwdevicestub.mmp --- a/srsfenginestub/grcompilerhwdevice/group/asrsgrcompilerhwdevicestub.mmp Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for AsrsGrCompilerHwDeviceStub -* -*/ - - - - -#include - -#if defined( WINS ) || defined( WINSCW ) -TARGET asrsgrcompilerhwdevice.dll -#else -TARGET asrsgrcompilerhwdevice_stub.dll -#endif - -TARGETTYPE DLL -UID 0x1000008D 0x101ff929 // UID: 270530857 - -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE asrsgrcompilerhwdevice.cpp - -SOURCEPATH ../../common/src -SOURCE asrshwdevice.cpp - -USERINCLUDE ../inc ../src -USERINCLUDE ../../common/src - -// This is a SYSTEMINCLUDE macro containing the middleware -// layer specific include directories -APP_LAYER_SYSTEMINCLUDE - -SYSTEMINCLUDE ../../common/inc - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY asrsgrcompilerhwdevice.lib - -// On ROM dll name is without the _stub part so that it can easily be -// replaced with the real dll -LINKAS asrsgrcompilerhwdevice.dll - -CAPABILITY CAP_GENERAL_DLL - - - diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/grcompilerhwdevice/group/bld.inf --- a/srsfenginestub/grcompilerhwdevice/group/bld.inf Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for AsrsGrCompilerHwDeviceStub -* -*/ - - - - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -asrsgrcompilerhwdevicestub.mmp - -// End of File \ No newline at end of file diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/grcompilerhwdevice/src/asrsgrcompilerhwdevice.cpp --- a/srsfenginestub/grcompilerhwdevice/src/asrsgrcompilerhwdevice.cpp Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,193 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ARM hardware device for grammar compiling -* -*/ - - - - - - -// INCLUDE FILES -#include "asrsgrcompilerhwdevice.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CASRSGrCompilerHwDevice::CASRSGrCompilerHwDevice -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CASRSGrCompilerHwDevice::CASRSGrCompilerHwDevice( - MASRSGrCompilerHwDeviceObserver& anObserver - ) -: iObserver( anObserver ), - iAlgorithm( NULL ), - iIsInitialised( EFalse ), - iReserved( 0 ) - { - // Nothing - } - -// ----------------------------------------------------------------------------- -// CASRSGrCompilerHwDevice::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CASRSGrCompilerHwDevice::ConstructL(void) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSGrCompilerHwDevice::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CASRSGrCompilerHwDevice* CASRSGrCompilerHwDevice::NewL( - MASRSGrCompilerHwDeviceObserver& anObserver ) // The observer - { - CASRSGrCompilerHwDevice* self = new( ELeave ) CASRSGrCompilerHwDevice( anObserver ); - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - - return self; - } - - -// ----------------------------------------------------------------------------- -// ~CASRSGrCompilerHwDevice -// Destructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CASRSGrCompilerHwDevice::~CASRSGrCompilerHwDevice() - { - } - -// ----------------------------------------------------------------------------- -// CustomInterface -// Provides clients with an interface, given an UID. -// Returns: NULL - No custom interface with that UID -// ----------------------------------------------------------------------------- -// -EXPORT_C TAny* CASRSGrCompilerHwDevice::CustomInterface( - TUid /*aInterfaceId*/ ) // UID of the interface - { - return NULL; - } - -// ----------------------------------------------------------------------------- -// InitializeL -// Initializes the device. Subsequent calls reset the device. -// Returns: none -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSGrCompilerHwDevice::InitializeL(void) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// ClearL -// Clears the device -// Returns: None -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSGrCompilerHwDevice::ClearL(void) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// Compiles a speaker independent grammar. -// Clears the device -// Returns: None -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSGrCompilerHwDevice::CompileGrammarL( - CSICompiledGrammar& /*aSICompiledGrammar*/ ) // The grammar - - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// Compiles a speaker independent grammar. -// Clears the device -// Returns: None -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSGrCompilerHwDevice::CombineGrammarL( - const RPointerArray& /*aCompiledGrammars*/, // The grammars - const RPointerArray& /*aExcludedRules*/) // Blacklisted variants - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CancelCompilation -// Cancels grammar compilation. No callback is sent to the client. -// Returns: None -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSGrCompilerHwDevice::CancelCompilation() - { - } - -// ----------------------------------------------------------------------------- -// CancelCombination -// Cancels grammar combination. No callback is sent to the client. -// Returns: None -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSGrCompilerHwDevice::CancelCombination() - { - } - -// ----------------------------------------------------------------------------- -// Resolves a recognition result -// Clears the device -// Returns: None -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSGrCompilerHwDevice::ResolveResult( - const RArray& /*aNBestIDs*/, - CSIResultSet& /*aSIResultSet*/, - const RPointerArray& /*aSICompiledGrammar*/, - const TDesC8& /*aCombinedData*/ - ) const - { - } - - -// ================================ OTHER EXPORTED FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// E32Dll -// DLL entry function -// ----------------------------------------------------------------------------- -// -#ifndef EKA2 -GLDEF_C TInt E32Dll( TDllReason /*aReason*/ ) - { - return KErrNone; - } -#endif - - -// End of File diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/grcompilerhwdevice/src/asrsgrcompilerhwdevice.h --- a/srsfenginestub/grcompilerhwdevice/src/asrsgrcompilerhwdevice.h Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,233 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: ARM hardware device for grammar compiling -* -*/ - - - - - - -#ifndef ASRSGRCOMPILERHWDEVICE_H -#define ASRSGRCOMPILERHWDEVICE_H - -// INCLUDES -#include -#include - -// FORWARD DECLARATIONS -class CAsrsGrCompilerAlgorithm; -class CSDCompiledGrammar; // For future extensions; the class doesn't exist yet. -class CSDLexicon; -class CSDModelBank; -class CSDResultSet; - -// CLASS DECLARATION -/** -* Callback class for Grammar Compiler. -* -* @lib asrgrcompilerhwdevice.lib -* @since 2.8 -*/ -class MASRSGrCompilerHwDeviceObserver - { -public: // New functions - - /** - * Called after grammar compilation has finished or stopped. - * @since 2.8 - * @param aError KErrNone or a system-wide error code - * @return none - */ - virtual void MghdoGrammarCompilerComplete(TInt aError) = 0; - - /** - * Called after grammar combination has finished or stopped. - * @since 2.8 - * @param aResult The compiled grammar. Format dependes on the technology provider. - * @param aError KErrNone or a system-wide error code - * @return none - */ - virtual void MghdoGrammarCombinerComplete(HBufC8* aResult, TInt aError) = 0; - - /** - * Combination and compilation operations require lexicons. To provide those - * lexicons when needed, the client must implement these functions. - * CASRGrCompilerHwDevice takes ownership of the data. - * @since 2.8 - * @param aID The lexicon identifier - * @return The lexicon. CASRGrCompiler takes ownership. - */ - virtual CSILexicon* MghdoSILexiconL(TSILexiconID aID) = 0; - - /** - * Callback function to load configuration data. - * Client provides an implementation. - * - * @param aPackageType Type identifier. - * @param aPackageID Package identifier. - * @param aStartPosition First byte. - * @param aEndPosition Last byte. If greater than the size of - * the data, rest of the data is given. - * @return Pointer to the data buffer, HW Device takes ownership. - */ - virtual HBufC8* MghdoConfigurationData( TUint32 aPackageType, - TUint32 aPackageID, - TUint32 aStartPosition = 0, - TUint32 aEndPosition = KMaxTUint32 ) = 0; - - }; - -/** -* Grammar compilation algortithms -* -* @lib asrgrcompilerhwdevice.lib -* @since 2.8 -*/ -class CASRSGrCompilerHwDevice : public CASRSHwDevice - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CASRSGrCompilerHwDevice* NewL( - MASRSGrCompilerHwDeviceObserver& aObserver - ); - - /** - * Destructor. - */ - IMPORT_C virtual ~CASRSGrCompilerHwDevice(); - - public: // New functions - - /** - * Compiles a speaker independent grammar. Asynchronous. - * Callback is MghdoGrammarCompilerComplete. - * @since 2.8 - * @param aSICompiledGrammar The grammar to be compiled. - * @return none - */ - IMPORT_C void CompileGrammarL( CSICompiledGrammar& aSICompiledGrammar ); - - /** - * Combines several speaker independent grammars. The result is a combined grammar - * in internal data format. - * If some rules are excluded (blacklisted), then they are absent from the combined - * grammar, but the compiled grammars are left untouched. - * @since 2.8 - * @param aCompiledGrammars Array of previously compiled grammar - * @param aExcludedRules Rules to be blacklisted. - * @return none - */ - IMPORT_C void CombineGrammarL(const RPointerArray& aCompiledGrammars, - const RPointerArray& aExcludedRules); - - /** - * Cancels grammar compilation. No callback is sent to the client. - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C void CancelCompilation(); - - /** - * Cancels grammar combination. No callback is sent to the client. - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C void CancelCombination(); - - /** - * Decodes an N-Best list from internal format into a recognition result. - * @since 2.8 - * @param aNBestIDs - N-Best result, as it came from the Recognition HW Device - * @param aSIResultSet - Empty recognition result to be populated. - * @param aSICompiledGrammar - The grammars, which were combined to get aCombinedGrammar - * @param aCombinedData - The combined grammar, which was used in recognition - * @return none - */ - IMPORT_C void ResolveResult(const RArray& aNBestIDs, - CSIResultSet& aSIResultSet, - const RPointerArray& aSICompiledGrammar, - const TDesC8& aCombinedData - ) const; - - public: // Functions from base classes - - /** - * From CASRSHwDevice - * Retrieve a custom interface - * @since 2.8 - * @param aInterfaceId - UID of the interface - * @return Pointer to a custom interface - */ - IMPORT_C TAny* CustomInterface(TUid aInterfaceId); - - /** - * From CASRSHwDevice - * Initializes the device. Subsequent calls reset the device. - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C void InitializeL(); - - /** - * From CASRSHwDevice - * Clears the device. - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C void ClearL(); - - private: - - /** - * C++ default constructor. - */ - CASRSGrCompilerHwDevice(MASRSGrCompilerHwDeviceObserver& aObserver); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - // Prohibit copy constructor if not deriving from CBase. - CASRSGrCompilerHwDevice( const CASRSGrCompilerHwDevice& ); - // Prohibit assigment operator if not deriving from CBase. - CASRSGrCompilerHwDevice& operator=( const CASRSGrCompilerHwDevice& ); - - private: // Data - - // The observer - MASRSGrCompilerHwDeviceObserver& iObserver; - - // Implementation-specific functions and data - CAsrsGrCompilerAlgorithm *iAlgorithm; - - // Has Initialize() been called - TBool iIsInitialised; - - // Reserved pointer for future extension. - TAny* iReserved; - }; - -#endif // ASRSGRCOMPILERHWDEVICE_H - -// End of File diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/group/bld.inf --- a/srsfenginestub/group/bld.inf Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* -* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for all SRSF hardware device stubs. -* -*/ - - - - - -#include -#include "srsfenginestubbldvariant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS -../rom/srsfenginestub.iby CORE_IBY_EXPORT_PATH(stubs, srsfenginestub.iby) - -PRJ_MMPFILES -../grcompilerhwdevice/group/asrsgrcompilerhwdevicestub.mmp -../ttphwdevice/group/asrsttphwdevicestub.mmp -../recognitionhwdevice/group/asrsrecognitionhwdevicestub.mmp -../adaptationhwdevice/group/asradaptationhwdevicestub.mmp -../vocmanhwdevice/group/asrvocmanhwdevicestub.mmp -../ttshwdevice/group/ttshwdevicestub.mmp -../nlphwdevice/group/asrsnlphwdevicestub.mmp - -// End of File diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/group/srsfenginestubbldvariant.hrh --- a/srsfenginestub/group/srsfenginestubbldvariant.hrh Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Flags for SRSFEngineStub build -* -*/ - - - - - -#ifndef SRSFENGINESTUBBLDVARIANT_HRH -#define SRSFENGINESTUBBLDVARIANT_HRH - -// Define these flags in ProductVariant.hrh if non-default configuration is needed - -#endif // SRSFENGINESTUBBLDVARIANT - -// End of File diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/layers.sysdef.xml --- a/srsfenginestub/layers.sysdef.xml Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ - - -]> - - - - - - - - - - \ No newline at end of file diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/nlphwdevice/bwins/asrsnlphwdeviceu.def --- a/srsfenginestub/nlphwdevice/bwins/asrsnlphwdeviceu.def Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -EXPORTS - ??1CASRSHwDevice@@UAE@XZ @ 1 NONAME ; CASRSHwDevice::~CASRSHwDevice(void) - ??1CNlpHwDevice@@UAE@XZ @ 2 NONAME ; CNlpHwDevice::~CNlpHwDevice(void) - ?Clear@CASRSHwDevice@@UAEXXZ @ 3 NONAME ; void CASRSHwDevice::Clear(void) - ?CustomInterface@CASRSHwDevice@@UAEPAXVTUid@@@Z @ 4 NONAME ; void * CASRSHwDevice::CustomInterface(class TUid) - ?InitializeL@CASRSHwDevice@@UAEXXZ @ 5 NONAME ; void CASRSHwDevice::InitializeL(void) - ?IsLanguageSupported@CNlpHwDevice@@QAEHW4TLanguage@@@Z @ 6 NONAME ; int CNlpHwDevice::IsLanguageSupported(enum TLanguage) - ?NewL@CASRSHwDevice@@SAPAV1@XZ @ 7 NONAME ; class CASRSHwDevice * CASRSHwDevice::NewL(void) - ?NewL@CNlpHwDevice@@SAPAV1@AAVMNlpHwDeviceObserver@@@Z @ 8 NONAME ; class CNlpHwDevice * CNlpHwDevice::NewL(class MNlpHwDeviceObserver &) - ?NormalizeAndSegmentTextL@CNlpHwDevice@@QAEXAAVCTtsParsedText@@@Z @ 9 NONAME ; void CNlpHwDevice::NormalizeAndSegmentTextL(class CTtsParsedText &) - ?NormalizeTextL@CNlpHwDevice@@QAEXAAVCTtsParsedText@@@Z @ 10 NONAME ; void CNlpHwDevice::NormalizeTextL(class CTtsParsedText &) - ?NormalizeAndSegmentTextAsyncL@CNlpHwDevice@@QAEXAAVCTtsParsedText@@@Z @ 11 NONAME ; void CNlpHwDevice::NormalizeAndSegmentTextAsyncL(class CTtsParsedText &) - ?NormalizeTextAsyncL@CNlpHwDevice@@QAEXAAVCTtsParsedText@@@Z @ 12 NONAME ; void CNlpHwDevice::NormalizeTextAsyncL(class CTtsParsedText &) - diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/nlphwdevice/eabi/asrsnlphwdeviceu.def --- a/srsfenginestub/nlphwdevice/eabi/asrsnlphwdeviceu.def Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -EXPORTS - _ZN12CNlpHwDevice14NormalizeTextLER14CTtsParsedText @ 1 NONAME - _ZN12CNlpHwDevice19IsLanguageSupportedE9TLanguage @ 2 NONAME - _ZN12CNlpHwDevice24NormalizeAndSegmentTextLER14CTtsParsedText @ 3 NONAME - _ZN12CNlpHwDevice4NewLER20MNlpHwDeviceObserver @ 4 NONAME - _ZN12CNlpHwDeviceD0Ev @ 5 NONAME - _ZN12CNlpHwDeviceD1Ev @ 6 NONAME - _ZN12CNlpHwDeviceD2Ev @ 7 NONAME - _ZN13CASRSHwDevice11InitializeLEv @ 8 NONAME - _ZN13CASRSHwDevice15CustomInterfaceE4TUid @ 9 NONAME - _ZN13CASRSHwDevice4NewLEv @ 10 NONAME - _ZN13CASRSHwDevice5ClearEv @ 11 NONAME - _ZN13CASRSHwDeviceD0Ev @ 12 NONAME - _ZN13CASRSHwDeviceD1Ev @ 13 NONAME - _ZN13CASRSHwDeviceD2Ev @ 14 NONAME - _ZTI12CNlpHwDevice @ 15 NONAME ; ## - _ZTI13CASRSHwDevice @ 16 NONAME ; ## - _ZTV12CNlpHwDevice @ 17 NONAME ; ## - _ZTV13CASRSHwDevice @ 18 NONAME ; ## - _ZN12CNlpHwDevice19NormalizeTextAsyncLER14CTtsParsedText @ 19 NONAME - _ZN12CNlpHwDevice29NormalizeAndSegmentTextAsyncLER14CTtsParsedText @ 20 NONAME - diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/nlphwdevice/group/asrsnlphwdevicestub.mmp --- a/srsfenginestub/nlphwdevice/group/asrsnlphwdevicestub.mmp Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for AsrsNlpHwDeviceStub -* -*/ - - - - -#include - -#if defined( WINS ) || defined( WINSCW ) -TARGET asrsnlphwdevice.dll -#else -TARGET asrsnlphwdevice_stub.dll -#endif - -TARGETTYPE DLL -UID 0x1000008D 0x10201AF3 // UID: 270539507 - -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE asrsnlphwdevice.cpp - -SOURCEPATH ../../common/src -SOURCE asrshwdevice.cpp - -USERINCLUDE ../inc ../src -USERINCLUDE ../../common/src - -// This is a SYSTEMINCLUDE macro containing the middleware -// layer specific include directories -APP_LAYER_SYSTEMINCLUDE - -SYSTEMINCLUDE ../../common/inc - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY asrsnlphwdevice.lib - -// On ROM dll name is without the _stub part so that it can easily be -// replaced with the real dll -LINKAS asrsnlphwdevice.dll - -CAPABILITY CAP_GENERAL_DLL - - - diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/nlphwdevice/group/bld.inf --- a/srsfenginestub/nlphwdevice/group/bld.inf Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for AsrsNlpHwDeviceStub -* -*/ - - - - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -asrsnlphwdevicestub.mmp - -// End of File \ No newline at end of file diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/nlphwdevice/src/asrsnlphwdevice.cpp --- a/srsfenginestub/nlphwdevice/src/asrsnlphwdevice.cpp Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,139 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: HW device stub of NLP -* -*/ - - - - - -// INCLUDE FILES -#include "asrsnlphwdevice.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CNlpHwDevice::CNlpHwDevice -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CNlpHwDevice::CNlpHwDevice(): - iAlgorithm( NULL ), - iReserved( NULL ) - { - // nothing - } - -// ----------------------------------------------------------------------------- -// CNlpHwDevice::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CNlpHwDevice::ConstructL( MNlpHwDeviceObserver& /*aObserver*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CNlpHwDevice::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CNlpHwDevice* CNlpHwDevice::NewL( MNlpHwDeviceObserver& aObserver ) - { - CNlpHwDevice* self = new( ELeave ) CNlpHwDevice; - - CleanupStack::PushL( self ); - self->ConstructL( aObserver); - CleanupStack::Pop(); - - return self; - } - -// ----------------------------------------------------------------------------- -// CNlpHwDevice::~CNlpHwDevice -// Destructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CNlpHwDevice::~CNlpHwDevice() - { - } - -// ----------------------------------------------------------------------------- -// CNlpHwDevice::IsLanguageSupported -// Tells if given language is supported by NLP module or not. -// ----------------------------------------------------------------------------- -// -EXPORT_C TBool CNlpHwDevice::IsLanguageSupported( TLanguage /*aLanguage*/ ) - { - return EFalse; - } - -// ----------------------------------------------------------------------------- -// CNlpHwDevice::NormalizeTextL -// Processes text. -// ----------------------------------------------------------------------------- -// -EXPORT_C void CNlpHwDevice::NormalizeTextL( CTtsParsedText& /*aText*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CNlpHwDevice::NormalizeAndSegmentTextL -// Processes text and divides it to segments. -// ----------------------------------------------------------------------------- -// -EXPORT_C void CNlpHwDevice::NormalizeAndSegmentTextL( CTtsParsedText& /*aText*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CNlpHwDevice::NormalizeTextL -// Processes text. -// ----------------------------------------------------------------------------- -// -EXPORT_C void CNlpHwDevice::NormalizeTextAsyncL( CTtsParsedText& /*aText*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CNlpHwDevice::NormalizeAndSegmentTextL -// Processes text and divides it to segments. -// ----------------------------------------------------------------------------- -// -EXPORT_C void CNlpHwDevice::NormalizeAndSegmentTextAsyncL( CTtsParsedText& /*aText*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// ----------------------------------------------------------------------------- -// for DLL goodness -// ----------------------------------------------------------------------------- -// - -#ifndef EKA2 -GLDEF_C TInt E32Dll( TDllReason ) -{ - return KErrNone; -} -#endif - -// End of File diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/nlphwdevice/src/asrsnlphwdevice.h --- a/srsfenginestub/nlphwdevice/src/asrsnlphwdevice.h Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,171 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Algorithms for text normalization -* -*/ - - - - - -#ifndef NLPHWDEVICE_H -#define NLPHWDEVICE_H - -// INCLUDES -#include -#include -#include -#include - -// FORWARD DECLARATIONS -class CNlpAlgorithm; - -// CLASS DECLARATION -/** -* Class to define callback functions -* -* @lib asrsttshwdevice.lib -* @since 3.0 -*/ -class MNlpHwDeviceObserver - { - public: // New functions - - /** - * Called by the HW device when the asynchronous text processing - * has been completed. - * @since 3.0 - * @param aStatus Error code, KErrNone if success - * @return none - */ - virtual void MnhdoNlpCompleted( TInt aStatus ) = 0; - - - /** - * Invoked by Nlp Hw Device when it needs a configuration data package. - * @since 3.0 - * @param aPackageType Type identifier. - * @param aPackageID Identifier of package - * @param aStartPosition Start index in bytes - * @param aEndPosition End index in bytes. If the position is bigger - * than the size of data package, the end part will be returned. - * @return Data package in a buffer - */ - virtual HBufC8* MnhdoConfigurationData( TUint32 aPackageType, - TUint32 aPackageID, - TUint32 aStartPosition = 0, - TUint32 aEndPosition = KMaxTUint32 - ) = 0; - - - /** - * Returns style given the style id. - * @since 3.0 - * @param aStyleID The style id. - * @return A reference to TTtsStyle. - */ - virtual const TTtsStyle& MnhdoStyleL( TTtsStyleID aStyleID ) = 0; - - }; - - -/** -* Class to provide text normalization -* -* @lib asrsnlphwdevice.lib -* @since 3.0 -*/ -class CNlpHwDevice : public CASRSHwDevice - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - * @param aObserver Observer which implements callback functions. - * @param aSamplingRate Sampling rate for output audio - * @param aBufferSize Buffer size for output audio - */ - IMPORT_C static CNlpHwDevice* NewL( MNlpHwDeviceObserver& aObserver ); - - /** - * Destructor. - */ - IMPORT_C virtual ~CNlpHwDevice(); - - public: // New functions - - /** - * Ask if a language is supported or not. - * @since 3.0 - * @param aLanguage Synthesizing language. - * @return ETrue language is supported otherwise EFalse - */ - IMPORT_C TBool IsLanguageSupported( TLanguage aLanguage ); - - - /** - * Normalize given text, text is not splits into segments. - * @since 3.0 - * @param aText - */ - IMPORT_C void NormalizeTextL( CTtsParsedText& aText ); - - - /** - * Normalize given text asynchronously, text is not splits into segments. - * @since 3.0 - * @param aText - */ - IMPORT_C void NormalizeTextAsyncL( CTtsParsedText& aText ); - - - /** - * Normalize given text, text is split into segments - * @since 3.0 - * @param aText - */ - IMPORT_C void NormalizeAndSegmentTextL( CTtsParsedText& aText ); - - /** - * Normalize given text asynchronously, text is split into segments - * @since 3.0 - * @param aText - */ - IMPORT_C void NormalizeAndSegmentTextAsyncL( CTtsParsedText& aText ); - - private: - - /** - * C++ default constructor. - */ - CNlpHwDevice(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL( MNlpHwDeviceObserver& aObserver ); - - private: // Data - - // Actual algorithm where all processing happens - CNlpAlgorithm* iAlgorithm; - - // Reserved pointer for future extension - TAny* iReserved; - - }; - -#endif // NLPHWDEVICE_H - -// End of File diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/recognitionhwdevice/bwins/asrsrecognitionhwdeviceu.def --- a/srsfenginestub/recognitionhwdevice/bwins/asrsrecognitionhwdeviceu.def Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -EXPORTS - ??1CASRSHwDevice@@UAE@XZ @ 1 NONAME ; CASRSHwDevice::~CASRSHwDevice(void) - ??1CASRSRecognitionHwDevice@@UAE@XZ @ 2 NONAME ; CASRSRecognitionHwDevice::~CASRSRecognitionHwDevice(void) - ?Clear@CASRSHwDevice@@UAEXXZ @ 3 NONAME ; void CASRSHwDevice::Clear(void) - ?Clear@CASRSRecognitionHwDevice@@UAEXXZ @ 4 NONAME ; void CASRSRecognitionHwDevice::Clear(void) - ?CustomInterface@CASRSHwDevice@@UAEPAXVTUid@@@Z @ 5 NONAME ; void * CASRSHwDevice::CustomInterface(class TUid) - ?CustomInterface@CASRSRecognitionHwDevice@@UAEPAXVTUid@@@Z @ 6 NONAME ; void * CASRSRecognitionHwDevice::CustomInterface(class TUid) - ?GetRejection@CASRSRecognitionHwDevice@@QAEKXZ @ 7 NONAME ; unsigned long CASRSRecognitionHwDevice::GetRejection(void) - ?InitRecognizerBEL@CASRSRecognitionHwDevice@@QAEXABVTDesC8@@ABVCSIModelBank@@@Z @ 8 NONAME ; void CASRSRecognitionHwDevice::InitRecognizerBEL(class TDesC8 const &, class CSIModelBank const &) - ?InitRecognizerFEL@CASRSRecognitionHwDevice@@QAEXH@Z @ 9 NONAME ; void CASRSRecognitionHwDevice::InitRecognizerFEL(int) - ?InitializeL@CASRSHwDevice@@UAEXXZ @ 10 NONAME ; void CASRSHwDevice::InitializeL(void) - ?InitializeL@CASRSRecognitionHwDevice@@UAEXXZ @ 11 NONAME ; void CASRSRecognitionHwDevice::InitializeL(void) - ?NewL@CASRSHwDevice@@SAPAV1@XZ @ 12 NONAME ; class CASRSHwDevice * CASRSHwDevice::NewL(void) - ?NewL@CASRSRecognitionHwDevice@@SAPAV1@AAVMASRSRecognitionHwDeviceObserver@@@Z @ 13 NONAME ; class CASRSRecognitionHwDevice * CASRSRecognitionHwDevice::NewL(class MASRSRecognitionHwDeviceObserver &) - ?SendSpeechData@CASRSRecognitionHwDevice@@QAEXAAVTPtrC8@@H@Z @ 14 NONAME ; void CASRSRecognitionHwDevice::SendSpeechData(class TPtrC8 &, int) - ?SetNBest@CASRSRecognitionHwDevice@@QAEXK@Z @ 15 NONAME ; void CASRSRecognitionHwDevice::SetNBest(unsigned long) - ?SetRejection@CASRSRecognitionHwDevice@@QAEXK@Z @ 16 NONAME ; void CASRSRecognitionHwDevice::SetRejection(unsigned long) - ?StartRecognitionL@CASRSRecognitionHwDevice@@QAEXAAV?$RArray@I@@AAV?$RArray@H@@@Z @ 17 NONAME ; void CASRSRecognitionHwDevice::StartRecognitionL(class RArray &, class RArray &) - ?StopRecognition@CASRSRecognitionHwDevice@@QAEXXZ @ 18 NONAME ; void CASRSRecognitionHwDevice::StopRecognition(void) - diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/recognitionhwdevice/eabi/asrsrecognitionhwdeviceu.def --- a/srsfenginestub/recognitionhwdevice/eabi/asrsrecognitionhwdeviceu.def Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -EXPORTS - _ZN13CASRSHwDevice11InitializeLEv @ 1 NONAME - _ZN13CASRSHwDevice15CustomInterfaceE4TUid @ 2 NONAME - _ZN13CASRSHwDevice4NewLEv @ 3 NONAME - _ZN13CASRSHwDevice5ClearEv @ 4 NONAME - _ZN13CASRSHwDeviceD0Ev @ 5 NONAME - _ZN13CASRSHwDeviceD1Ev @ 6 NONAME - _ZN13CASRSHwDeviceD2Ev @ 7 NONAME - _ZN24CASRSRecognitionHwDevice11InitializeLEv @ 8 NONAME - _ZN24CASRSRecognitionHwDevice12GetRejectionEv @ 9 NONAME - _ZN24CASRSRecognitionHwDevice12SetRejectionEm @ 10 NONAME - _ZN24CASRSRecognitionHwDevice14SendSpeechDataER6TPtrC8i @ 11 NONAME - _ZN24CASRSRecognitionHwDevice15CustomInterfaceE4TUid @ 12 NONAME - _ZN24CASRSRecognitionHwDevice15StopRecognitionEv @ 13 NONAME - _ZN24CASRSRecognitionHwDevice17InitRecognizerBELERK6TDesC8RK12CSIModelBank @ 14 NONAME - _ZN24CASRSRecognitionHwDevice17InitRecognizerFELEi @ 15 NONAME - _ZN24CASRSRecognitionHwDevice17StartRecognitionLER6RArrayIjERS0_IiE @ 16 NONAME - _ZN24CASRSRecognitionHwDevice4NewLER32MASRSRecognitionHwDeviceObserver @ 17 NONAME - _ZN24CASRSRecognitionHwDevice5ClearEv @ 18 NONAME - _ZN24CASRSRecognitionHwDevice8SetNBestEm @ 19 NONAME - _ZN24CASRSRecognitionHwDeviceD0Ev @ 20 NONAME - _ZN24CASRSRecognitionHwDeviceD1Ev @ 21 NONAME - _ZN24CASRSRecognitionHwDeviceD2Ev @ 22 NONAME - _ZTI13CASRSHwDevice @ 23 NONAME ; ## - _ZTI24CASRSRecognitionHwDevice @ 24 NONAME ; ## - _ZTV13CASRSHwDevice @ 25 NONAME ; ## - _ZTV24CASRSRecognitionHwDevice @ 26 NONAME ; ## - diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/recognitionhwdevice/group/asrsrecognitionhwdevicestub.mmp --- a/srsfenginestub/recognitionhwdevice/group/asrsrecognitionhwdevicestub.mmp Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for recognition algorithm stub. -* -*/ - - - - -#include - -#if defined( WINS ) || defined( WINSCW ) -TARGET asrsrecognitionhwdevice.dll -#else -TARGET asrsrecognitionhwdevice_stub.dll -#endif - -TARGETTYPE DLL -UID 0x1000008D 0x101FF92F // 270530863 - -VENDORID VID_DEFAULT - -SOURCEPATH ../src - -SOURCE asrsrecognitionhwdevice.cpp - -SOURCEPATH ../../common/src -SOURCE asrshwdevice.cpp - -USERINCLUDE ../inc ../src - -// This is a SYSTEMINCLUDE macro containing the middleware -// layer specific include directories -APP_LAYER_SYSTEMINCLUDE - -SYSTEMINCLUDE ../../common/inc - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY asrsrecognitionhwdevice.lib - -// On ROM dll name is without the _stub part so that it can easily be -// replaced with the real dll -LINKAS asrsrecognitionhwdevice.dll - -CAPABILITY CAP_GENERAL_DLL diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/recognitionhwdevice/group/bld.inf --- a/srsfenginestub/recognitionhwdevice/group/bld.inf Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Build information for recognition algorithm stub. -* -*/ - - - - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -asrsrecognitionhwdevicestub.mmp - -// End of File diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/recognitionhwdevice/src/asrsrecognitionhwdevice.cpp --- a/srsfenginestub/recognitionhwdevice/src/asrsrecognitionhwdevice.cpp Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,204 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Recognition HW device -* -*/ - - - - - -// INCLUDE FILES -#include "asrsrecognitionhwdevice.h" -#include - - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::CASRSRecognitionHwDevice -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CASRSRecognitionHwDevice::CASRSRecognitionHwDevice() - : iRecAlgorithm( NULL ), - iReserved( NULL ) - { - } - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CASRSRecognitionHwDevice::ConstructL( - MASRSRecognitionHwDeviceObserver& /*aObserver*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CASRSRecognitionHwDevice* CASRSRecognitionHwDevice::NewL( - MASRSRecognitionHwDeviceObserver& aObserver ) - { - CASRSRecognitionHwDevice* self = new( ELeave ) CASRSRecognitionHwDevice; - - CleanupStack::PushL( self ); - self->ConstructL( aObserver ); - CleanupStack::Pop(); - - return self; - } - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::~CASRSRecognitionHwDevice -// Destructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CASRSRecognitionHwDevice::~CASRSRecognitionHwDevice() - { - } - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::InitRecognizerBEL -// Calls equivalent function of CRecognitionAlgorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSRecognitionHwDevice::InitRecognizerBEL( - const TDesC8& /*aRecognitionData*/, - const CSIModelBank& /*aModels*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::InitRecognizerFEL -// Calls equivalent function of CRecognitionAlgorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSRecognitionHwDevice::InitRecognizerFEL( - TBool /*aSendFeatureVectors*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::SetNBest -// Calls equivalent function of CRecognitionAlgorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSRecognitionHwDevice::SetNBest( - TUint32 /*aNBest*/ ) - { - } - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::StartRecognitionL -// Calls equivalent function of CRecognitionAlgorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSRecognitionHwDevice::StartRecognitionL( - RArray& /*aNBestList*/, - RArray& /*aScore*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::StopRecognition -// Calls equivalent function of CRecognitionAlgorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSRecognitionHwDevice::StopRecognition() - { - } - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::SendSpeechData -// Calls equivalent function of CRecognitionAlgorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSRecognitionHwDevice::SendSpeechData( - TPtrC8& /*aBuffer*/, - TBool /*aEnd*/ ) - { - } - - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::InitializeL -// Calls equivalent function of CRecognitionAlgorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSRecognitionHwDevice::InitializeL() - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::Clear -// Calls equivalent function of CRecognitionAlgorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSRecognitionHwDevice::Clear() - { - } - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::CustomInterface -// Calls equivalent function of CRecognitionAlgorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TAny* CASRSRecognitionHwDevice::CustomInterface( - TUid /*aInterfaceId*/ ) - { - return NULL; - } - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::SetRejection -// Calls equivalent function of CRecognitionAlgorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSRecognitionHwDevice::SetRejection( TUint32 /*aRejection*/ ) - { - } - -// ----------------------------------------------------------------------------- -// CASRSRecognitionHwDevice::GetRejection -// Calls equivalent function of CRecognitionAlgorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TUint32 CASRSRecognitionHwDevice::GetRejection() - { - return 0; - } - -// End of File diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/recognitionhwdevice/src/asrsrecognitionhwdevice.h --- a/srsfenginestub/recognitionhwdevice/src/asrsrecognitionhwdevice.h Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,254 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: HW Device for speech recognition -* -*/ - - - - - - -#ifndef ASRSRECOGNITIONHWDEVICE_H -#define ASRSRECOGNITIONHWDEVICE_H - -// INCLUDES -#include - -// FORWARD DECLARATIONS -class CSDModelBank; -class CSIModelBank; -class CRecognitionAlgorithm; - -// CLASS DECLARATION -/** -* Observer for recognition HW device -* -* @lib asrsrecognitionhwdevice.lib -* @since 2.8 -*/ -class MASRSRecognitionHwDeviceObserver - { - - public: // New functions - - /** - * Called by the hardware device when the InitializeL() method has completed. - * @since 2.8 - * @param aError Initialization result code. - * KErrNone if successful otherwise a system-wide error code. - * @return none - */ - virtual void MarhdoInitializationComplete( TInt aError ) = 0; - - /** - * Called by the hardware device when the InitializeL() method has completed. - * @since 2.8 - * @param aError Initialization result code. - * KErrNone if successful otherwise a system-wide error code. - * @return none - */ - virtual void MarhdoInitRecognizerFEComplete( TInt aError ) = 0; - - /** - * Called by the hardware device when backend initialization is completed. - * @since 2.8 - * @param aError Initialization result code. - * KErrNone if successful otherwise a system-wide error code. - * @return none - */ - virtual void MarhdoInitRecognizerBEComplete( TInt aError ) = 0; - - /** - * Called by the hardware device when recognition result is available. - * @since 2.8 - * @param aError Recognition result code. KErrNone if successful. - * KErrRejected if the recognition result is rejected, - * otherwise a system-wide error code - * @return none - */ - virtual void MarhdoRecognitionComplete( TInt aError ) = 0; - - /** - * Called by the hardware device when end-of-utterance is detected by the - * acoustic frontend. This method must be called before MarhdoRecognitionComplete(). - * @since 2.8 - * @param aError Recognition result code. KErrNone if successful, otherwise KErrTooLong, - * KErrTooShort, KErrAsrSpeechTooEarly, KErrNoSpeech - * @return none - */ - virtual void MarhdoEouDetected( TInt aError ) = 0; - - /** - * Called by the hardware device when a feature vector is extracted by acoustic frontend. - * @since 2.8 - * @param aFV A buffer containing a feature vector. - * @param aSNR Signal-to-noise ratio. - * @param aPosition Indicates whether this is the first, subsequent or last feature vector in a series. - * @return none - */ - virtual void MarhdoFeatureVector( const TDesC8& aFV, TInt32 aSNR, TInt32 aPosition ) = 0; - - /** - * Called by the hardware device to request for utterance data. - * The response to the request is sent in SendSpeechData(). - * @since 2.8 - * @param none - * @return none - */ - virtual void MarhdoRequestSpeechData () = 0; - }; - -/** -* Recognition HW Device -* -* @lib asrsrecognitionhwdevice.lib -* @since 2.8 -*/ -class CASRSRecognitionHwDevice : public CASRSHwDevice - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CASRSRecognitionHwDevice* NewL( MASRSRecognitionHwDeviceObserver& aObserver ); - - /** - * Destructor. - */ - IMPORT_C virtual ~CASRSRecognitionHwDevice(); - - public: // New functions - - /** - * This method initializes the backend of the recognition Hw device. - * @since 2.8 - * @param aRecognitionData A recognition data generated by grammar compilation. - * @param aModels A model bank containing acoustic models - * @return none - */ - IMPORT_C void InitRecognizerBEL( const TDesC8& aRecognitionData, - const CSIModelBank& aModels ); - - /** - * This method initialize the frontend of the recognition Hwdevice - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C void InitRecognizerFEL( TBool aSendFeatureVectors = EFalse ); - - /** - * Sets the maximum number of entries wanted in the ranked list of recognition results. - * @since 2.8 - * @param aNBest The n-best number. - * @return none - */ - IMPORT_C void SetNBest( TUint32 aNBest ); - - /** - * Sets the rejection threshold. - * @since 3.2 - * @param aRejection Rejection threshold value. - * @return none - */ - IMPORT_C void SetRejection( TUint32 aRejection ); - - /** - * Gets the rejection threshold. - * @since 2.8 - * @param none - * @return Rejection threshold value. - */ - IMPORT_C TUint32 GetRejection(); - - /** - * Start recognition - * @since 2.8 - * @param aNBestList At the end of recognition, this object will contain Nbest list IDs. - * @param aScore At the end of recognition, this object will contain scores for Nbest list. - * @param aSendFeatureVectors ETrue send feature vector to client, EFalse do not send feature vector to client. - * @return none - */ - IMPORT_C void StartRecognitionL( RArray& aNBestList, RArray& aScore ); - - /** - * Stop a started recognition process. - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C void StopRecognition(); - - /** - * Use to send utterance data - * @since 2.8 - * @param aBuffer Buffer containing utterance data. - * @param aEnd End of utterance data indicator. ETrue indicates end of data or no data. - * @return none - */ - IMPORT_C void SendSpeechData( TPtrC8& aBuffer, TBool aEnd ); - - public: // Functions from base classes - - /** - * From CASRSHwDevice Use to initilize HW device - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C virtual void InitializeL(); - - /** - * From CASRSHwDevice Use to clear HW device - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C virtual void Clear(); - - /** - * From CASRSHwDevice Use to get custom interface - * @since 2.8 - * @param aInterfaceId Identifier of the intercace implementation - * @return Pointer to the interface implementation or NULL. - */ - IMPORT_C virtual TAny* CustomInterface( TUid aInterfaceId ); - - private: - - /** - * C++ default constructor. - */ - CASRSRecognitionHwDevice(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL( MASRSRecognitionHwDeviceObserver& aObserver ); - - private: // Data - - // Actual implementation of recognition - CRecognitionAlgorithm* iRecAlgorithm; - - // Reserved pointer for future extension - TAny* iReserved; - - }; - -#endif // ASRSRECOGNITIONHWDEVICE - -// End of File diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/rom/srsfenginestub.iby --- a/srsfenginestub/rom/srsfenginestub.iby Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - -#ifndef __SRSFENGINESTUB_IBY__ -#define __SRSFENGINESTUB_IBY__ - -#ifdef __SIND - -file=ABI_DIR\BUILD_DIR\asrsadaptationhwdevice_stub.dll SHARED_LIB_DIR\asrsadaptationhwdevice.dll -file=ABI_DIR\BUILD_DIR\asrsgrcompilerhwdevice_stub.dll SHARED_LIB_DIR\asrsgrcompilerhwdevice.dll -file=ABI_DIR\BUILD_DIR\asrsrecognitionhwdevice_stub.dll SHARED_LIB_DIR\asrsrecognitionhwdevice.dll -file=ABI_DIR\BUILD_DIR\asrsttphwdevice_stub.dll SHARED_LIB_DIR\asrsttphwdevice.dll -file=ABI_DIR\BUILD_DIR\asrsttshwdevice_stub.dll SHARED_LIB_DIR\asrsttshwdevice.dll -file=ABI_DIR\BUILD_DIR\asrsvocmanhwdevice_stub.dll SHARED_LIB_DIR\asrsvocmanhwdevice.dll -// New addition starting from 3.1 -file=ABI_DIR\BUILD_DIR\asrsnlphwdevice_stub.dll SHARED_LIB_DIR\asrsnlphwdevice.dll - -#endif // __SIND - -#endif // __SRSFENGINESTUB_IBY__ diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/sysdef_1_4_0.dtd --- a/srsfenginestub/sysdef_1_4_0.dtd Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/ttphwdevice/bwins/asrsttphwdeviceu.def --- a/srsfenginestub/ttphwdevice/bwins/asrsttphwdeviceu.def Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -EXPORTS - ??1CASRSHwDevice@@UAE@XZ @ 1 NONAME ; CASRSHwDevice::~CASRSHwDevice(void) - ??1CASRSTtpHwDevice@@UAE@XZ @ 2 NONAME ; CASRSTtpHwDevice::~CASRSTtpHwDevice(void) - ?CancelWordListConversion@CASRSTtpHwDevice@@QAEXXZ @ 3 NONAME ; void CASRSTtpHwDevice::CancelWordListConversion(void) - ?Clear@CASRSHwDevice@@UAEXXZ @ 4 NONAME ; void CASRSHwDevice::Clear(void) - ?Clear@CASRSTtpHwDevice@@UAEXXZ @ 5 NONAME ; void CASRSTtpHwDevice::Clear(void) - ?ConvertTextL@CASRSTtpHwDevice@@QAEPAVHBufC8@@ABVTDesC16@@AAW4TLanguage@@@Z @ 6 NONAME ; class HBufC8 * CASRSTtpHwDevice::ConvertTextL(class TDesC16 const &, enum TLanguage &) - ?ConvertWordListL@CASRSTtpHwDevice@@QAEXAAVCSITtpWordList@@V?$RArray@W4TLanguage@@@@V?$RArray@K@@@Z @ 7 NONAME ; void CASRSTtpHwDevice::ConvertWordListL(class CSITtpWordList &, class RArray, class RArray) - ?CustomInterface@CASRSHwDevice@@UAEPAXVTUid@@@Z @ 8 NONAME ; void * CASRSHwDevice::CustomInterface(class TUid) - ?CustomInterface@CASRSTtpHwDevice@@UAEPAXVTUid@@@Z @ 9 NONAME ; void * CASRSTtpHwDevice::CustomInterface(class TUid) - ?InitializeL@CASRSHwDevice@@UAEXXZ @ 10 NONAME ; void CASRSHwDevice::InitializeL(void) - ?InitializeL@CASRSTtpHwDevice@@UAEXXZ @ 11 NONAME ; void CASRSTtpHwDevice::InitializeL(void) - ?NewL@CASRSHwDevice@@SAPAV1@XZ @ 12 NONAME ; class CASRSHwDevice * CASRSHwDevice::NewL(void) - ?NewL@CASRSTtpHwDevice@@SAPAV1@AAVMASRSTtpHwDeviceObserver@@@Z @ 13 NONAME ; class CASRSTtpHwDevice * CASRSTtpHwDevice::NewL(class MASRSTtpHwDeviceObserver &) - ?PhonemeNotation@CASRSTtpHwDevice@@QAEABVTDesC16@@XZ @ 14 NONAME ; class TDesC16 const & CASRSTtpHwDevice::PhonemeNotation(void) - ?SetPhonemeNotationL@CASRSTtpHwDevice@@QAEXABVTDesC16@@@Z @ 15 NONAME ; void CASRSTtpHwDevice::SetPhonemeNotationL(class TDesC16 const &) - ?LanguageIdentificationL@CASRSTtpHwDevice@@QAEXABVTDesC16@@HAAV?$RArray@W4TLanguage@@@@AAV?$RArray@H@@@Z @ 16 NONAME ; public: void __thiscall CASRSTtpHwDevice::LanguageIdentificationL(class TDesC16 const &,int,class RArray &,class RArray &) - diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/ttphwdevice/eabi/asrsttphwdeviceu.def --- a/srsfenginestub/ttphwdevice/eabi/asrsttphwdeviceu.def Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -EXPORTS - _ZN13CASRSHwDevice11InitializeLEv @ 1 NONAME - _ZN13CASRSHwDevice15CustomInterfaceE4TUid @ 2 NONAME - _ZN13CASRSHwDevice4NewLEv @ 3 NONAME - _ZN13CASRSHwDevice5ClearEv @ 4 NONAME - _ZN13CASRSHwDeviceD0Ev @ 5 NONAME - _ZN13CASRSHwDeviceD1Ev @ 6 NONAME - _ZN13CASRSHwDeviceD2Ev @ 7 NONAME - _ZN16CASRSTtpHwDevice11InitializeLEv @ 8 NONAME - _ZN16CASRSTtpHwDevice12ConvertTextLERK7TDesC16R9TLanguage @ 9 NONAME - _ZN16CASRSTtpHwDevice15CustomInterfaceE4TUid @ 10 NONAME - _ZN16CASRSTtpHwDevice15PhonemeNotationEv @ 11 NONAME - _ZN16CASRSTtpHwDevice16ConvertWordListLER14CSITtpWordList6RArrayI9TLanguageES2_ImE @ 12 NONAME - _ZN16CASRSTtpHwDevice19SetPhonemeNotationLERK7TDesC16 @ 13 NONAME - _ZN16CASRSTtpHwDevice24CancelWordListConversionEv @ 14 NONAME - _ZN16CASRSTtpHwDevice4NewLER24MASRSTtpHwDeviceObserver @ 15 NONAME - _ZN16CASRSTtpHwDevice5ClearEv @ 16 NONAME - _ZN16CASRSTtpHwDeviceD0Ev @ 17 NONAME - _ZN16CASRSTtpHwDeviceD1Ev @ 18 NONAME - _ZN16CASRSTtpHwDeviceD2Ev @ 19 NONAME - _ZTI13CASRSHwDevice @ 20 NONAME ; ## - _ZTI16CASRSTtpHwDevice @ 21 NONAME ; ## - _ZTV13CASRSHwDevice @ 22 NONAME ; ## - _ZTV16CASRSTtpHwDevice @ 23 NONAME ; ## - _ZN16CASRSTtpHwDevice23LanguageIdentificationLERK7TDesC16iR6RArrayI9TLanguageERS3_IiE @ 24 NONAME - diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/ttphwdevice/group/asrsttphwdevicestub.mmp --- a/srsfenginestub/ttphwdevice/group/asrsttphwdevicestub.mmp Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -/* -* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for AsrTtpHwDeviceStub. -* -*/ - - - - -#include -#include "../../group/srsfenginestubbldvariant.hrh" - -#if defined( WINS ) || defined( WINSCW ) -TARGET asrsttphwdevice.dll -#else -TARGET asrsttphwdevice_stub.dll -#endif - -TARGETTYPE DLL -UID 0x1000008D 0x101F8CA9 // UID: 270503081 - -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE asrsttphwdevice.cpp - -SOURCEPATH ../../common/src -SOURCE asrshwdevice.cpp - -USERINCLUDE ../inc ../src ../../group - -// This is a SYSTEMINCLUDE macro containing the middleware -// layer specific include directories -APP_LAYER_SYSTEMINCLUDE - -SYSTEMINCLUDE ../../common/inc - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY asrsttphwdevice.lib - -// On ROM dll name is without the _stub part so that it can easily be -// replaced with the real dll -LINKAS asrsttphwdevice.dll - -CAPABILITY CAP_GENERAL_DLL diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/ttphwdevice/group/bld.inf --- a/srsfenginestub/ttphwdevice/group/bld.inf Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for AsrsTtpHwDeviceStub -* -*/ - - - - - -#include "../../Group/SRSFEngineStubBldVariant.hrh" - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -asrsttphwdevicestub.mmp - -// End of File \ No newline at end of file diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/ttphwdevice/src/asrsttphwdevice.cpp --- a/srsfenginestub/ttphwdevice/src/asrsttphwdevice.cpp Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,219 +0,0 @@ -/* -* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: TTP hardware device stub. -* -*/ - - - - - -// INCLUDE FILES -#include "srsfenginestubbldvariant.hrh" -#include "asrsttphwdevice.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::CASRSTtpHwDevice -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CASRSTtpHwDevice::CASRSTtpHwDevice( MASRSTtpHwDeviceObserver& aObserver ) : - iObserver( aObserver ), - iTTPAlgorithm( NULL ), - iTTPAlgObserver( NULL ) - { - } - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CASRSTtpHwDevice::ConstructL() - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CASRSTtpHwDevice* CASRSTtpHwDevice::NewL( MASRSTtpHwDeviceObserver& aObserver ) - { - CASRSTtpHwDevice* self = new( ELeave ) CASRSTtpHwDevice( aObserver ); - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - - return self; - } - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::~CASRSTtpHwDevice -// Destructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CASRSTtpHwDevice::~CASRSTtpHwDevice() - { - } - - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::InitializeL -// Initialize TTP module -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSTtpHwDevice::InitializeL() - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::ConvertTextL -// Perform TTP for text. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C HBufC8* CASRSTtpHwDevice::ConvertTextL( const TDesC& /*aText*/, - TLanguage& /*aLanguage*/ ) - { - User::Leave( KErrNotSupported ); - return NULL; - } - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::ConvertWordListL -// Perform TTP for word list. Asynchronous. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSTtpHwDevice::ConvertWordListL( CSITtpWordList& /*aWordList*/, - const RArray /*aDefaultLanguage*/, - const RArray /*aMaxNPronunsForWord*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::CancelWordListConversion -// Cancel TTP for word list. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSTtpHwDevice::CancelWordListConversion() - { - } - - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::SetPhonemeNotationL -// Sets the output phoneme notation. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSTtpHwDevice::SetPhonemeNotationL( const TDesC& /*aNotation*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::PhonemeNotation -// Returns the phoneme notation in use. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C const TDesC& CASRSTtpHwDevice::PhonemeNotation() - { - _LIT( KError, "Error" ); - return KError; - } - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::Clear -// Clears HW Device. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSTtpHwDevice::Clear() - { - } - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::CustomInterface -// Returns pointer to wanted custom interface. Returns NULL pointer if not found. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TAny* CASRSTtpHwDevice::CustomInterface( TUid /*aInterfaceId*/ ) - { - return NULL; - } - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::WordListReady -// Notify that word list is ready -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CASRSTtpHwDevice::WordListReady( const TInt /*aError*/ ) - { - } - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::ConfigurationData -// Notify that configuration data is needed. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -HBufC8* CASRSTtpHwDevice::ConfigurationData( TUint32 /*aPackageType*/, - TUint32 /*aPackageID*/, - TUint32 /*aStartPosition*/, - TUint32 /*aEndPosition*/ ) - { - return NULL; - } - -// ----------------------------------------------------------------------------- -// CASRSTtpHwDevice::LanguageIdentificationL -// Tries to guess the language of given text. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSTtpHwDevice::LanguageIdentificationL( const TDesC& /*aText*/, - TInt /*aNumberOfGuesses*/, - RArray& /*aLanguages*/, - RArray& /*aScores*/ ) - { - User::Leave( KErrNotSupported ); - } - - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// For DLL goodness -#ifndef EKA2 -GLDEF_C TInt E32Dll( TDllReason /*aReason*/ ) - { - return KErrNone; - } -#endif - - -// End of File diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/ttphwdevice/src/asrsttphwdevice.h --- a/srsfenginestub/ttphwdevice/src/asrsttphwdevice.h Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,237 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Exported interface towards TTP HW Device. -* -*/ - - - - - -#ifndef ASRSTTPHWDEVICE_H -#define ASRSTTPHWDEVICE_H - -// INCLUDES -// Base class for all HW Devices -#include -// SI Data -#include - -// FORWARD DECLARATIONS -class CTTPAlgorithm; -class CTtpCallback; - - -// CLASS DECLARATION - -/** -* Class which defines callback functions. Client must implement this in order -* to receive callbacks. -* -* @lib asrsttphwdevice.lib -*/ -class MASRSTtpHwDeviceObserver - { - public: // New functions - - /** - * Callback function to load configuration data. - * Client provides an implementation. - * - * @param aPackageType Type identifier. - * @param aPackageID Package identifier. - * @param aStartPosition First byte. - * @param aEndPosition Last byte. If greater than the size of - * the data, rest of the data is given. - * @return Pointer to the data buffer, TTP HW Device takes ownership. - */ - virtual HBufC8* MathdoConfigurationData( TUint32 aPackageType, TUint32 aPackageID, - TUint32 aStartPosition = 0, - TUint32 aEndPosition = KMaxTUint32 ) = 0; - - /** - * Callback function to notify that word list is converted. - * Client provides an implementation. - * - * @param aError Error code, KErrNone if successful. - */ - virtual void MathdoWordListReady( const TInt aError ) = 0; - }; - -/** -* TTP HW Device interface. -* -* @lib asrsttphwdevice.lib -*/ -class CASRSTtpHwDevice : public CASRSHwDevice - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - * - * @param aObserver Reference to callback observer. - */ - IMPORT_C static CASRSTtpHwDevice* NewL( MASRSTtpHwDeviceObserver& aObserver ); - - /** - * Destructor. - */ - IMPORT_C virtual ~CASRSTtpHwDevice(); - - public: // New functions - - /** - * Use to convert text to phonemes. - * - * @param aText Text to be converted - * @param aLanguage Used language - * @return Phoneme sequence, client gains ownership - */ - IMPORT_C HBufC8* ConvertTextL( const TDesC& aText, - TLanguage& aLanguage ); - - /** - * Use to convert list of words to pronunciation sequences. - * - * @param aWordList Initialized word list to where - * pronunciations will be added. Client will keep the ownership - * of CSITtpWordList also after this call. - * @param aDefaultLanguage Language which overrides the first identified language. - * Iflanguage is ELangOther, language identification will be used. - * @param aMaxNPronunsForWord Maximum number of pronunciations (languages) for each word. - */ - IMPORT_C void ConvertWordListL( CSITtpWordList& aWordList, - const RArray aDefaultLanguage, - const RArray aMaxNPronunsForWord ); - - /** - * Use to cancel running word list conversion. - */ - IMPORT_C void CancelWordListConversion(); - - /** - * Sets the phoneme notation used in output. - * - * @param aNotation Phoneme notation identifier. - */ - IMPORT_C void SetPhonemeNotationL( const TDesC& aNotation ); - - /** - * Gets the current phoneme notation indentifier. - * - * @return Phoneme notation identifier. - */ - IMPORT_C const TDesC& PhonemeNotation(); - - public: // From CASRSHwDevice - - /** - * From CASRSHwDevice - * Custom interface - * - * @param aInterfaceId ID of wanted custom interface - * @return A pointer to the interface implementation, NULL if not found. - */ - IMPORT_C TAny* CustomInterface( TUid aInterfaceId ); - - /** - * From CASRSHwDevice - * Initializes Hw Device. - */ - IMPORT_C void InitializeL(); - - /** - * From CASRSHwDevice - * Clears Hw Device, counter part for InitializeL() - */ - IMPORT_C void Clear(); - - public: // New methods for SIND increment 3 - - /** - * Tries to identify the language of given text - * - * @param "const TDesC& aText" Text - * @param "TInt aNumberOfGuesses" Maximum number of guesses that will be provided - * @param "RArray& aLanguages" Output parameter, will contain list of guessed languages - * @param "RArray& aScores" Output parameter, scores - */ - IMPORT_C void LanguageIdentificationL( const TDesC& aText, - TInt aNumberOfGuesses, - RArray& aLanguages, - RArray& aScores ); - - private: - - /** - * C++ default constructor. - * @param aObserver Reference to observer. - */ - CASRSTtpHwDevice( MASRSTtpHwDeviceObserver& aObserver ); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - // Prohibit copy constructor if not deriving from CBase. - CASRSTtpHwDevice( const CASRSTtpHwDevice& ); - // Prohibit assigment operator if not deriving from CBase. - CASRSTtpHwDevice& operator=( const CASRSTtpHwDevice& ); - - /** - * Function to notify that word list is converted - * Called by CTtpCallback. - * - * @param aError Error code - */ - void WordListReady( const TInt aError ); - - /** - * Function to notify that configuration data is needed. - * Called by CTtpCallback. - * - * @param aPackageType Type identifier. - * @param aPackageID Package identifier. - * @param aStartPosition First byte. - * @param aEndPosition Last byte. If greater than the size of - * the data, rest of the data is given. - * @return Pointer to the data buffer. - */ - virtual HBufC8* ConfigurationData( TUint32 aPackageType, TUint32 aPackageID, - TUint32 aStartPosition = 0, - TUint32 aEndPosition = KMaxTUint32 ); - - private: // Data - // Observer - MASRSTtpHwDeviceObserver& iObserver; - - // algorithm implementation - CTTPAlgorithm* iTTPAlgorithm; - - // Implements call backs from CTTPAlgorithm - CTtpCallback* iTTPAlgObserver; - - // Reserved pointer for future extension - TAny* iReserved; - - private: // Friend classes - friend class CTtpCallback; - - }; - -#endif // ASRSTTPHWDEVICE_H - -// End of File diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/ttshwdevice/bwins/asrsttshwdeviceu.def --- a/srsfenginestub/ttshwdevice/bwins/asrsttshwdeviceu.def Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -EXPORTS - ??1CASRSHwDevice@@UAE@XZ @ 1 NONAME ; CASRSHwDevice::~CASRSHwDevice(void) - ??1CTtsHwDevice@@UAE@XZ @ 2 NONAME ; CTtsHwDevice::~CTtsHwDevice(void) - ?AddStyleL@CTtsHwDevice@@QAEKABVTTtsStyle@@@Z @ 3 NONAME ; unsigned long CTtsHwDevice::AddStyleL(class TTtsStyle const &) - ?AnalyzeProsodyL@CTtsHwDevice@@QAEXAAVCTtsParsedText@@@Z @ 4 NONAME ; void CTtsHwDevice::AnalyzeProsodyL(class CTtsParsedText &) - ?AnalyzeStructureL@CTtsHwDevice@@QAEXAAVCTtsParsedText@@@Z @ 5 NONAME ; void CTtsHwDevice::AnalyzeStructureL(class CTtsParsedText &) - ?BufferProcessed@CTtsHwDevice@@QAEXABVTDesC8@@@Z @ 6 NONAME ; void CTtsHwDevice::BufferProcessed(class TDesC8 const &) - ?Clear@CASRSHwDevice@@UAEXXZ @ 7 NONAME ; void CASRSHwDevice::Clear(void) - ?CustomInterface@CASRSHwDevice@@UAEPAXVTUid@@@Z @ 8 NONAME ; void * CASRSHwDevice::CustomInterface(class TUid) - ?DeleteStyleL@CTtsHwDevice@@QAEXK@Z @ 9 NONAME ; void CTtsHwDevice::DeleteStyleL(unsigned long) - ?GetPositionL@CTtsHwDevice@@QAEXAAVTTimeIntervalMicroSeconds@@@Z @ 10 NONAME ; void CTtsHwDevice::GetPositionL(class TTimeIntervalMicroSeconds &) - ?GetPositionL@CTtsHwDevice@@QAEXAAVTTtsSegment@@AAH@Z @ 11 NONAME ; void CTtsHwDevice::GetPositionL(class TTtsSegment &, int &) - ?InitializeL@CASRSHwDevice@@UAEXXZ @ 12 NONAME ; void CASRSHwDevice::InitializeL(void) - ?IsLanguageSupported@CTtsHwDevice@@QAEHW4TLanguage@@@Z @ 13 NONAME ; int CTtsHwDevice::IsLanguageSupported(enum TLanguage) - ?NewL@CASRSHwDevice@@SAPAV1@XZ @ 14 NONAME ; class CASRSHwDevice * CASRSHwDevice::NewL(void) - ?NewL@CTtsHwDevice@@SAPAV1@AAVMTtsHwDeviceObserver@@II@Z @ 15 NONAME ; class CTtsHwDevice * CTtsHwDevice::NewL(class MTtsHwDeviceObserver &, unsigned int, unsigned int) - ?NumberOfStyles@CTtsHwDevice@@QBEGXZ @ 16 NONAME ; unsigned short CTtsHwDevice::NumberOfStyles(void) const - ?Pause@CTtsHwDevice@@QAEXXZ @ 17 NONAME ; void CTtsHwDevice::Pause(void) - ?PrimeSynthesisL@CTtsHwDevice@@QAEXAAVCTtsParsedText@@@Z @ 18 NONAME ; void CTtsHwDevice::PrimeSynthesisL(class CTtsParsedText &) - ?PrimeSynthesisL@CTtsHwDevice@@QAEXAAVMTtsSegmentStream@@@Z @ 19 NONAME ; void CTtsHwDevice::PrimeSynthesisL(class MTtsSegmentStream &) - ?SetPositionL@CTtsHwDevice@@QAEXABVTTimeIntervalMicroSeconds@@@Z @ 20 NONAME ; void CTtsHwDevice::SetPositionL(class TTimeIntervalMicroSeconds const &) - ?SetPositionL@CTtsHwDevice@@QAEXABVTTtsSegment@@H@Z @ 21 NONAME ; void CTtsHwDevice::SetPositionL(class TTtsSegment const &, int) - ?Stop@CTtsHwDevice@@QAEXXZ @ 22 NONAME ; void CTtsHwDevice::Stop(void) - ?StyleL@CTtsHwDevice@@QAEAAVTTtsStyle@@G@Z @ 23 NONAME ; class TTtsStyle & CTtsHwDevice::StyleL(unsigned short) - ?StyleL@CTtsHwDevice@@QAEAAVTTtsStyle@@K@Z @ 24 NONAME ; class TTtsStyle & CTtsHwDevice::StyleL(unsigned long) - ?SynthesizeL@CTtsHwDevice@@QAEXXZ @ 25 NONAME ; void CTtsHwDevice::SynthesizeL(void) - diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/ttshwdevice/eabi/asrsttshwdeviceu.def --- a/srsfenginestub/ttshwdevice/eabi/asrsttshwdeviceu.def Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -EXPORTS - _ZN12CTtsHwDevice11SynthesizeLEv @ 1 NONAME - _ZN12CTtsHwDevice12DeleteStyleLEm @ 2 NONAME - _ZN12CTtsHwDevice12GetPositionLER11TTtsSegmentRi @ 3 NONAME - _ZN12CTtsHwDevice12GetPositionLER25TTimeIntervalMicroSeconds @ 4 NONAME - _ZN12CTtsHwDevice12SetPositionLERK11TTtsSegmenti @ 5 NONAME - _ZN12CTtsHwDevice12SetPositionLERK25TTimeIntervalMicroSeconds @ 6 NONAME - _ZN12CTtsHwDevice15AnalyzeProsodyLER14CTtsParsedText @ 7 NONAME - _ZN12CTtsHwDevice15BufferProcessedERK6TDesC8 @ 8 NONAME - _ZN12CTtsHwDevice15PrimeSynthesisLER14CTtsParsedText @ 9 NONAME - _ZN12CTtsHwDevice15PrimeSynthesisLER17MTtsSegmentStream @ 10 NONAME - _ZN12CTtsHwDevice17AnalyzeStructureLER14CTtsParsedText @ 11 NONAME - _ZN12CTtsHwDevice19IsLanguageSupportedE9TLanguage @ 12 NONAME - _ZN12CTtsHwDevice4NewLER20MTtsHwDeviceObserverjj @ 13 NONAME - _ZN12CTtsHwDevice4StopEv @ 14 NONAME - _ZN12CTtsHwDevice5PauseEv @ 15 NONAME - _ZN12CTtsHwDevice6StyleLEm @ 16 NONAME - _ZN12CTtsHwDevice6StyleLEt @ 17 NONAME - _ZN12CTtsHwDevice9AddStyleLERK9TTtsStyle @ 18 NONAME - _ZN12CTtsHwDeviceD0Ev @ 19 NONAME - _ZN12CTtsHwDeviceD1Ev @ 20 NONAME - _ZN12CTtsHwDeviceD2Ev @ 21 NONAME - _ZN13CASRSHwDevice11InitializeLEv @ 22 NONAME - _ZN13CASRSHwDevice15CustomInterfaceE4TUid @ 23 NONAME - _ZN13CASRSHwDevice4NewLEv @ 24 NONAME - _ZN13CASRSHwDevice5ClearEv @ 25 NONAME - _ZN13CASRSHwDeviceD0Ev @ 26 NONAME - _ZN13CASRSHwDeviceD1Ev @ 27 NONAME - _ZN13CASRSHwDeviceD2Ev @ 28 NONAME - _ZNK12CTtsHwDevice14NumberOfStylesEv @ 29 NONAME - _ZTI12CTtsHwDevice @ 30 NONAME ; ## - _ZTI13CASRSHwDevice @ 31 NONAME ; ## - _ZTV12CTtsHwDevice @ 32 NONAME ; ## - _ZTV13CASRSHwDevice @ 33 NONAME ; ## - diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/ttshwdevice/group/bld.inf --- a/srsfenginestub/ttshwdevice/group/bld.inf Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Build information for TTS HWDevice Stub. -* -*/ - - - - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -TTSHwDeviceStub.mmp - -// End of File diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/ttshwdevice/group/ttshwdevicestub.mmp --- a/srsfenginestub/ttshwdevice/group/ttshwdevicestub.mmp Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for TtsHwDeviceStub. -* -*/ - - - - -#include - -#if defined( WINS ) || defined( WINSCW ) -TARGET asrsttshwdevice.dll -#else -TARGET asrsttshwdevice_stub.dll -#endif - -TARGETTYPE DLL -UID 0x1000008D 0x101F8CA5 - -VENDORID VID_DEFAULT - -USERINCLUDE . ../inc -// This is a SYSTEMINCLUDE macro containing the middleware -// layer specific include directories -APP_LAYER_SYSTEMINCLUDE - -SYSTEMINCLUDE ../../common/inc -SYSTEMINCLUDE ../../common/src - -SOURCEPATH ../src -SOURCE asrsttshwdevice.cpp - -SOURCEPATH ../../common/src -SOURCE asrshwdevice.cpp - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY asrsttshwdevice.lib - -// On ROM dll name is without the _stub part so that it can easily be -// replaced with the real dll -LINKAS asrsttshwdevice.dll - -CAPABILITY CAP_GENERAL_DLL diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/ttshwdevice/src/asrsttshwdevice.cpp --- a/srsfenginestub/ttshwdevice/src/asrsttshwdevice.cpp Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,300 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Stub algorithms for Speech Synthesis -* -*/ - - - - - -// INCLUDE FILES -#include "asrsttshwdevice.h" -#include - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::CTtsHwDevice -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CTtsHwDevice::CTtsHwDevice(): iAlgorithm( NULL ), iReserved( NULL ) - { - // nothing - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CTtsHwDevice::ConstructL( MTtsHwDeviceObserver& /*aObserver*/, - TUint /*aSamplingRate*/, - TUint /*aBufferSize*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CTtsHwDevice* CTtsHwDevice::NewL( MTtsHwDeviceObserver& aObserver, - TUint aSamplingRate, - TUint aBufferSize ) - { - CTtsHwDevice* self = new ( ELeave ) CTtsHwDevice; - - CleanupStack::PushL( self ); - self->ConstructL( aObserver, aSamplingRate, aBufferSize ); - CleanupStack::Pop(); - - return self; - } - - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::~CTtsHwDevice -// Destructor; -// ----------------------------------------------------------------------------- -// -EXPORT_C CTtsHwDevice::~CTtsHwDevice() - { - } - - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::AddStyleL -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TTtsStyleID CTtsHwDevice::AddStyleL( const TTtsStyle& /*aStyle*/ ) - { - User::Leave( KErrNotSupported ); - return 0; - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::AnalyzeProsodyL -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTtsHwDevice::AnalyzeProsodyL( CTtsParsedText& /*aText*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::AnalyzeStructureL -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTtsHwDevice::AnalyzeStructureL( CTtsParsedText& /*aText*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::BufferProcessed -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTtsHwDevice::BufferProcessed( const TDesC8& /*aBuffer*/ ) - { - } - - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::DeleteStyleL -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTtsHwDevice::DeleteStyleL( TTtsStyleID /*aStyleID*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::GetPositionL -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTtsHwDevice::GetPositionL( TTimeIntervalMicroSeconds& /*aTime*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::GetPositionL -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTtsHwDevice::GetPositionL( TTtsSegment& /*aSegment*/, - TInt& /*aWordIndex*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::IsLanguageSupported -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TBool CTtsHwDevice::IsLanguageSupported( TLanguage /*aLanguage*/ ) - { - return EFalse; - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::NumberOfStyles -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TUint16 CTtsHwDevice::NumberOfStyles() const - { - return 0; - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::Pause -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTtsHwDevice::Pause() - { - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::PrimeSynthesisL -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTtsHwDevice::PrimeSynthesisL( MTtsSegmentStream& /*aStream*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::PrimeSynthesisL -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTtsHwDevice::PrimeSynthesisL( CTtsParsedText& /*aText*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::SetPositionL -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTtsHwDevice::SetPositionL( const TTimeIntervalMicroSeconds& /*aTime*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::SetPositionL -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTtsHwDevice::SetPositionL( const TTtsSegment& /*aSegment*/, - TInt /*aWordIndex*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::Stop -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTtsHwDevice::Stop() - { - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::StyleL -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TTtsStyle& CTtsHwDevice::StyleL( TTtsStyleID /*aStyleID*/ ) - { - User::Leave( KErrNotSupported ); - // Just for removing errors & warning, we never get here - TInt* dummy = new ( ELeave ) TInt; - TTtsStyle* style = (TTtsStyle*) dummy; - return *style; - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::StyleL -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TTtsStyle& CTtsHwDevice::StyleL( TUint16 /*aIndex*/ ) - { - User::Leave( KErrNotSupported ); - // Just for removing errors & warning, we never get here - TInt* dummy = new ( ELeave ) TInt; - TTtsStyle* style = (TTtsStyle*) dummy; - return *style; - } - -// ----------------------------------------------------------------------------- -// CTtsHwDevice::SynthesizeL -// Calls responding function of TTS algorithm -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CTtsHwDevice::SynthesizeL() - { - User::Leave( KErrNotSupported ); - } - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// ----------------------------------------------------------------------------- -// for DLL goodness -// ----------------------------------------------------------------------------- -// -#ifndef EKA2 -GLDEF_C TInt E32Dll( TDllReason /*aReason*/ ) - { - return KErrNone; - } -#endif - -// End of File diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/ttshwdevice/src/asrsttshwdevice.h --- a/srsfenginestub/ttshwdevice/src/asrsttshwdevice.h Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,293 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Algorithms for Speech Synthesis -* -*/ - - - - - -#ifndef TTSHWDEVICE_H -#define TTSHWDEVICE_H - -// INCLUDES -#include -#include -#include -#include - -// FORWARD DECLARATIONS -class CTtsAlgorithm; - -// CLASS DECLARATION -/** -* Class to define callback functions -* -* @lib asrsttshwdevice.lib -* @since 2.8 -*/ -class MTtsHwDeviceObserver - { - public: // New functions - - /** - * Called by the HW device when the synthesis has been completed. - * @since 2.8 - * @param aStatus Error code, KErrNone if success - * @return none - */ - virtual void MthdTtsCompleted( TInt aStatus ) = 0; - - /** - * Invoked by TTS HW Device when it needs a configuration data package. - * @since 2.8 - * @param aPackageType Type identifier. - * @param aPackageID Identifier of package - * @param aStartPosition Start index in bytes - * @param aEndPosition End index in bytes. If the position is bigger - * than the size of data package, the end part will be returned. - * @return Data package in a buffer - */ - virtual HBufC8* MthdoConfigurationData( TUint32 aPackageType, - TUint32 aPackageID, - TUint32 aStartPosition, - TUint32 aEndPosition) = 0; - /** - * Called by the HW device when custom command implementation wants to notify a client. - * @since 2.8 - * @param aEvent Event code aStatus Error code, KErrNone if success. - * @param aParameter Optional parameter - * @return none - */ - virtual void MthdCustomEvent( TInt aEvent, - TInt aStatus, - const TDesC8& aParameter = KNullDesC8 ) = 0; - - /** - * Called by the HW device when the HW device has synthesized a new audio buffer. - * @since 2.8 - * @param aBuffer Synthesized audio buffer. - * @return none - */ - virtual void MthdProcessBuffer( const TDesC8& aBuffer ) = 0; - - }; - - - -/** -* Class to provide speech synthesis -* -* @lib asrsttshwdevice.lib -* @since 2.8 -*/ -class CTtsHwDevice : public CASRSHwDevice - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - * @param aObserver Observer which implements callback functions. - * @param aSamplingRate Sampling rate for output audio - * @param aBufferSize Buffer size for output audio - */ - IMPORT_C static CTtsHwDevice* NewL( MTtsHwDeviceObserver& aObserver, - TUint aSamplingRate, - TUint aBufferSize ); - - /** - * Destructor. - */ - IMPORT_C virtual ~CTtsHwDevice(); - - public: // New functions - - /** - * Adds new style to the collection. If equal style exists already, new style is not added. - * @since 2.8 - * @param aStyle Style to be added. - * @return Identifier of added style. If equal style exists already, identifier to the old style will be returned. - */ - IMPORT_C TTtsStyleID AddStyleL( const TTtsStyle& aStyle ); - - /** - * Analyses stucture of text and adds style information. - * @since 2.8 - * @param aText Updates text object by dividing it into segments with new styles. - * @return none - */ - IMPORT_C void AnalyzeProsodyL( CTtsParsedText& aText ); - - /** - * Analyses stucture of text by finding paragraphs and sentences. - * @since 2.8 - * @param aText Updates text object by segmenting it into paragraphs and sentences. - * @return none - */ - IMPORT_C void AnalyzeStructureL( CTtsParsedText& aText ); - - /** - * Notifies that the buffer has been processed - * @since 2.8 - * @param aBuffer The buffer which has been processed - * @return none - */ - IMPORT_C void BufferProcessed( const TDesC8& aBuffer ); - - /** - * Deletes style. - * @since 2.8 - * @param aStyleID Identifier of style to be deleted. - * @return none - */ - IMPORT_C void DeleteStyleL( TTtsStyleID aStyleID ); - - /** - * Gives current position of synthesizing. - * @since 2.8 - * @param aTime Time of the synthesizing position. - * @return none - */ - IMPORT_C void GetPositionL( TTimeIntervalMicroSeconds& aTime ); - - /** - * Gives current position of synthesizing. - * @since 2.8 - * @param aSegment The segment being synthesizing - * @param aWordIndex The index of word being synthesizing - * @return none - */ - IMPORT_C void GetPositionL( TTtsSegment& aSegment, - TInt& aWordIndex ); - - /** - * Ask if a language is supported or not. - * @since 2.8 - * @param aLanguage Synthesizing language. - * @return ETrue language is supported otherwise EFalse - */ - IMPORT_C TBool IsLanguageSupported( TLanguage aLanguage ); - - /** - * Gives number of styles. - * @since 2.8 - * @param none - * @return Number of styles. - */ - IMPORT_C TUint16 NumberOfStyles() const; - - /** - * Pauses synthesizing. - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C void Pause(); - - /** - * Prepares for synthesizing. - * @since 2.8 - * @param aStream Stream to be synthesized. - * @return none - */ - IMPORT_C void PrimeSynthesisL( MTtsSegmentStream& aStream ); - - /** - * Prepares for synthesizing. - * @since 2.8 - * @param aText Text containing segments to be synthesized. - * @return none - */ - IMPORT_C void PrimeSynthesisL( CTtsParsedText& aText ); - - /** - * Sets new position for synthesizing. - * @since 2.8 - * @param aTime Time of the synthesizing postion. - * @return none - */ - IMPORT_C void SetPositionL( const TTimeIntervalMicroSeconds& aTime ); - - /** - * Sets new position for synthesizing. - * @since 2.8 - * @param aSegment The segment being synthesizing - * @param aWordIndex The index of word being synthesizing - * @return none - */ - IMPORT_C void SetPositionL( const TTtsSegment& aSegment, - TInt aWordIndex ); - - /** - * Stops synthesizing and releases resources of synthesizing. - * The method does nothing if already stopped. - * @since 2.8 - * @param - * @return none - */ - IMPORT_C void Stop(); - - /** - * Receives style information - * @since 2.8 - * @param aStyleID Style identifier - * @return Style - */ - IMPORT_C TTtsStyle& StyleL( TTtsStyleID aStyleID ); - - /** - * Receives style information - * @since 2.8 - * @param aIndex Index to style: 0..NumberOfStyles() - * @return Style - */ - IMPORT_C TTtsStyle& StyleL( TUint16 aIndex ); - - /** - * Starts waveform production. The synthesized audio buffers are send back - * to client using MthdProcessBuffer(). - * @since 2.8 - * @param none - * @return none - */ - IMPORT_C void SynthesizeL(); - - private: - - /** - * C++ default constructor. - */ - CTtsHwDevice(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL( MTtsHwDeviceObserver& aObserver, - TUint aSamplingRate, - TUint aBufferSize ); - - private: // Data - - // Actual algorithm where all processing happens - CTtsAlgorithm* iAlgorithm; - - // Reserved pointer for future extension - TAny* iReserved; - - }; - -#endif // TTSHWDEVICE_H - -// End of File diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/vocmanhwdevice/bwins/asrsvocmanhwdeviceu.def --- a/srsfenginestub/vocmanhwdevice/bwins/asrsvocmanhwdeviceu.def Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -EXPORTS - ??1CASRSHwDevice@@UAE@XZ @ 1 NONAME ; CASRSHwDevice::~CASRSHwDevice(void) - ??1CASRSVocManHwDevice@@UAE@XZ @ 2 NONAME ; CASRSVocManHwDevice::~CASRSVocManHwDevice(void) - ?AdaptL@CASRSVocManHwDevice@@QAEXEAAVCSIRule@@@Z @ 3 NONAME ; void CASRSVocManHwDevice::AdaptL(unsigned char, class CSIRule &) - ?Clear@CASRSHwDevice@@UAEXXZ @ 4 NONAME ; void CASRSHwDevice::Clear(void) - ?ComputeNRuleVariantsL@CASRSVocManHwDevice@@QAEXABVCSIGrammar@@KKABV?$RArray@I@@AAV3@AAK@Z @ 5 NONAME ; void CASRSVocManHwDevice::ComputeNRuleVariantsL(class CSIGrammar const &, unsigned long, unsigned long, class RArray const &, class RArray &, unsigned long &) - ?CustomInterface@CASRSHwDevice@@UAEPAXVTUid@@@Z @ 6 NONAME ; void * CASRSHwDevice::CustomInterface(class TUid) - ?InitializeL@CASRSHwDevice@@UAEXXZ @ 7 NONAME ; void CASRSHwDevice::InitializeL(void) - ?NewL@CASRSHwDevice@@SAPAV1@XZ @ 8 NONAME ; class CASRSHwDevice * CASRSHwDevice::NewL(void) - ?NewL@CASRSVocManHwDevice@@SAPAV1@XZ @ 9 NONAME ; class CASRSVocManHwDevice * CASRSVocManHwDevice::NewL(void) - ?Prune@CASRSVocManHwDevice@@QAEHABVCSIGrammar@@KAAV?$RArray@VTSIRuleVariantInfo@@@@@Z @ 10 NONAME ; int CASRSVocManHwDevice::Prune(class CSIGrammar const &, unsigned long, class RArray &) - diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/vocmanhwdevice/eabi/asrsvocmanhwdeviceu.def --- a/srsfenginestub/vocmanhwdevice/eabi/asrsvocmanhwdeviceu.def Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -EXPORTS - _ZN13CASRSHwDevice11InitializeLEv @ 1 NONAME - _ZN13CASRSHwDevice15CustomInterfaceE4TUid @ 2 NONAME - _ZN13CASRSHwDevice4NewLEv @ 3 NONAME - _ZN13CASRSHwDevice5ClearEv @ 4 NONAME - _ZN13CASRSHwDeviceD0Ev @ 5 NONAME - _ZN13CASRSHwDeviceD1Ev @ 6 NONAME - _ZN13CASRSHwDeviceD2Ev @ 7 NONAME - _ZN19CASRSVocManHwDevice21ComputeNRuleVariantsLERK10CSIGrammarmmRK6RArrayIjERS4_Rm @ 8 NONAME - _ZN19CASRSVocManHwDevice4NewLEv @ 9 NONAME - _ZN19CASRSVocManHwDevice5PruneERK10CSIGrammarmR6RArrayI18TSIRuleVariantInfoE @ 10 NONAME - _ZN19CASRSVocManHwDevice6AdaptLEhR7CSIRule @ 11 NONAME - _ZN19CASRSVocManHwDeviceD0Ev @ 12 NONAME - _ZN19CASRSVocManHwDeviceD1Ev @ 13 NONAME - _ZN19CASRSVocManHwDeviceD2Ev @ 14 NONAME - _ZTI13CASRSHwDevice @ 15 NONAME ; ## - _ZTI19CASRSVocManHwDevice @ 16 NONAME ; ## - _ZTV13CASRSHwDevice @ 17 NONAME ; ## - _ZTV19CASRSVocManHwDevice @ 18 NONAME ; ## - diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/vocmanhwdevice/group/asrvocmanhwdevicestub.mmp --- a/srsfenginestub/vocmanhwdevice/group/asrvocmanhwdevicestub.mmp Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for AsrsVocManHwDeviceStub -* -*/ - - - - -#include - -#if defined( WINS ) || defined( WINSCW ) -TARGET asrsvocmanhwdevice.dll -#else -TARGET asrsvocmanhwdevice_stub.dll -#endif - -TARGETTYPE DLL -UID 0x1000008D 0x101FF92E // UID: 270530862 - -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE asrsvocmanhwdevice.cpp - -SOURCEPATH ../../common/src -SOURCE asrshwdevice.cpp - -USERINCLUDE ../inc ../src - -// This is a SYSTEMINCLUDE macro containing the middleware -// layer specific include directories -APP_LAYER_SYSTEMINCLUDE - -SYSTEMINCLUDE ../../common/inc - -LIBRARY euser.lib - -// Users link against the non-stub name, so that rebuild is not necessary -EXPORTLIBRARY asrsvocmanhwdevice.lib - -// On ROM dll name is without the _stub part so that it can easily be -// replaced with the real dll -LINKAS asrsvocmanhwdevice.dll - -CAPABILITY CAP_GENERAL_DLL diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/vocmanhwdevice/group/bld.inf --- a/srsfenginestub/vocmanhwdevice/group/bld.inf Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project file for AsrVocManHwDeviceStub. -* -*/ - - - - - -PRJ_PLATFORMS -DEFAULT - -PRJ_EXPORTS - -PRJ_MMPFILES -asrvocmanhwdevicestub.mmp - -// End of File \ No newline at end of file diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/vocmanhwdevice/src/asrsvocmanhwdevice.cpp --- a/srsfenginestub/vocmanhwdevice/src/asrsvocmanhwdevice.cpp Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,165 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Vocabulary handling stub functions. -* -*/ - - - - - - -// INCLUDE FILES -#include "asrsvocmanhwdevice.h" - -// ============================ MEMBER FUNCTIONS =============================== - -// ----------------------------------------------------------------------------- -// CASRSVocManHwDevice::CASRSVocManHwDevice -// C++ default constructor can NOT contain any code, that -// might leave. -// ----------------------------------------------------------------------------- -// -CASRSVocManHwDevice::CASRSVocManHwDevice() -: iVMAlgorithm( NULL ) - { - } - -// ----------------------------------------------------------------------------- -// CASRSVocManHwDevice::ConstructL -// Symbian 2nd phase constructor can leave. -// ----------------------------------------------------------------------------- -// -void CASRSVocManHwDevice::ConstructL() - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSVocManHwDevice::NewL -// Two-phased constructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CASRSVocManHwDevice* CASRSVocManHwDevice::NewL() - { - CASRSVocManHwDevice* self = new ( ELeave ) CASRSVocManHwDevice; - - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - - return self; - } - - -// ----------------------------------------------------------------------------- -// CASRSVocManHwDevice::~CASRSVocManHwDevice -// Destructor. -// ----------------------------------------------------------------------------- -// -EXPORT_C CASRSVocManHwDevice::~CASRSVocManHwDevice() - { - } - - -// ----------------------------------------------------------------------------- -// CASRSVocManHwDevice::AdaptL -// Updates given scores -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSVocManHwDevice::AdaptL( - const TSIRuleVariantID /*aCorrectRuleVariantID*/, - CSIRule& /*aRule*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSVocManHwDevice::Prune -// Give information which items can be pruned -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C TBool CASRSVocManHwDevice::Prune( - const CSIGrammar& /*aGrammar*/, - const TUint32 /*aMinNumber*/, - RArray& /*aPrunedItems*/ ) - { - return EFalse; - } - -// ----------------------------------------------------------------------------- -// CASRSVocManHwDevice::ComputeNRuleVariantsL -// Determine how many rule variants can be added to grammar -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -EXPORT_C void CASRSVocManHwDevice::ComputeNRuleVariantsL( - const CSIGrammar& /*aGrammar*/, - const TUint32 /*aTargetNRuleVariants*/, - const TUint32 /*aMaxNRuleVariants*/, - const RArray& /*aNewRuleScores*/, - RArray& /*aNNewRuleVariants*/, - TUint32& /*aNPrune*/ ) - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSVocManHwDevice::InitializeL -// Initializes the HW device. -// You only need this function, if you have called ClearL(). -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CASRSVocManHwDevice::InitializeL() - { - User::Leave( KErrNotSupported ); - } - -// ----------------------------------------------------------------------------- -// CASRSVocManHwDevice::Clear -// Clears the HW device. -// You don't need this function, destructor does the same better -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -void CASRSVocManHwDevice::Clear() - { - } - -// ----------------------------------------------------------------------------- -// CASRSVocManHwDevice::CustomInterface -// Returns a custom interface. None implemented yet. -// (other items were commented in a header). -// ----------------------------------------------------------------------------- -// -TAny* CASRSVocManHwDevice::CustomInterface(TUid /*aInterfaceUid*/) - { - return( NULL ); - } - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - -// for DLL goodness -#ifndef EKA2 -GLDEF_C TInt E32Dll( TDllReason /*aReason*/ ) - { - return KErrNone; - } -#endif - - -// End of File diff -r 46385f45ba4e -r 55e13740998c srsfenginestub/vocmanhwdevice/src/asrsvocmanhwdevice.h --- a/srsfenginestub/vocmanhwdevice/src/asrsvocmanhwdevice.h Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,187 +0,0 @@ -/* -* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Vocabulary pruning functions for speech recognition -* -*/ - - - - - - -#ifndef ASRSVOCMANHWDEVICE_H -#define ASRSVOCMANHWDEVICE_H - -// INCLUDES -#include -#include - -// FORWARD DECLARATIONS -class CVocManAlgorithm; - -// CLASS DECLARATION - -/** -* Class for pruning -* When the grammar starts to get big, this class can prune -* least used rule variants away before adding new rules. -* -* @lib AsrsVocmanHwDevice.dll -* @since ?Series60_version -*/ -class CASRSVocManHwDevice : public CASRSHwDevice - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - */ - IMPORT_C static CASRSVocManHwDevice* NewL(); - - /** - * Destructor. - */ - IMPORT_C virtual ~CASRSVocManHwDevice(); - - public: // Functions from base classes - - /** - * From CASRHwDevice - * Gets a custom interface - * @since 2.8 - * @param aInterfaceUid Uid of the interface. - * @return Pointer to the interface. Ownership depends on UID. - */ - TAny* CustomInterface(TUid aInterfaceUid); - - /** - * From CASRHwDevice - * Initializes the HW Device - * @since 2.8 - * @return None - */ - void InitializeL(); - - /** - * From CASRHwDevice - * Clear HW Device's allocated memory - * @since 2.8 - * @return None - */ - void Clear(); - - public: // New functions - - /** - * Use to adapt rule after recognition - * @since 2.6 - * @param aCorrectRuleVariantID Correctly recognized rule variant - * @param aRule Rule including correct variant - */ - IMPORT_C void AdaptL( const TSIRuleVariantID aCorrectRuleVariantID, - CSIRule& aRule ); - - /** - * Use to prune grammar. - * @since 2.6 - * @param aGrammar Grammar to be pruned - * @param aMinNumber Minimum number of items to be pruned - * @param aPrunedItems Information which items can be removed - * @return ETrue pruning successful, EFalse cannot be pruned - */ - IMPORT_C TBool Prune( const CSIGrammar& aGrammar, - TUint32 aMinNumber, - RArray& aPrunedItems); - - /** - * Use to determine number of new rule variants - * @since 2.6 - * @param aGrammar Grammar where new variants should be added to - * @param aTargetNRuleVariants Target number of rule variants in the grammar - * @param aMaxNRuleVariants Maximum number of rule variants in the grammar - * @param aNewRuleScores Score for each new rule - * @param aNNRuleVariants Number of rule variants for each rule. - * Array must be initialized as maximum number of rule variants per a rule. - * @return None - */ - IMPORT_C void ComputeNRuleVariantsL( const CSIGrammar& aGrammar, - const TUint32 aTargetNRuleVariants, - const TUint32 aMaxNRuleVariants, - const RArray& aNewRuleScores, - RArray& aNNewRuleVariants, - TUint32& aNPrune ); - public: // Functions from base classes - - /** - * From ?base_class ?member_description. - * @since ?Series60_version - * @param ?arg1 ?description - * @return ?description - */ - //?type ?member_function( ?type ?arg1 ); - - protected: // New functions - - /** - * ?member_description. - * @since ?Series60_version - * @param ?arg1 ?description - * @return ?description - */ - //?type ?member_function( ?type ?arg1 ); - - protected: // Functions from base classes - - /** - * From ?base_class ?member_description - */ - //?type ?member_function(); - - private: - - /** - * C++ default constructor. - */ - CASRSVocManHwDevice(); - - /** - * By default Symbian 2nd phase constructor is private. - */ - void ConstructL(); - - // Prohibit copy constructor if not deriving from CBase. - // CASRVocManHwDevice( const CASRVocManHwDevice& ); - // Prohibit assigment operator if not deriving from CBase. - // CASRVocManHwDevice& operator=( const CASRVocManHwDevice& ); - - public: // Data - // ?one_line_short_description_of_data - //?data_declaration; - - protected: // Data - // ?one_line_short_description_of_data - //?data_declaration; - - private: // Data - // ?one_line_short_description_of_data - CVocManAlgorithm* iVMAlgorithm; - - // Reserved pointer for future extension - TAny* iReserved; - - }; - -#endif // ASRSVOCMANHWDEVICE_H - -// End of File diff -r 46385f45ba4e -r 55e13740998c systemswstubs/TVOutConfig/group/bld.inf --- a/systemswstubs/TVOutConfig/group/bld.inf Mon Sep 13 14:16:46 2010 +0300 +++ b/systemswstubs/TVOutConfig/group/bld.inf Wed Sep 29 14:45:05 2010 +0300 @@ -20,7 +20,7 @@ #include PRJ_PLATFORMS -DEFAULT +WINSCW PRJ_EXPORTS diff -r 46385f45ba4e -r 55e13740998c systemswstubs/accessorypolicyreference/group/bld.inf --- a/systemswstubs/accessorypolicyreference/group/bld.inf Mon Sep 13 14:16:46 2010 +0300 +++ b/systemswstubs/accessorypolicyreference/group/bld.inf Wed Sep 29 14:45:05 2010 +0300 @@ -17,7 +17,7 @@ PRJ_PLATFORMS -DEFAULT +WINSCW #include diff -r 46385f45ba4e -r 55e13740998c systemswstubs/asyreference/group/bld.inf --- a/systemswstubs/asyreference/group/bld.inf Mon Sep 13 14:16:46 2010 +0300 +++ b/systemswstubs/asyreference/group/bld.inf Wed Sep 29 14:45:05 2010 +0300 @@ -18,7 +18,7 @@ #include PRJ_PLATFORMS -DEFAULT +WINSCW PRJ_EXPORTS diff -r 46385f45ba4e -r 55e13740998c systemswstubs/ddcaccessstub/group/bld.inf --- a/systemswstubs/ddcaccessstub/group/bld.inf Mon Sep 13 14:16:46 2010 +0300 +++ b/systemswstubs/ddcaccessstub/group/bld.inf Wed Sep 29 14:45:05 2010 +0300 @@ -19,7 +19,7 @@ #include PRJ_PLATFORMS -DEFAULT +WINSCW PRJ_MMPFILES ddc_access.mmp diff -r 46385f45ba4e -r 55e13740998c systemswstubs/examplecommonisc/group/bld.inf --- a/systemswstubs/examplecommonisc/group/bld.inf Mon Sep 13 14:16:46 2010 +0300 +++ b/systemswstubs/examplecommonisc/group/bld.inf Wed Sep 29 14:45:05 2010 +0300 @@ -20,7 +20,7 @@ #include PRJ_PLATFORMS -DEFAULT +WINSCW PRJ_EXPORTS diff -r 46385f45ba4e -r 55e13740998c systemswstubs/exampledsy/group/bld.inf --- a/systemswstubs/exampledsy/group/bld.inf Mon Sep 13 14:16:46 2010 +0300 +++ b/systemswstubs/exampledsy/group/bld.inf Wed Sep 29 14:45:05 2010 +0300 @@ -19,7 +19,7 @@ #include PRJ_PLATFORMS -DEFAULT +WINSCW #ifndef RD_STARTUP_CHANGE diff -r 46385f45ba4e -r 55e13740998c systemswstubs/featuremanagerstub/group/bld.inf --- a/systemswstubs/featuremanagerstub/group/bld.inf Mon Sep 13 14:16:46 2010 +0300 +++ b/systemswstubs/featuremanagerstub/group/bld.inf Wed Sep 29 14:45:05 2010 +0300 @@ -19,7 +19,7 @@ #include PRJ_PLATFORMS -DEFAULT +WINSCW PRJ_EXPORTS ../rom/featmgrstubplugin.iby CORE_IBY_EXPORT_PATH(stubs,featmgrstubplugin.iby) diff -r 46385f45ba4e -r 55e13740998c systemswstubs/group/bld.inf --- a/systemswstubs/group/bld.inf Mon Sep 13 14:16:46 2010 +0300 +++ b/systemswstubs/group/bld.inf Wed Sep 29 14:45:05 2010 +0300 @@ -18,7 +18,7 @@ #include PRJ_PLATFORMS -DEFAULT +WINSCW PRJ_EXPORTS diff -r 46385f45ba4e -r 55e13740998c systemswstubs/hwrmhapticsstubplugin/group/bld.inf --- a/systemswstubs/hwrmhapticsstubplugin/group/bld.inf Mon Sep 13 14:16:46 2010 +0300 +++ b/systemswstubs/hwrmhapticsstubplugin/group/bld.inf Wed Sep 29 14:45:05 2010 +0300 @@ -19,7 +19,7 @@ #include PRJ_PLATFORMS -DEFAULT +WINSCW PRJ_EXPORTS diff -r 46385f45ba4e -r 55e13740998c systemswstubs/hwrmstubplugins/group/bld.inf --- a/systemswstubs/hwrmstubplugins/group/bld.inf Mon Sep 13 14:16:46 2010 +0300 +++ b/systemswstubs/hwrmstubplugins/group/bld.inf Wed Sep 29 14:45:05 2010 +0300 @@ -19,7 +19,7 @@ #include PRJ_PLATFORMS -DEFAULT +WINSCW PRJ_EXPORTS ../data/HWRMLightsPolicy.ini /epoc32/RELEASE/winscw/UDEB/Z/private/101f7a02/HWRMLightsPolicy.ini diff -r 46385f45ba4e -r 55e13740998c systemswstubs/package_definition.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/systemswstubs/package_definition.xml Wed Sep 29 14:45:05 2010 +0300 @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 46385f45ba4e -r 55e13740998c systemswstubs/package_map.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/systemswstubs/package_map.xml Wed Sep 29 14:45:05 2010 +0300 @@ -0,0 +1,1 @@ + \ No newline at end of file diff -r 46385f45ba4e -r 55e13740998c systemswstubs/sensorchannelsreference/group/bld.inf --- a/systemswstubs/sensorchannelsreference/group/bld.inf Mon Sep 13 14:16:46 2010 +0300 +++ b/systemswstubs/sensorchannelsreference/group/bld.inf Wed Sep 29 14:45:05 2010 +0300 @@ -19,7 +19,7 @@ #include PRJ_PLATFORMS -DEFAULT +WINSCW PRJ_EXPORTS ../inc/sensrvproprietaryproperties.h OS_LAYER_PLATFORM_EXPORT_PATH(sensrvproprietaryproperties.h) diff -r 46385f45ba4e -r 55e13740998c systemswstubs/ssyreference/group/bld.inf --- a/systemswstubs/ssyreference/group/bld.inf Mon Sep 13 14:16:46 2010 +0300 +++ b/systemswstubs/ssyreference/group/bld.inf Wed Sep 29 14:45:05 2010 +0300 @@ -19,7 +19,7 @@ #include PRJ_PLATFORMS -DEFAULT +WINSCW PRJ_EXPORTS ../rom/ssyreference.iby CORE_OS_LAYER_IBY_EXPORT_PATH(ssyreference.iby) diff -r 46385f45ba4e -r 55e13740998c systemswstubs/startupadaptationstub/group/bld.inf --- a/systemswstubs/startupadaptationstub/group/bld.inf Mon Sep 13 14:16:46 2010 +0300 +++ b/systemswstubs/startupadaptationstub/group/bld.inf Wed Sep 29 14:45:05 2010 +0300 @@ -19,7 +19,7 @@ #include PRJ_PLATFORMS -DEFAULT +WINSCW PRJ_EXPORTS ../rom/startupadaptationstub.iby CORE_IBY_EXPORT_PATH(stubs,startupadaptationstub.iby) diff -r 46385f45ba4e -r 55e13740998c systemswstubs/tiltcompensationstub/group/bld.inf --- a/systemswstubs/tiltcompensationstub/group/bld.inf Mon Sep 13 14:16:46 2010 +0300 +++ b/systemswstubs/tiltcompensationstub/group/bld.inf Wed Sep 29 14:45:05 2010 +0300 @@ -19,7 +19,7 @@ #include PRJ_PLATFORMS -DEFAULT +WINSCW PRJ_EXPORTS diff -r 46385f45ba4e -r 55e13740998c systemswstubs/tvoutbehaviour/group/bld.inf --- a/systemswstubs/tvoutbehaviour/group/bld.inf Mon Sep 13 14:16:46 2010 +0300 +++ b/systemswstubs/tvoutbehaviour/group/bld.inf Wed Sep 29 14:45:05 2010 +0300 @@ -19,7 +19,7 @@ #include PRJ_PLATFORMS -DEFAULT +WINSCW PRJ_EXPORTS diff -r 46385f45ba4e -r 55e13740998c systemswstubs/wiredbearerreference/group/bld.inf --- a/systemswstubs/wiredbearerreference/group/bld.inf Mon Sep 13 14:16:46 2010 +0300 +++ b/systemswstubs/wiredbearerreference/group/bld.inf Wed Sep 29 14:45:05 2010 +0300 @@ -18,7 +18,7 @@ #include PRJ_PLATFORMS -DEFAULT +WINSCW PRJ_EXPORTS diff -r 46385f45ba4e -r 55e13740998c tactileclickplugin_stub/sysdef_1_4_0.dtd --- a/tactileclickplugin_stub/sysdef_1_4_0.dtd Mon Sep 13 14:16:46 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 46385f45ba4e -r 55e13740998c tactileclickplugin_stub/sysdef_1_5_1.dtd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tactileclickplugin_stub/sysdef_1_5_1.dtd Wed Sep 29 14:45:05 2010 +0300 @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +