diff --git a/py_src/sphn/__init__.pyi b/py_src/sphn/__init__.pyi index dbf68dd..1d25499 100644 --- a/py_src/sphn/__init__.pyi +++ b/py_src/sphn/__init__.pyi @@ -22,6 +22,15 @@ def read(filename, start_sec=None, duration_sec=None, sample_rate=None): """ pass +@staticmethod +def read_opus(filename): + """ + Reads the whole content of an ogg/opus encoded file. + + This returns a two dimensional array as well as the sample rate. + """ + pass + @staticmethod def write_wav(filename, data, sample_rate): """ diff --git a/src/lib.rs b/src/lib.rs index ee6aaeb..8ba223a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -186,6 +186,9 @@ fn write_wav( Ok(()) } +/// Reads the whole content of an ogg/opus encoded file. +/// +/// This returns a two dimensional array as well as the sample rate. #[pyfunction] #[pyo3(signature = (filename))] fn read_opus(filename: std::path::PathBuf, py: Python) -> PyResult<(PyObject, u32)> {