@@ -64,6 +64,24 @@ pub fn GetVersion(_py: Python) -> PyResult<String> {
6464 return Ok ( get_version ( ) ) ;
6565}
6666
67+ #[ pyfunction]
68+ /// Returns a list of all supported languages (["en", "es", ...])
69+ pub fn GetSupportedLanguages ( _py : Python ) -> PyResult < Vec < String > > { // type in Python is list[str]
70+ return Ok ( get_supported_languages ( ) )
71+ }
72+
73+ #[ pyfunction]
74+ /// Returns a list of all supported speech styles given a language (["ClearSpeak", "SimpleSpeak", ...])
75+ pub fn GetSupportedSpeechStyles ( _py : Python , lang : String ) -> PyResult < Vec < String > > { // type in Python is list[str]
76+ return Ok ( get_supported_speech_styles ( lang) ) ;
77+ }
78+
79+ #[ pyfunction]
80+ /// Returns a list of all supported braille codes (["UEB", "Nemeth", ...])
81+ pub fn GetSupportedBrailleCodes ( _py : Python ) -> PyResult < Vec < String > > { // type in Python is list[str]
82+ return Ok ( get_supported_braille_codes ( ) ) ;
83+ }
84+
6785#[ pyfunction]
6886/// Get the spoken text of the MathML that was set.
6987/// The speech takes into account any AT or user preferences.
@@ -160,6 +178,9 @@ fn libmathcat_py(m: &Bound<'_, PyModule>) -> PyResult<()> {
160178 m. add_function ( wrap_pyfunction ! ( SetRulesDir , m) ?) ?;
161179 m. add_function ( wrap_pyfunction ! ( SetMathML , m) ?) ?;
162180 m. add_function ( wrap_pyfunction ! ( GetVersion , m) ?) ?;
181+ m. add_function ( wrap_pyfunction ! ( GetSupportedLanguages , m) ?) ?;
182+ m. add_function ( wrap_pyfunction ! ( GetSupportedSpeechStyles , m) ?) ?;
183+ m. add_function ( wrap_pyfunction ! ( GetSupportedBrailleCodes , m) ?) ?;
163184 m. add_function ( wrap_pyfunction ! ( GetSpokenText , m) ?) ?;
164185 m. add_function ( wrap_pyfunction ! ( SetPreference , m) ?) ?;
165186 m. add_function ( wrap_pyfunction ! ( GetPreference , m) ?) ?;
0 commit comments