Skip to main content

Reaction

generate#

FieldTypeRequiredDefaultDescription
messagestringโœ”๏ธnoneYour message
langstringโŒundefinedIf empty, the language used is that of the default configuration
splitPunctstringโŒundefinedCharacter used to cut the sentences ,.?!;:
Return#

Return a Promise with base64 mp3.

Example#
const reaction = async (event) => {  await module['media'].play(await module['google-tts'].generate('Hello world'));}

getLang#

Return#

Return a Promise with lang string.

Example#
const reaction = async (event) => {  const lang = await module['google-tts'].getLang()  console.log(lang)}

setLang#

FieldTypeRequiredDefaultDescription
langstringโœ”๏ธnoneYour new lang
Return#

Return a Promise with base64 mp3.

Example#
const reaction = async (event) => {    await module['google-tts'].setLang("ja-JP")    const lang = await module['google-tts'].getLang()    console.log(lang) // should be "ja-JP"}