Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multilingual Prompting #14

Open
Adolfiux opened this issue Apr 9, 2023 · 1 comment
Open

Multilingual Prompting #14

Adolfiux opened this issue Apr 9, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Adolfiux
Copy link

Adolfiux commented Apr 9, 2023

I think we can use a simple function like this:

from utils.translate import *

# translating is optional
def translate_text(text):
    global is_Speaking
    # subtitle will act as subtitle for the viewer
    # subtitle = translate_google(text, "ID")

    # tts will be the string to be converted to audio
    detect = detect_google(text)
    # tts = translate_google(text, f"{detect}", "JA")
    tts = translate_google(text, f"{detect}", "JA")
    # tts_en = translate_google(text, f"{detect}", "EN")
    # tts_es = translate_google(text, f"{detect}", "ES")
    try:
        # print("ID Answer: " + subtitle)
        print("JP Answer: " + tts)
        # print("EN Answer: " + tts_en)
        # print("ES Answer: " + tts_es)
    except:
        print("Error translating text")
        return
   This is from another AI Waifu code. You use your voice to talk with the AI and then translate the response from OpenAI API to Katakana (Japanese) to Voicevox (text-to-speech)
@HRNPH HRNPH added enhancement New feature or request help wanted Extra attention is needed labels Apr 10, 2023
@HRNPH HRNPH moved this to In Progress in Waifu Experience Apr 10, 2023
@HRNPH HRNPH self-assigned this Apr 10, 2023
@HRNPH
Copy link
Owner

HRNPH commented Apr 10, 2023

Working on this rn, user should be able to config via config.json file or something

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
Status: In Progress
Development

No branches or pull requests

2 participants