{"id":15705325,"url":"https://github.com/brahmlower/audio-slicing-api","last_synced_at":"2025-07-07T14:33:51.556Z","repository":{"id":86081462,"uuid":"452905093","full_name":"brahmlower/audio-slicing-api","owner":"brahmlower","description":"A simple audio slicing api","archived":false,"fork":false,"pushed_at":"2022-01-28T01:48:42.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T15:47:22.287Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brahmlower.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-01-28T01:45:55.000Z","updated_at":"2022-08-03T00:36:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"635df926-9601-4882-9bde-1aab5ff46e04","html_url":"https://github.com/brahmlower/audio-slicing-api","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"513b4970358f394eaaabfcac8dcfa1ea0ed783ba"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/brahmlower/audio-slicing-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brahmlower%2Faudio-slicing-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brahmlower%2Faudio-slicing-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brahmlower%2Faudio-slicing-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brahmlower%2Faudio-slicing-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brahmlower","download_url":"https://codeload.github.com/brahmlower/audio-slicing-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brahmlower%2Faudio-slicing-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264092381,"owners_count":23556286,"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-10-03T20:15:26.583Z","updated_at":"2025-07-07T14:33:51.537Z","avatar_url":"https://github.com/brahmlower.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## Prompt\n\nBuild a simple API server to handle user audio projects. Your server should provide\nendpoints that allow a user to perform the following actions:\n1.  POST raw audio data and store it.\n    Eg: $ curl -X POST --data-binary @myfile.wav http://localhost/post\n2.  GET a list of stored files, GET the content of stored files, and GET metadata of\n    stored files, such as the duration of the audio. The GET endpoint(s) should\n    accept a query parameter that allows the user to filter results. Results should be\n    returned as JSON.\n    Eg: $ curl http://localhost/download?name=myfile.wav\n    Eg: $ curl http://localhost/list?maxduration=300\n    Eg: $ curl http://localhost/info?name=myfile.wav\n\n## Usage\n\n### Database preparation\n\nStart the database via dockercompose. We'll leave it running in the background\n```\ndocker-compose up -d\n```\n\nOne started, create the schema by applying what can loosely be called our \"migrations\". Ideaily we'd set up and use sqitch instead.\n\n```\nPGPASSWORD=postgres psql -h localhost -U postgres \u003c ./db_migrations/up.sql\n```\n\nIf we need to reset the db later, we can easily roll back the database using:\n\n```\nPGPASSWORD=postgres psql -h localhost -U postgres \u003c ./db_migrations/down.sql\n```\n\n\n\n### Usage\n\nGet an example audio file if you don't already have one. I've renamed this one to match the examples above\n\n```\nwget https://www2.cs.uic.edu/~i101/SoundFiles/taunt.wav\n```\n\nWith the database already running, start the server in one terminal:\n\n```\nnpm run build;\nnpm run start;\n```\n\nThen you can use the API exactly as described above:\n\n```\ncurl -X POST --data-binary @taunt.wav http://localhost:3000/post\ncurl http://localhost:3000/list?maxduration=300\ncurl http://localhost:3000/download?name=taunt.wav --output downloaded-taunt.wav\nmd5 taunt.wav downloaded-taunt.wav\nMD5 (taunt.wav) = bdff3faccd932c1ef35d3239e11738cb\nMD5 (downloaded-taunt.wav) = bdff3faccd932c1ef35d3239e11738cb\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrahmlower%2Faudio-slicing-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrahmlower%2Faudio-slicing-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrahmlower%2Faudio-slicing-api/lists"}