Skip to main content

Audio watermarking library for AI voice generators

Project description

Wavemark Python Bindings

This directory contains Python bindings for the Wavemark audio watermarking library, following the same pattern as the tokenizers library.

Overview

The Python package wavemark provides Rust-powered audio watermarking functionality through PyO3 bindings, built and distributed as pre-compiled wheels via maturin.

Installation

From PyPI (when published)

pip install wavemark

Development Installation

# Install maturin
pip install maturin

# Build and install in development mode
cd bindings/python
maturin develop

# Or build wheels
maturin build --release

Project Structure

bindings/python/
├── pyproject.toml          # Python package configuration with maturin
├── Cargo.toml              # Rust crate configuration
├── src/lib.rs              # PyO3 bindings code
├── python/wavemark/        # Python package structure
│   └── __init__.py         # Package initialization
├── examples/               # Usage examples
└── tests/                  # Python tests

Key Features

  • Rust-powered: Core functionality implemented in Rust for performance
  • PyO3 bindings: Seamless Python integration
  • Maturin build system: Automated wheel building for multiple platforms
  • Pre-compiled wheels: No Rust toolchain required for end users
  • Cross-platform: Supports Windows, macOS, and Linux

Build Configuration

The pyproject.toml configures maturin as the build backend:

[build-system]
requires = ["maturin>=1.0,<2.0"]
build-backend = "maturin"

[tool.maturin]
python-source = "python"
module-name = "wavemark"

Publishing to PyPI

  1. Build wheels for multiple platforms:

    maturin build --release
    
  2. Upload to PyPI:

    maturin publish
    
  3. Wheels are automatically built for:

    • Windows (x86_64, i686)
    • macOS (x86_64, aarch64)
    • Linux (x86_64, i686, aarch64, armv7l)
    • Python 3.8, 3.9, 3.10, 3.11, 3.12

Development

Prerequisites

  • Rust toolchain
  • Python 3.8+
  • maturin

Local Development

# Install in development mode
maturin develop

# Run tests
python -m pytest tests/

# Run examples
python examples/basic_usage.py

CI/CD Integration

The build process can be integrated into CI/CD pipelines to automatically build and publish wheels for new releases, similar to how tokenizers handles their releases.

Usage

import wavemark

# Basic usage
message = wavemark.hello_world()
print(message)

Benefits of This Approach

  1. Performance: Rust core provides high-performance audio processing
  2. Ease of use: Simple pip install wavemark for end users
  3. No compilation: Pre-built wheels eliminate build complexity
  4. Cross-platform: Works on all major platforms
  5. Maintainable: Clear separation between Rust core and Python bindings

This approach mirrors the successful pattern used by tokenizers, making wavemark easy to adopt in the Python ecosystem while maintaining the performance benefits of Rust.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

wavemark-0.1.0-cp38-abi3-win_amd64.whl (94.0 kB view details)

Uploaded CPython 3.8+Windows x86-64

wavemark-0.1.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (229.7 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

wavemark-0.1.0-cp38-abi3-macosx_11_0_arm64.whl (193.5 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

File details

Details for the file wavemark-0.1.0-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: wavemark-0.1.0-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 94.0 kB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.9.5

File hashes

Hashes for wavemark-0.1.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 9340e44f72bcbdf09f80ca5dbf77c25df53d2a3308c498b6d5d8d047c4ba79a5
MD5 76ece50231c4ac2ccd8eca220a013076
BLAKE2b-256 43017c333c2a6bbc01cc8bfb6122e2ddde9d71b0a75b8bc0325fd891caa90849

See more details on using hashes here.

File details

Details for the file wavemark-0.1.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for wavemark-0.1.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6fbb8e06585b10db2a757d7b0da233575e128bce42699a34e2e3d5e27a8e1bb2
MD5 3ea1a0ac6a9cd21c92ce962499cd9224
BLAKE2b-256 235ad5f917aad995e9ebf4585a6ec9618782bb673c881ff062da21e405bf53bd

See more details on using hashes here.

File details

Details for the file wavemark-0.1.0-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for wavemark-0.1.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4d26429668bf7b4f4dfcf4cf83f33c328a49051e79526d33eb6b07abd9313fa7
MD5 fbf06c4a521072c7a2ce24930e40b229
BLAKE2b-256 05a32266d48e55aa3f30c44003a5590cfc84def49ca9a0863df9245c6af381c1

See more details on using hashes here.

Supported by

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