From 3591003ea399babff4da5863980cb1939a093e34 Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Sun, 21 Jun 2020 15:58:38 +0100 Subject: [PATCH] TTS: Add method to get the default voice This returns by default the first voice, but can be reimplemented in derived classes to return the system default voice. --- common/text-to-speech.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/text-to-speech.h b/common/text-to-speech.h index cd34c287470..d35553b4c5c 100644 --- a/common/text-to-speech.h +++ b/common/text-to-speech.h @@ -293,6 +293,11 @@ public: */ Array getVoiceIndicesByGender (TTSVoice::Gender gender); + /** + * returns the index for the default voice. + */ + virtual int getDefaultVoice() { return 0; } + /** * Pushes the current state of the TTS */