paddleaudio.backends.utils module

Defines utilities for switching audio backends

paddleaudio.backends.utils.get_audio_backend() Optional[str][source]

Get the name of the current backend

Returns:

Optional[str]: The name of the current backend or None if no backend is assigned.

paddleaudio.backends.utils.list_audio_backends() List[str][source]

List available backends

Returns:

List[str]: The list of available backends.

paddleaudio.backends.utils.set_audio_backend(backend: Optional[str])[source]

Set the backend for I/O operation

Args:
backend (str or None): Name of the backend.

One of "sox_io" or "soundfile" based on availability of the system. If None is provided the current backend is unassigned.