pub fn new<S: AsRef<str>>(text: S, lang: Lang) -> PyResult<Self> {
        Python::with_gil(|py| {
            let google_speech = PyModule::import(py, "google_speech").unwrap();
            let pyobject_speech: PyObject = google_speech
                .call1("Speech", (text.as_ref(), lang.to_string()))
                .unwrap()
                .extract()
                .unwrap();
            Ok(Self { pyobject_speech })
        })
    }
/// Create a new speech object with language
Create a new speech object with language
Create a new speech object with language
pub fn new<S: AsRef<str>>(text: S, lang: Lang) -> PyResult<Self> {
        Python::with_gil(|py| {
            let google_speech = PyModule::import(py, "google_speech").unwrap();
            let pyobject_speech: PyObject = google_speech
                .call1("Speech", (text.as_ref(), lang.to_string()))
                .unwrap()
                .extract()
                .unwrap();
            Ok(Self { pyobject_speech })
        })
    }
pub fn new < S : AsRef < str > > ( text : S , lang : Lang ) -> PyResult < Self > { Python :: with_gil ( | py | { let google_speech = PyModule :: import ( py , " " ) . unwrap ( ) ; let pyobject_speech : PyObject = google_speech . call1 ( " " , ( text . as_ref ( ) , lang . to_string ( ) ) ) . unwrap ( ) . extract ( ) . unwrap ( ) ; Ok ( Self { pyobject_speech } ) } ) }
Create a new speech object with language
Create a new speech object with language
text
S
lang
Lang
text
S
lang
Lang