Skip to content

Commit

Permalink
Publish to Hugging Face space
Browse files Browse the repository at this point in the history
  • Loading branch information
QubitPi committed Oct 17, 2024
1 parent af7d22b commit c961a89
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ The app is available on [Hugging Face space][Project Aristotle on Hugging Face].
How Does It Work
----------------

__A lack of audio content is a major hurdle to learning Ancient Greek__. So I decided to tackle this problem with NLP.
Ancient Greek is a phonetically-lost language, because no one knows the correct pronunciation of such an ancient
language. __A lack of audio content is a major hurdle to learning Ancient Greek__. So I decided to tackle this problem
with NLP.

OpenAI will read Ancient Greek text with a modern Greek pronunciation. What's different about OpenAI from other
Text-to-Speech tools is that OpenAI is unaffected by the different accents and breathing marks in Ancient Greek. It will
Expand Down
9 changes: 6 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def tts(


with gr.Blocks() as app:
gr.Markdown("# <center> Ancient Greek Text Reader </center>")
gr.Markdown("# <center> AI Doesn't Speak Ancient Greek. Aristotle Does! </center>")
with gr.Row(variant="panel"):
model = gr.Dropdown(choices=["tts-1", "tts-1-hd"], label="Model", value="tts-1")
voice = gr.Dropdown(choices=["alloy", "echo", "fable", "onyx", "nova", "shimmer"], label="Voice Options",
Expand All @@ -71,7 +71,7 @@ def tts(
speed = gr.Slider(minimum=0.25, maximum=4.0, value=1.0, step=0.01, label="Speed")

openai_key = gr.Textbox(
label="OpenAI API Key",
label="OpenAI API key",
placeholder="We can get the key at https://platform.openai.com/api-keys")
text = gr.Textbox(
label="Input text",
Expand All @@ -84,4 +84,7 @@ def tts(
btn.click(fn=tts, inputs=[openai_key, text, model, voice, output_file_format, speed], outputs=output_audio,
api_name=False)

app.launch(server_name=server_name)


if __name__ == "__main__":
app.launch(server_name=server_name)

0 comments on commit c961a89

Please sign in to comment.