Skip to main content

A audio player extension for schemdule.

Project description

schemdule-extensions-audioplay

Schemdule

Downloads

A audio player extension for Schemdule.

Install

Install dependencies:

# Install dependencies on Linux (only)
sudo apt-get install -y python3-dev libasound2-dev

# Install ffmpeg
choco install ffmpeg        # Windows
apt-get install -y ffmpeg   # Linux
brew install ffmpeg         # MacOS

Use pip:

pip install schemdule-extensions-audioplay

Or use pipx:

pipx inject schemdule schemdule-extensions-audioplay

# Upgrade
pipx upgrade schemdule --include-injected

Check if the extension installed:

schemdule ext

Usage

This extension provide a AudioPlayerPrompter and add the following extension methods on PrompterBuilder and PayloadBuilder.

class PrompterBuilder:
    def useAudioPlayer(self: PrompterBuilder, endSpace: Optional[timedelta] = None, final: bool = False) -> PrompterBuilder:
        """
        endSpace: Stop audio before next event, default 10 seconds. The empty space leads to the next event outdated.
        """
        ...

class PayloadBuilder:
    def useAudio(self, files: Iterable[str]) -> "PayloadBuilder":
        ...

Use the extension in the schema script.

# schema.py
ext("audioplay")

at(..., payloads().useAudio(["file1"]))

prompter.useAudioPlayer()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

schemdule-extensions-audioplay-0.1.0.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page