Commit 3d6c75c9 authored by Jonas Stienen's avatar Jonas Stienen
Browse files

Introducing switch for TTS signal sources in CMakeLists

parent 09ac5653
......@@ -82,6 +82,10 @@ endif( )
if( NOT DEFINED ITA_VACORE_MAX_NUM_LISTENERS )
set( ITA_VACORE_MAX_NUM_LISTENERS 0 CACHE INT "VACore maximum number of listeners ( 0 = unlimited )" )
endif( )
if( NOT DEFINED ITA_VACORE_WITH_TTS_SIGNAL_SOURCE )
vista_use_package( TTSRelay QUIET )
set( ITA_VACORE_WITH_TTS_SIGNAL_SOURCE ${TTSReleay} CACHE BOOL "VACore with text-to-speech signal source support" )
endif( )
# Data dirs
......@@ -310,6 +314,10 @@ endif( )
string( TIMESTAMP VACORE_CMAKE_DATE "%Y-%m-%d" )
add_definitions( "-DVACORE_CMAKE_DATE=\"${VACORE_CMAKE_DATE}\"" )
if( ITA_VACORE_WITH_TTS_SIGNAL_SOURCE )
add_definitions( "-DVACORE_WITH_TTS_SIGNAL_SOURCE" )
endif( )
# Dev switches
if( ITA_VACORE_REPRODUCTION_NCTC_WITH_SWEET_SPOT_WIDENING )
add_definitions( "-DVACORE_REPRODUCTION_NCTC_WITH_SWEET_SPOT_WIDENING" )
......
......@@ -78,6 +78,10 @@ void CVATextToSpeechSignalSource::Reset()
CVAStruct CVATextToSpeechSignalSource::GetParameters( const CVAStruct& oArgs ) const
{
CVAStruct oRet;
#ifndef VACORE_WITH_TTS_SIGNAL_SOURCE
oRet[ "error" ] = "TTS signal sources not activated in your VACore";
VA_WARN( "CVATextToSpeechSignalSource", "TTS signal sources was requested but is not activated in your VACore" );
#else
if( oArgs.IsEmpty() )
{
oRet[ "info" ] = "Parameters of TTS signal source will be delivered through this struct";
......@@ -86,12 +90,16 @@ CVAStruct CVATextToSpeechSignalSource::GetParameters( const CVAStruct& oArgs ) c
oRet[ "prepare_speech" ] = "Halleluja!";
oRet[ "start_talking" ] = false;
}
#endif
return oRet;
}
void CVATextToSpeechSignalSource::SetParameters( const CVAStruct& oParams )
{
#ifndef VACORE_WITH_TTS_SIGNAL_SOURCE
VA_WARN( "CVATextToSpeechSignalSource", "TTS signal sources was requested but is not activated in your VACore" );
#else
if( oParams.HasKey( "start_talking" ) )
{
// Do something, if possible
......@@ -110,6 +118,13 @@ void CVATextToSpeechSignalSource::SetParameters( const CVAStruct& oParams )
}
VA_WARN( "CVATextToSpeechSignalSource", "Could not interpret parameters for text-to-speech signal source setter method, use empty getter for help" );
#endif
return;
}
#ifndef VACORE_WITH_TTS_SIGNAL_SOURCE
// put dummy methods here ... no so nice I know.
#else
// put rest here
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment