From 2096356f1d4fb95cd1273018bcbff13c88487f8d Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Tue, 1 Mar 2022 01:59:49 -0500 Subject: Implement support for scripted speech events --- include/xas/script.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/xas/script.h b/include/xas/script.h index 5f0af87..4068e17 100644 --- a/include/xas/script.h +++ b/include/xas/script.h @@ -13,7 +13,8 @@ enum xas_script_event_type { XAS_SCRIPT_EVENT_SET_POSITION, XAS_SCRIPT_EVENT_SET_GAIN, XAS_SCRIPT_EVENT_SET_FREQUENCY, - XAS_SCRIPT_EVENT_SET_BANK_INDEX + XAS_SCRIPT_EVENT_SET_BANK_INDEX, + XAS_SCRIPT_EVENT_SPEECH }; enum xas_script_object_type { @@ -38,6 +39,7 @@ struct _xas_script_event { xas_spatial_coord point; size_t index; size_t frequency; + const char *phrase; }; xas_script_event *next; @@ -83,6 +85,11 @@ int xas_script_add_set_frequency(xas_script *script, struct timeval timestamp, size_t frequency); +int xas_script_add_speech(xas_script *script, + xas_spatial_object *object, + struct timeval timestamp, + const char *phrase); + int xas_script_play(xas_script *script, xas_audio_stream *sink); #endif /* _XAS_SCRIPT_H */ -- cgit v1.2.3