Author: Axel Axel Fernández Curros

Guide to translate speech to text and translate it to any language. With the following script we will be able to get text from an audio in any language and write it to English as well as translating the same text to any language.

Install ffmpeg

  • Linux
    sudo apt install ffmpeg
    
  • Windows (chocolatey)
    choco install ffmpeg
    

Install python dependencies

  • Linux
    pip3 install git+https://github.com/openai/whisper.git jiwer
    pip3 install langdetect
    pip3 install googletrans==4.0.0-rc1
    
  • Windows (chocolatey)
    pip install git+https://github.com/openai/whisper.git jiwer
    pip install langdetect
    pip install googletrans==4.0.0-rc1
    

Clone repository

git clone https://github.com/Axlfc/UE5-python
cd UE5-python/Content/Python

Run the python script

  • Linux
    python3 translator.py audio.wav
    python3 translator.py "This is a test" "es"
    
  • Windows
    python translator.py audio_file.wav "es"
    python translator.py "¿Hola qué tal te va?" "en"
    

<
Previous Post
Stable Diffusion Installation
>
Next Post
Translating text to AI Voice Speech