PrefectHQ / marvin

✨ Build AI interfaces that spark joy
https://askmarvin.ai
Apache License 2.0
5.26k stars 343 forks source link

Marvin Speak Language Selection #837

Open nicholastrofin opened 8 months ago

nicholastrofin commented 8 months ago

First check

Describe the current behavior

Currently marvin lets you choose the voice of the speech which is great!

Describe the proposed behavior

However as instructed by N8 on Discord I am proposing this as a feature. The whisper API supports 57 languages:

['Afrikaans', 'Arabic', 'Armenian', 'Azerbaijani', 'Belarusian', 'Bosnian', 'Bulgarian', 'Catalan', 'Chinese', 'Croatian', 'Czech', 'Danish', 'Dutch', 'English', 'Estonian', 'Finnish', 'French', 'Galician', 'German', 'Greek', 'Hebrew', 'Hindi', 'Hungarian', 'Icelandic', 'Indonesian', 'Italian', 'Japanese', 'Kannada', 'Kazakh', 'Korean', 'Latvian', 'Lithuanian', 'Macedonian', 'Malay', 'Marathi', 'Maori', 'Nepali', 'Norwegian', 'Persian', 'Polish', 'Portuguese', 'Romanian', 'Russian', 'Serbian', 'Slovak', 'Slovenian', 'Spanish', 'Swahili', 'Swedish', 'Tagalog', 'Tamil', 'Thai', 'Turkish', 'Ukrainian', 'Urdu', 'Vietnamese', 'Welsh']

I think the best way to leverage it would be to tell it before hand what language it will be reading in so that it would be able to pronounce the words accordingly. If language selection is not available natively on the OpenAI API (I am not sure it is) one idea would be to add an instructions parameter within marvin.speak

Example Use

No response

Additional context

No response

Dev-Khant commented 7 months ago

@zzstoatzz @jlowin I could take this but if you can give me a very brief idea on how we should implement it.