Audio Processing Server
Project description
Cyberpunk
Audio Processing Server
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, orunsafe
if unsafe mode is usedslice
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
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"
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
Built Distribution
File details
Details for the file cyberpunk-0.2.7.tar.gz
.
File metadata
- Download URL: cyberpunk-0.2.7.tar.gz
- Upload date:
- Size: 16.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.7 Linux/5.16.15-76051615-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 855b16c02bde519bcb512e37e8490aed0fc59b1da84daf73d147efc9b5783350 |
|
MD5 | 595b0e561219ac8fe4fa867ddbf3a808 |
|
BLAKE2b-256 | b5962096a85087f00ce961d2b388a9c68f7d9abc7191335ddc6b868b89a1c157 |
File details
Details for the file cyberpunk-0.2.7-py3-none-any.whl
.
File metadata
- Download URL: cyberpunk-0.2.7-py3-none-any.whl
- Upload date:
- Size: 22.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.7 Linux/5.16.15-76051615-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5146bbc92af1a447cd3065c64149df0932a605750379eb6a20cf376a31398a56 |
|
MD5 | 412fae09b2dd6bf64995c68562e997c9 |
|
BLAKE2b-256 | 6593d4170f007a7ce15590258c4cd038a0ea5cc55855345d105449fb1c957ccb |