AwesomeTTS / awesometts-anki-addon

AwesomeTTS text-to-speech add-on for Anki
GNU General Public License v3.0
479 stars 99 forks source link

Is it possible to add this Sanskrit TTS ? #215

Open asphoa opened 3 years ago

asphoa commented 3 years ago

I come across this Sanskrit TTS and wonder if there is any way to add it into AwesomeTTS? It would be great for any SKT or Pali student, since the quality is good enough for learning purpose.

https://github.com/avinashvarna/sanskrit_tts https://pypi.org/project/sanskrit-tts/

luc-vocab commented 3 years ago

I know nothing about sanskrit, I thought it was a written-only language ? have you tried the code above ? it's a bit confusing, it says it depends on google cloud, but I don't see sanskrit as a supported language (https://cloud.google.com/text-to-speech/docs/voices)

asphoa commented 3 years ago

I know nothing about coding, so I cannot try. Sanskrit can be spoken and is widely done so, for example, chanting the vedas. There are also native speakers in India. The pronunciation rule is actually simply and rigid, comparing with English. Google Cloud doesn't support Sanskrit, it's true. In my understanding, the author find a way to adapt some indic voices, for example, Hindi, Kannada, that are currently supported by google cloud, into sanskrit pronunciation. The difference of pronunciation between these languages is minor.

For example, in Hindi,  भारत reads "bhārat", while in Sanskrit it reads "bhārata". The adaptation maks the voice of Hindi from reading devenagari alphabit भारत as "bhārat" into as "bhārata", then it will sound like Sanskrit. Of course, this is just one of the differences.

The audio result the author provide is quite acceptable. As far as I know, there isn't Sanskrit Voice that can be easily used for non-coding user for now. So I guess it might be a good use potentially.

Hope this may help explaining the confusion.

lovac42 commented 3 years ago

It uses transliterations. Similar to romanization for Japanese and Chinese. The result won't sound natural, sounds like a white guy reading Japanese using Romanji.

I know this is possible because I played around with this idea for Esperanto using Polish and Italian voices. The voices on the market for Esperanto sounded too robotic. But I don't think any dev here knows much about Sanskrit to code this with acceptable results.