Shorthand SSML for Bikubot
Table of contents
Updates
v2
With shorthand V2 the system moves from using one character to represent an effect to using two, this is to make the letter combination make more sense and open up more “slots” for future effects. This v2 only work in streams that uses Bikubot v0.4.301 or later. If you want v1 you can find it here: Shorthand v1
In the Modifications section you can also find the 6 new effects added this time around (Echo, Megaphone, Minified, Muffler, Reverb and Robot). These effects are being added on in a second pass on the TTS audio gotten from AWS Polly.
What is this
This is a custom and shortend way to control the TTS voices of Bikubot, this uses AWS Polly SSML tags to control how the voice sounds, but shortend and simplfies the tags to make it easier and shorter to use.
How it works
Any change to how something is spoken start with # followed by the modifications you wanna do to the voice. These modifications are represented by a two-letter code [as an example pi for pitch] and for some modification the addition of numbers are needed to represent the scale of the modification. Finally the spoken word you want the modification to apply to is encapsulated by [ and ]. Because of this the characters [ and ] are reserved and if used within a voice modification it needs to be a matching pair. \
an example would be the SSML <prosody pitch=”+50%” rate=”200%”>This is a test</prosody> would in shorthand be #pi150ra200[this is a test]. Note that it’s not a one to one for some things, as pitch in Normal SSML goes between -30 and +50, but shorthand only works with positive numbers so a conversion is done, where instead of starting at 0 the shorthand starts at 100 for pitch. \
You can also mix any modifications, as an example if you wanted to add a whisper to the above example the shorthand would be: #whpi150ra200[this is a test]. The order of the modification codes does not matter. So you could do it like #pi150whra200[this is a test] and it would work the same. \
But if you would try to do something like #whra20ra200[this is a test], that is to have the same modification more than once in the same tag it will only take the latest modification it sees in the tag so in the case it would seen the same as #whra200[this is a test], the ra20 will be thrown away. \
The shorthand also support nested tags, so you could do something like #pi150[this is a #wh[test]]. All modification is also case insensitive so #PI150LA(Sv-Se)[test] is the same as #pi150la(sv-se)[test]. \
The bot also does its best to fix any issues, such as if a value is too high it will set it to highest possible for that modification.
The possible modifications and their values can be found under Modifications.
Short Notes
- A voice modifications starts with # followed by one or more modification found below, then ending with the speech you want modified encapsulated in [ and ].
- The characters [ and ] are reserved characters and if used, need to be used in pairs when used outside their intended use case (marking what to modifiy).
- You can do nested modifications.
- Example:
- #pi150[this is a nested pitch #wh[whisper test]]
- #pi150[this is #wh[deeply #ra120so[nested and #ti120[going deeper], and] now] back up]
- #vo11[#wh[testing #so[softly] whispering] with a bit higher volume, #ti50[ending with some timbre]]
- Example:
- You can add more then one modification per voice modificiation, the order does not matter.
- Example:
- #pi150wh[this is a modifed pitch with whipser]
- #whsoti50la(sv-se)[this soft and whispering swedish language voice with modified timbre]
- #br.5ti50pi150ra180[This starts with a 0.5s break and modified pitch, rate and timbre]
- Example:
- The modification part is case insensative.
- Any modification value outside it’s min or max range will be set to its min or max (whatever is closest).
- Any modification value that is not valid will be set to a normalized default value.
- Any characters that does not represent a modification will be ignored if part of the modification part.
- A Faulty voice modification, like a space in the modification part or not correctly encapsulated will be read as normal.