Skip to content

AudioFileTranslator.TranslationEngine()

nnnzo edited this page Aug 24, 2020 · 2 revisions

TranslationEngine() is the function that transcribe and translate the audio.

Arguments

The TranslationEngine() function need 4 arguments in the following order:

  • "AudioFilePath"
  • "SourceLanguageCode-SourceCountryCode"
  • "SourceLanguageCode"
  • "DestinationLanguageCode"

Exemple (a French audio that we want to translate into Japanese):

TranslationEngine("audio.wav", "fr-FR", "fr", "ja")

Language Code List

How to get the translated text

The Translated text can be get with a basic print.

print(TranslationEngine("audio.wav", "fr-FR", "fr", "ja"))