{"id":18969131,"url":"https://github.com/ranman/connect-audio-utils","last_synced_at":"2026-04-05T15:30:19.193Z","repository":{"id":141492487,"uuid":"229196407","full_name":"ranman/connect-audio-utils","owner":"ranman","description":null,"archived":false,"fork":false,"pushed_at":"2020-02-19T03:49:37.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-01T07:10:25.655Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit-0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ranman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-20T05:30:38.000Z","updated_at":"2020-02-19T03:49:39.000Z","dependencies_parsed_at":"2023-07-03T20:16:30.805Z","dependency_job_id":null,"html_url":"https://github.com/ranman/connect-audio-utils","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/ranman%2Fconnect-audio-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranman%2Fconnect-audio-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranman%2Fconnect-audio-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranman%2Fconnect-audio-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ranman","download_url":"https://codeload.github.com/ranman/connect-audio-utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239966145,"owners_count":19726271,"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":[],"created_at":"2024-11-08T14:51:58.992Z","updated_at":"2026-04-05T15:30:19.055Z","avatar_url":"https://github.com/ranman.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Connect Audio Utils\n\nThis is a set of lambda and ffmpeg powered tools for working with audio from Amazon Connect\n\n## Tools\n\n### Connect Audio Utils Layer\n\nThis layer includes:\n\n* statically compiled ffmpeg\n* boto3\n* [pydub](https://github.com/jiaaro/pydub)\n* requests\n* [ffmpeg-python](https://github.com/kkroening/ffmpeg-python)\n\n### Overlay Audio\n\nThis function overlays two audio tracks and accepts input in the following form:\n\n```json\n{\n    \"sources\": [{\n        \"Bucket\": \"\",\n        \"Key\": \"\"\n    },\n    {\n        \"Bucket\": \"\",\n        \"Key\": \"\"\n    }],\n    \"target\": {\n        \"Bucket\": \"\",\n        \"Key\": \"\"\n    }\n}\n```\n\n### Redact Audio\n\nThis function mutes/removes sections of audio from a track based no timestamps and accepts input in the following form:\n\n```json\n{\n    \"source\": {\n        \"Bucket\": \"\",\n        \"Key\": \"\"\n    },\n    \"target\": {\n        \"Bucket\": \"\",\n        \"Key\": \"\"\n    },\n    \"timestamps\": [\n        {\"begin\": \"1000\", \"end\": \"2000\"},\n        {\"begin\": \"5000\", \"end\": \"8000\"}\n    ]\n}\n```\n\n## Build Instructions\n\n1. Install CDK (npm i -g aws-cdk)\n1. First build the layer:\n\n    ```bash\n    cd resources/connect-audio-utils-layer\n    mkdir bin/\n    curl -s https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz | tar -xJC bin --strip=1 'ffmpeg-*-amd64-static/ffmpeg'\n    docker run --rm -v $(pwd):/foo -w /foo lambci/lambda:build-python3.8 pip3 install -r requirements.txt -t python\n    zip -r9 layer.zip bin python -x \"*.pyc\"\n    ```\n\n1. Change back to root directory of project `cd ../..`\n1. Install deps: `npm install`\n1. Next run `npm run build`\n1. Deploy with run `cdk deploy` (you may need to run `cdk bootstrap` first)\n\n## Useful commands\n\n* `npm run build`   compile typescript to js\n* `npm run watch`   watch for changes and compile\n* `npm run test`    perform the jest unit tests\n* `cdk deploy`      deploy this stack to your default AWS account/region\n* `cdk diff`        compare deployed stack with current state\n* `cdk synth`       emits the synthesized CloudFormation template\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Franman%2Fconnect-audio-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Franman%2Fconnect-audio-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Franman%2Fconnect-audio-utils/lists"}