Skip to main content

Cyberpunk

Audio Processing Server

GitHub GitHub Workflow Status

Run on Google Cloud

Quick Start

docker run -p 8080:8080 -e PORT=8080 ghcr.io/jonaylor89/cyberpunk:main

Original audio:

https://raw.githubusercontent.com/jonaylor89/cyberpunk/main/testdata/celtic_pt2.mp3

Try out the following audio URLs:

http://localhost:8080/unsafe/https://raw.githubusercontent.com/jonaylor89/cyberpunk/main/testdata/celtic_pt2.mp3
http://localhost:8080/unsafe/https://raw.githubusercontent.com/jonaylor89/cyberpunk/main/testdata/celtic_pt2.mp3?reverse=true
http://localhost:8080/unsafe/https://raw.githubusercontent.com/jonaylor89/cyberpunk/main/testdata/celtic_pt2.mp3?slice=0:10000
http://localhost:8080/unsafe/https://raw.githubusercontent.com/jonaylor89/cyberpunk/main/testdata/celtic_pt2.mp3?reverse=true&repeat=1&slice=1000:5000

Cyberpunk Endpoint

Cyberpunk endpoint is a series of URL parts which defines the audio operations, followed by the audio URI:

/HASH|unsafe/AUDIO?slice&concat&fade_in&fade_out&repeat&reverse&filters=NAME(ARGS)
  • HASH is the URL Signature hash, or unsafe if unsafe mode is used
  • slice
  • concat
  • fade_in
  • fade_out
  • repeat
  • reverse
  • AUDIO is the audio URI

Cyberpunk provides utilities for previewing and generating Cyberpunk endpoint URI, including the cyberpunk_path function and the /params endpoint:

GET /params

Prepending /params to the existing endpoint returns the endpoint attributes in JSON form, useful for preview:

curl "http://localhost:8000/unsafe/celtic_p2.mp3?reverse=true&repeat=1&slice=1000:5000"

{
  "audio": "celtic_pt2.mp3",
  "hash": "unsafe",
  "reverse": true,
  "repeat": 1,
  "slice": {
      "start": 1000,
      "end": 5000,
  }
}

Features

  • Audio Streaming

  • Change encodings (e.g. mp3 -> wav)

  • Audio slicing

  • Change Volume

  • Concat Audio

  • Repeat Audio

  • Reverse Audio

  • Crossfade

  • Fade in/out

  • Audio Quality

  • Audio Tagging

  • Audio Thumbnails

  • Mastering Music

  • Sound/Vocal Isolation

  • Cool ML Stuff

  • File Caching

Storage Options

  • Local
  • Cloud (e.g. S3)
  • Blockchain (Audius)

Environment

To see a complete list of configurable environment variables, check out .env

Docker Compose Example

Cyberpunk with file system, using mounted volume:

version: "3"
services:
  cyberpunk:
    image: jonaylor/cyberpunk:main
    volumes:
      - ./:/mnt/data
    environment:
      PORT: 8080
      AUDIO_PATH: "local"
      FILE_STORAGE_BASE_DIR: /mnt/data/testdata/ # enable file storage by specifying base dir
    ports:
      - "8080:8080"

Cyberpunk with AWS S3:

version: "3"
services:
  cyberpunk:
    image: jonaylor/cyberpunk:main
    environment:
      PORT: 8080
      CYBERPUNK_SECRET: mysecret # secret key for URL signature
      AWS_ACCESS_KEY_ID: ...
      AWS_SECRET_ACCESS_KEY: ...
      AWS_REGION: ...

      AUDIO_PATH: "s3"

      S3_LOADER_BUCKET: mybucket # enable S3 loader by specifying bucket
      S3_LOADER_BASE_DIR: audio # optional

      S3_STORAGE_BUCKET: mybucket # enable S3 storage by specifying bucket
      S3_STORAGE_BASE_DIR: audio # optional

      S3_RESULT_STORAGE_BUCKET: mybucket # enable S3 result storage by specifying bucket
      S3_RESULT_STORAGE_BASE_DIR: audio/result # optional
    ports:
      - "8080:8080"

Metadata

Release files for cyberpunk 0.2.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cyberpunk 0.2.7
File Size Uploaded Provenance Actions
cyberpunk-0.2.7.tar.gz 16.7 kB Without provenance Details for cyberpunk-0.2.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cyberpunk 0.2.7
File Interpreter ABI Platform Actions
cyberpunk-0.2.7-py3-none-any.whl Python 3 none any Details for cyberpunk-0.2.7-py3-none-any.whl

Total release size: 39.4 kB

Release files / cyberpunk-0.2.7.tar.gz

Download URL cyberpunk-0.2.7.tar.gz
Size 16.7 kB
Tags Source
SHA-256 checksum
How to use checksums
855b16c02bde519bcb512e37e8490aed0fc59b1da84daf73d147efc9b5783350
BLAKE2b-256 checksum
How to use checksums
b5962096a85087f00ce961d2b388a9c68f7d9abc7191335ddc6b868b89a1c157
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.7 Linux/5.16.15-76051615-generic

Release files / cyberpunk-0.2.7-py3-none-any.whl

Download URL cyberpunk-0.2.7-py3-none-any.whl
Size 22.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5146bbc92af1a447cd3065c64149df0932a605750379eb6a20cf376a31398a56
BLAKE2b-256 checksum
How to use checksums
6593d4170f007a7ce15590258c4cd038a0ea5cc55855345d105449fb1c957ccb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.7 Linux/5.16.15-76051615-generic

Security for cyberpunk 0.2.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page