AceCentre / TextAloud

iOS app. Built in Swift. Reads out text - sentence by sentence, paragraph by paragraph or word by word
https://testflight.apple.com/join/D8VRhWqr
GNU General Public License v3.0
8 stars 2 forks source link

Edit SSML/Non-SSML markers in-app (inputAccessoryView for SSML and non-SSML) #2

Open willwade opened 1 year ago

willwade commented 1 year ago

Reminder: This app is primarily designed to help people who can't speak present long streams of communication. Typically this can sound monotone. People control this by doing it sentence by sentence or paragraph - but we'd like to give people more control. E.g. within the text somehow indicate pauses, tone and expression.

Some Voices Support something called SSML. It's a XML markup language that tells the synthesiser to read the text differently. Its neat - but it its not supported by all voice engines. Particularly not the built in iOS engine. So for this we need to first detect what the engine is being used and then provide a textView.inputAccessoryView with options. These options differ with the engine is SSML compatible or not. (https://daddycoding.com/2019/10/30/ios-tutorial-input-accessory-view/)

Note: It may be that we choose NOT to support SSML as the key aspects of timing and rate are good. Which is fine - but going forward there are a lot more elements of SSML that are useful including eg. style. See https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/speech-synthesis-markup-voice

I'm not sure if this is really any easier - but we could just look to support Speech Markdown - see the JS library which we could use with JavascriptCore

There are a number of steps to get this done. Here's one idea

willwade commented 1 year ago

I found this interesting. And kind of related. Tune to Voice allows you to record some speech and it then marks up your TTS with the correct prosody.. Im not sure we could make use of it - but its interesting https://cloud.ibm.com/docs/text-to-speech?topic=text-to-speech-tbe-intro&mhsrc=ibmsearch_a&mhq=tune+by+example