1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Hindi Voice from Assistant

Discussão em 'Python' iniciado por Stack, Setembro 7, 2025.

  1. Stack

    Stack Membro Participativo

    I wish to have voice assistant in Hindi. Can engine.say() accept translated text? My code is below. It speaks English text, but not Hindi text. No error occurs, however no voice occurs. (My laptop sound=100%). Can anyone help?


    import pyttsx3
    from translate import Translator

    engine = pyttsx3.init()


    translator= Translator(from_lang="english",to_lang="hindi")
    translation = translator.translate("Today is Tuesday")
    print(translation)
    engine.say("My first code on text-to-speech")
    engine.say(translation)
    engine.runAndWait()

    Continue reading...

Compartilhe esta Página