{"id":13635179,"url":"https://github.com/gregorias/pycodec2","last_synced_at":"2025-06-10T09:04:51.379Z","repository":{"id":28267222,"uuid":"31777525","full_name":"gregorias/pycodec2","owner":"gregorias","description":"Python's interface to codec 2","archived":false,"fork":false,"pushed_at":"2025-05-20T18:07:00.000Z","size":2081,"stargazers_count":24,"open_issues_count":0,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-08T05:49:50.946Z","etag":null,"topics":["codec2","speech","voice"],"latest_commit_sha":null,"homepage":"","language":"Cython","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gregorias.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":"2015-03-06T16:14:36.000Z","updated_at":"2025-05-20T18:07:04.000Z","dependencies_parsed_at":"2023-09-26T22:54:58.396Z","dependency_job_id":"f949090e-85a4-44a1-8e6d-768b694a14b4","html_url":"https://github.com/gregorias/pycodec2","commit_stats":{"total_commits":53,"total_committers":4,"mean_commits":13.25,"dds":0.2264150943396226,"last_synced_commit":"04db5455f51b25c5fac4f1014dc3538bd41c2967"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorias%2Fpycodec2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorias%2Fpycodec2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorias%2Fpycodec2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorias%2Fpycodec2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregorias","download_url":"https://codeload.github.com/gregorias/pycodec2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregorias%2Fpycodec2/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259043760,"owners_count":22797160,"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":["codec2","speech","voice"],"created_at":"2024-08-02T00:00:41.961Z","updated_at":"2025-06-10T09:04:51.349Z","avatar_url":"https://github.com/gregorias.png","language":"Cython","readme":"# Pycodec2\n\nPycodec2 is a Cython wrapper for [Codec 2][codec2].\n\nIn other words, Pycodec2 allows using the Codec 2 C library from Python.\n\n## Installation\n\n### Prerequisites\n\nPycodec2 requires [Codec 2][codec2].\n\nOn Linux, I recommend using the distro's package-manager, e.g., on\nArch/Manjaro: `pacman -Syuu codec2`, so that Codec2's assets land in standard\nsearchable directories for `python setup.py` to use.\n\nOn macOS, you may use [the Homebrew\nformula](https://formulae.brew.sh/formula/codec2#default).\n\n### Instructions\n\nYou can install the library using PyPI (the easiest option) or from source.\n\n#### From PyPI\n\nTo install the library from PyPI, run:\n\n```bash\npip install pycodec2\n```\n\n### From Source\n\nTo install the library from source, see building instructions in `DEV.md`. You\ncan then install the wheel with:\n\n```bash\npip install dist/*.whl\n```\n\n### Codec 2 Compatibility\n\nPycodec2 4.\\* is compatible with Codec 2 1.2.\\* and Numpy 2.\\*.\n\nPycodec2 3.\\* is compatible with Codec 2 1.2.\\*.\n\nPycodec2 2.\\* is compatible with Codec 2 1.0.\\*.\n\nPycodec2 1.0.\\* is compatible with Codec 2 at 0.9.2+ versions.\n\nIf your Codec 2 version is older than 0.9.2, then try\n[pycodec2-old](https://pypi.org/project/pycodec2-old/) package.\n\nFor more information on potential compatibility problems, check out [this\nissue](https://github.com/gregorias/pycodec2/issues/8).\n\n## Usage\n\n### Example\n\n`example.py` implements a basic script that uses Codec 2 to encode and deencode\na sample. Use the following steps to run an end-2-end scenario (dev/rune2etest\nimplements steps 2-5).\n\n1. Download a sample .wav file, e.g., [trashcan](https://freesound.org/people/InspectorJ/sounds/431158/).\n\n2. Convert the .wav to a raw mono-channel 8kHz format, e.g.,\n\n   sox trashcan.wav -e signed-integer -b 16 trashcan.raw channels 1 rate 8000\n\n3. Compile pycodec2\n\n   python setup.py build_ext --inplace\n\n4. Run `example.py`\n\n   python example.py trashcan.raw\n\n5. Convert `output.raw`\n\n   sox -r 8000 -e signed-integer -b 16 output.raw output.wav\n\nNow you can listen to `output.wav`.\n\n### Expected Input Format\n\n[Codec 2][codec2] assumes that input files use:\n\n* 8kHz bitrate,\n* 16-bit width samples,\n* a single channel.\n\n### Available Modes\n\nFor a list of currently supported modes, look for `_modes` in\n`pycodec2/pycodec2.pyx`.\n\n## Remarks\n\nThis library is considered complete. Please notify me or send a pull request on\nGitHub if you notice any bugs.\n\n[codec2]: http://www.rowetel.com/blog/?page_id=452\n","funding_links":[],"categories":["Software"],"sub_categories":["Decoding"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregorias%2Fpycodec2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregorias%2Fpycodec2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregorias%2Fpycodec2/lists"}