Skip to content

QubitPi/ancient-greek-reader-nlp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Ancient Greek Reader NLP

A lack of audio content is a major hurdle to learning Ancient Greek. So I decided to tackle this problem with NLP.

How Does It Work

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 simply read the Ancient Greek text in modern pronunciation with the accents in the right places. Studying Ancient Greeek with modern pronunciation is simply not satisfactory for me, though, so I started messing around with the text to see if I could get the pronunciation closer to Erasmian/Attic/whatever we want to call it. We can simply replace letters in the Greek words with Latin letters to try and get what we want.

Here is an example sentence.

This is the original text, which OpenAI will read in Modern Greek with no problem:

Σόλων ἦν συνετώτατος πάντων τῶν Ἀθηναίων, τὴν γὰρ σοφίαν αὐτοῦ οὐ μόνον οἱ πολῖται ἐθαύμαζον, ἀλλὰ καὶ οἱ ἂλλοι Ἓλληνες πάντες, πολλοὶ δὲ καὶ τῶν βαρβάρων.

And here is the same but with letters replaced to try and get OpenAI to read in an "Attic" pronunciation:

sόλωn en sunetώtαtος πάntωn tón aθenáiωn, tén γáρ sοφίan autu u μόnon hoi πολítαi eθáuμαζon, aλλá kái hoi áλλοi Héλλeneς πάnteς, πολλói δé kái tón βαρβάρωn.

A huge list of letter replacements has been made to try and imitate Attic pronunciation as closely as possible. The result is pretty solid and is close enough to be useful for creating audio files for texts where we don't have any audio recordings. Checkout this "Attic" pronounciation example

How to Use It (WIP)

Here is a WIP instruction:

  1. Get an accurate Ancient Greek text and save it to a file named original.txt. Perseus Digital Library is a great source.

  2. Run replacement:

    • python3 convert.py
  3. Convert txt to epub. Calibre works pretty well for this.

  4. Use https://github.com/p0n1/epub_to_audiobook to generate audio

Caution

OpenAI billing will apply to the last step

About

NLP behind ancient-greek-reader

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages