{"id":19905248,"url":"https://github.com/jonaylor89/cyberpunk","last_synced_at":"2025-05-03T01:33:52.254Z","repository":{"id":42622316,"uuid":"456800231","full_name":"jonaylor89/cyberpunk","owner":"jonaylor89","description":"Audio Processing Server","archived":false,"fork":false,"pushed_at":"2022-05-01T16:40:17.000Z","size":5849,"stargazers_count":12,"open_issues_count":20,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-08-09T16:21:56.085Z","etag":null,"topics":["audio","audio-library","audio-processing","audius","aws-s3","flask","python","s3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonaylor89.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["jonaylor89"]}},"created_at":"2022-02-08T05:48:00.000Z","updated_at":"2023-09-21T09:20:55.000Z","dependencies_parsed_at":"2022-08-30T04:42:48.258Z","dependency_job_id":null,"html_url":"https://github.com/jonaylor89/cyberpunk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonaylor89%2Fcyberpunk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonaylor89%2Fcyberpunk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonaylor89%2Fcyberpunk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonaylor89%2Fcyberpunk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonaylor89","download_url":"https://codeload.github.com/jonaylor89/cyberpunk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224346571,"owners_count":17296242,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","audio-library","audio-processing","audius","aws-s3","flask","python","s3"],"created_at":"2024-11-12T20:32:18.770Z","updated_at":"2024-11-12T20:32:43.453Z","avatar_url":"https://github.com/jonaylor89.png","language":"Python","funding_links":["https://github.com/sponsors/jonaylor89"],"categories":[],"sub_categories":[],"readme":"\n# Cyberpunk\n\nAudio Processing Server\n\n![GitHub](https://img.shields.io/github/license/jonaylor89/cyberpunk?logo=MIT) ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/jonaylor89/cyberpunk/Docker)\n\n[![Run on Google Cloud](https://deploy.cloud.run/button.svg)](https://deploy.cloud.run?git_repo=https://github.com/jonaylor89/cyberpunk)\n\n\n### Quick Start\n\n```sh\ndocker run -p 8080:8080 -e PORT=8080 ghcr.io/jonaylor89/cyberpunk:main\n```\n\nOriginal audio:\n```sh\nhttps://raw.githubusercontent.com/jonaylor89/cyberpunk/main/testdata/celtic_pt2.mp3\n```\n\n![](testdata/celtic_pt2.mp3)\n\n\nTry out the following audio URLs:\n```\nhttp://localhost:8080/unsafe/https://raw.githubusercontent.com/jonaylor89/cyberpunk/main/testdata/celtic_pt2.mp3\nhttp://localhost:8080/unsafe/https://raw.githubusercontent.com/jonaylor89/cyberpunk/main/testdata/celtic_pt2.mp3?reverse=true\nhttp://localhost:8080/unsafe/https://raw.githubusercontent.com/jonaylor89/cyberpunk/main/testdata/celtic_pt2.mp3?slice=0:10000\nhttp://localhost:8080/unsafe/https://raw.githubusercontent.com/jonaylor89/cyberpunk/main/testdata/celtic_pt2.mp3?reverse=true\u0026repeat=1\u0026slice=1000:5000\n\n```\n\n### Cyberpunk Endpoint\n\nCyberpunk endpoint is a series of URL parts which defines the audio operations, followed by the audio URI:\n\n```\n/HASH|unsafe/AUDIO?slice\u0026concat\u0026fade_in\u0026fade_out\u0026repeat\u0026reverse\u0026filters=NAME(ARGS)\n```\n\n- `HASH` is the URL Signature hash, or `unsafe` if unsafe mode is used\n- `slice`\n- `concat`\n- `fade_in`\n- `fade_out`\n- `repeat`\n- `reverse`\n- `AUDIO` is the audio URI\n\n\nCyberpunk provides utilities for previewing and generating Cyberpunk endpoint URI, including the [cyberpunk_path](https://github.com/jonaylor89/cyberpunk/tree/main/cyberpunk/processing.py) function and the `/params` endpoint:\n\n#### `GET /params`\n\nPrepending `/params` to the existing endpoint returns the endpoint attributes in JSON form, useful for preview:\n\n```sh\ncurl \"http://localhost:8000/unsafe/celtic_p2.mp3?reverse=true\u0026repeat=1\u0026slice=1000:5000\"\n\n{\n  \"audio\": \"celtic_pt2.mp3\",\n  \"hash\": \"unsafe\",\n  \"reverse\": true,\n  \"repeat\": 1,\n  \"slice\": {\n      \"start\": 1000,\n      \"end\": 5000,\n  }\n}\n```\n\n### Features\n\n- [x] Audio Streaming\n\n- [x] Change encodings (e.g. mp3 -\u003e wav)\n- [x] Audio slicing\n- [ ] Change Volume\n- [x] Concat Audio\n- [x] Repeat Audio\n- [x] Reverse Audio\n- [ ] Crossfade\n- [x] Fade in/out\n- [ ] Audio Quality\n- [ ] Audio Tagging\n- [ ] Audio Thumbnails\n- [ ] Mastering Music\n\n- [ ] Sound/Vocal Isolation\n\n- [ ] [Cool ML Stuff](https://github.com/spotify/pedalboard)\n\n- [ ] [File Caching](https://gist.github.com/ruanbekker/75d98a0d5cab5d6a562c70b4be5ba86d)\n\n### Storage Options\n\n- [x] Local\n- [ ] Cloud (e.g. S3)\n- [x] Blockchain (Audius)\n\n\n### Environment\n\nTo see a complete list of configurable environment variables, check out [`.env`](./.env)\n\n# Docker Compose Example\n\nCyberpunk with file system, using mounted volume:\n\n```yaml\nversion: \"3\"\nservices:\n  cyberpunk:\n    image: jonaylor/cyberpunk:main\n    volumes:\n      - ./:/mnt/data\n    environment:\n      PORT: 8080\n      AUDIO_PATH: \"local\"\n      FILE_STORAGE_BASE_DIR: /mnt/data/testdata/ # enable file storage by specifying base dir\n    ports:\n      - \"8080:8080\"\n```\n\nCyberpunk with AWS S3:\n\n```yaml\nversion: \"3\"\nservices:\n  cyberpunk:\n    image: jonaylor/cyberpunk:main\n    environment:\n      PORT: 8080\n      CYBERPUNK_SECRET: mysecret # secret key for URL signature\n      AWS_ACCESS_KEY_ID: ...\n      AWS_SECRET_ACCESS_KEY: ...\n      AWS_REGION: ...\n\n      AUDIO_PATH: \"s3\"\n\n      S3_LOADER_BUCKET: mybucket # enable S3 loader by specifying bucket\n      S3_LOADER_BASE_DIR: audio # optional\n\n      S3_STORAGE_BUCKET: mybucket # enable S3 storage by specifying bucket\n      S3_STORAGE_BASE_DIR: audio # optional\n\n      S3_RESULT_STORAGE_BUCKET: mybucket # enable S3 result storage by specifying bucket\n      S3_RESULT_STORAGE_BASE_DIR: audio/result # optional\n    ports:\n      - \"8080:8080\"\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonaylor89%2Fcyberpunk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonaylor89%2Fcyberpunk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonaylor89%2Fcyberpunk/lists"}