Core API

Most of the core functionality of Dhwani can be levraged through an object of the Converter class.

Converter class

class dhwani.core.converter.Converter(src_lang_code: str, dest_lang_code: str)

Bases: object

The dhwani.Converter (implementation at dhwani.core.converter.Converter) class is the main entry point for Dhwani. You can make an object of this class and configure it to perform phonetic conversion from one language to another.

Parameters:
  • src_lang_code (str) – ISO 639-3 code of the source language.
  • dest_lang_code (str) – ISO 639-3 code of the destination language.
convert(src_text: str) → str

Converts the full source text from source language to destination language.

Parameters:src_text (str) – The text in src_lang_code language to be converted
Returns:The text in dest_lang_code language converted from src_lang_code
Return type:str