{"id":19220393,"url":"https://github.com/krthr/opus","last_synced_at":"2025-07-29T20:40:51.859Z","repository":{"id":232883434,"uuid":"785434887","full_name":"krthr/opus","owner":"krthr","description":"OPUS Audio Codec bindings for Crystal","archived":false,"fork":false,"pushed_at":"2024-04-13T08:48:12.000Z","size":8,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-18T08:58:41.734Z","etag":null,"topics":["opus","opus-codec"],"latest_commit_sha":null,"homepage":"https://crystaldoc.info/github/krthr/opus","language":"Crystal","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/krthr.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":"2024-04-11T21:52:47.000Z","updated_at":"2024-05-07T22:49:34.000Z","dependencies_parsed_at":"2024-04-12T02:55:21.453Z","dependency_job_id":"4414c329-19bd-408c-bd26-4e6c868fe99c","html_url":"https://github.com/krthr/opus","commit_stats":null,"previous_names":["krthr/opus"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krthr%2Fopus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krthr%2Fopus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krthr%2Fopus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krthr%2Fopus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krthr","download_url":"https://codeload.github.com/krthr/opus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240293396,"owners_count":19778502,"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":["opus","opus-codec"],"created_at":"2024-11-09T14:35:03.059Z","updated_at":"2025-02-23T09:21:46.986Z","avatar_url":"https://github.com/krthr.png","language":"Crystal","readme":"# Opus\n\n\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n   ```yaml\n   dependencies:\n     opus:\n       github: krthr/opus\n   ```\n\n2. Run `shards install`\n\n## Usage\n\n```crystal\nrequire \"opus\"\n\nsample_rate = 48_000\nframe_size = 960\nchannels = 2\n\nencoder = Opus::Encoder.new(sample_rate, frame_size, channels)\n\nbuffer = Bytes.new(encoder.input_length, 0)\n\nwhile real_length = audio_data.read(buffer)\n  break if real_length.zero?\n  opus_encoded_data = encoder.encode(buffer)\n  # Use the encoded data\nend\n```\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/krthr/opus/fork\u003e)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Contributors\n\n- [Wilson](https://github.com/krthr) - creator and maintainer\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrthr%2Fopus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrthr%2Fopus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrthr%2Fopus/lists"}