Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
VACore
Commits
3d6c75c9
Commit
3d6c75c9
authored
May 15, 2017
by
Jonas Stienen
Browse files
Introducing switch for TTS signal sources in CMakeLists
parent
09ac5653
Changes
2
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
3d6c75c9
...
...
@@ -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"
)
...
...
src/Audiosignals/VATextToSpeechSignalSource.cpp
View file @
3d6c75c9
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment