Translates the text you paste in into the languages you list and emails you each one spoken as an audio file.
UsesElevenLabs
Gmail
Google Translate
Say your words in another language
sourceText to blank.Set sourceText to blank.targetLanguages to blank.Set targetLanguages to blank.voiceId to blank.Set voiceId to blank.sendTo to blank.Set sendTo to blank.maxLanguages to 5.Set maxLanguages to 5.sourceText and save it as scriptText.Trim sourceText and save it as scriptText.sendTo and save it as recipient.Trim sendTo and save it as recipient.recipient is a valid email addressIf not recipient is a valid email addressYes
No
No steps
spokenCount to 0.Set spokenCount to 0.failedCount to 0.Set failedCount to 0.skippedNoTranslation to 0.Set skippedNoTranslation to 0.skippedNoAudio to 0.Set skippedNoAudio to 0.language in targetLanguages split by ,:For each language in targetLanguages split by ,:language and save it as languageCode.Trim language and save it as languageCode.languageCode is empty or languageCode is nullIf languageCode is empty or languageCode is nullYes
No
No steps
spokenCount is greater than or equal to maxLanguages multiplied by 1If spokenCount is greater than or equal to maxLanguages multiplied by 1Yes
No
No steps
languageErrorIf a step below fails, save the error as languageErrorTry
scriptText into languageCode. Save it as translation.Translate scriptText into languageCode. Save it as translation.translation.translated_text and save it as spokenScript.Trim translation.translated_text and save it as spokenScript.spokenScript is empty or spokenScript is nullIf spokenScript is empty or spokenScript is nullYes
skippedNoTranslation.Add 1 to skippedNoTranslation.No
No steps
voiceId. Save it as speech.Convert text to speech with voice voiceId. Save it as speech.spokenScriptspeech.document_ref and save it as audioRef.Trim speech.document_ref and save it as audioRef.audioRef is empty or audioRef is nullIf audioRef is empty or audioRef is nullYes
skippedNoAudio.Add 1 to skippedNoAudio.No
No steps
translation.detected_source_language and save it as detected.Trim translation.detected_source_language and save it as detected.detected is null or detected is emptyIf detected is null or detected is emptyYes
detected to not reported.Change detected to not reported.No
No steps
messageBody to Language asked for: languageCodeSet messageBody to Language asked for: languageCode
Language the original was read as: detected.messageBody to messageBodyChange messageBody to messageBody
The attached audio speaks this text:
spokenScript.messageBody to messageBodyChange messageBody to messageBody
The text it was translated from:
scriptText.sendTo.Send an email to sendTo.
Subject: Spoken translation (languageCode)messageBodyspokenCount.Add 1 to spokenCount.On error
failedCount.Add 1 to failedCount.languageCode: languageError as text.Show in the output: Could not produce audio for languageCode: languageError as text.spokenCount is 0If spokenCount is 0Yes
No
No steps
summary to Languages spoken and emailed: spokenCount as text.Set summary to Languages spoken and emailed: spokenCount as text.summary to summary. Skipped, nothing came back to translate: skippedNoTranslation as text.Change summary to summary. Skipped, nothing came back to translate: skippedNoTranslation as text.summary to summary. Skipped, no audio file was produced: skippedNoAudio as text.Change summary to summary. Skipped, no audio file was produced: skippedNoAudio as text.summary to summary. Failed outright: failedCount as text.Change summary to summary. Failed outright: failedCount as text.summary.Show in the output: summary.