soimort / translate-shell

:speech_balloon: Command-line translator using Google Translate, Bing Translator, Yandex.Translate, etc.
https://www.soimort.org/translate-shell
The Unlicense
6.83k stars 387 forks source link

Voice output unavailable #497

Open CurvyHamster opened 10 months ago

CurvyHamster commented 10 months ago

Hi, the most bizarre thing is happening to me. Using trans via the regular wsl2 command line is giving me a voice output error for each and every language that I try to use -speak or -p. When I run it in a shell script opened by a batch file in cmd, it gives me the correct output with the audible voice narration. I don't understand what I did for the audio output to only work in cmd.

Shell Code for LangCli.sh #!/bin/bash trans -brief --shell -no-rlwrap -show-original-phonetics Y -show-translation-phonetics Y -show-original n -p -show-translation Y -no-warn -show-prompt-message n -show-alternatives Y :en+ru DOS Code cd C:\Users\"file location"\LangCli\ bash TransCli.sh echo

This code works because it is being run in CMD. I am getting the voice output error when I type in the shell code command directly into wsl2. Navigating to the file in wsl2 and executing the .sh file is giving me the same error. It could be a conflict with curl downloaded in windows as well as within the wsl2 ubuntu distro.