Coder Social home page Coder Social logo

russian_tts_normalization's Introduction

Russian text normalization for TTS

Normalize Text in Russian.

Usage: Add russian.py into text folder of your TTS system and import it from there.

from text.russian import normalize_russian

complex_test_text = """У меня есть $1234 и 5678 рублей. Кроме того, я должен 90.50€ и взял в долг 4321 GBP.
В моем кошельке было 876 UAH и 543.21 RUB, а также я нашел 20 центов."""
​
normalized_text = normalize_russian(complex_test_text)
print(normalized_text)

​Prints:

У меня есть одна тысяча двести тридцать четыре доллара и пять тысяч шестьсот семьдесят восемь рублей. Кроме того, я должен девяносто евро пятьдесят евроцентов и взял в долг четыре тысячи триста двадцать один фунт.\nВ моем кошельке было восемьсот семьдесят шесть гривен и пятьсот сорок три рубля двадцать один копейка, а также я нашел 20 центов.

Implemented

  1. Cyrrilization of letters such as "apple" -> "эппл".
  2. Abbreviations expansion such as "СССР" -> "эс эс эс эр".
  3. Numbers conversion of any size
  4. Currency expansion
  5. Phone number expansion
  6. Date

Not implemented

  1. Time
  2. Percentages
  3. Short forms like "г." -> "город"
  4. Probably a lot more

Acknowledgements

I want to thank OpenAI's ChatGPT for writing this code. I would've never been able to write it myself since I'm too lazy for that.

Call for collaboration

Feel free to use this code. You can share it, copy it, modify as you wish. However, pretty please, if you improved the solution somehow, add your modifications here too.

russian_tts_normalization's People

Contributors

shigabeev avatar

Stargazers

codewalker7 avatar Vladimir Kuznichenkov avatar Oleg avatar Aleksander Popov avatar Vladimir Barbuta avatar Zaharenok avatar Vladislav Sorokin avatar Michael Bleboo avatar Tera2Space avatar  avatar xucan avatar Nickolay V. Shmyrev avatar Daria Diatlova avatar Maxim Krentovskiy avatar Dmitry Kulikov avatar  avatar

Watchers

Nickolay V. Shmyrev avatar  avatar Vladimir Barbuta avatar

Forkers

ishine sorokinvld

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.