{"id":21529590,"url":"https://github.com/sooftware/rnn-transducer","last_synced_at":"2025-04-09T23:51:39.265Z","repository":{"id":60262355,"uuid":"334748371","full_name":"sooftware/RNN-Transducer","owner":"sooftware","description":"PyTorch implementation of RNN-Transducer(RNN-T).","archived":false,"fork":false,"pushed_at":"2021-05-06T06:06:23.000Z","size":33,"stargazers_count":75,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T23:51:34.738Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sooftware.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}},"created_at":"2021-01-31T20:18:59.000Z","updated_at":"2025-01-31T05:18:46.000Z","dependencies_parsed_at":"2022-09-27T10:40:19.600Z","dependency_job_id":null,"html_url":"https://github.com/sooftware/RNN-Transducer","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/sooftware%2FRNN-Transducer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sooftware%2FRNN-Transducer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sooftware%2FRNN-Transducer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sooftware%2FRNN-Transducer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sooftware","download_url":"https://codeload.github.com/sooftware/RNN-Transducer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248131454,"owners_count":21052819,"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-24T01:58:16.256Z","updated_at":"2025-04-09T23:51:39.238Z","avatar_url":"https://github.com/sooftware.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp  align=\"center\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/42150335/106396946-5ae33b00-644e-11eb-9c00-b7f9127b4479.png\" height=100\u003e\n  \n\u003cp  align=\"center\"\u003ePyTorch implementation of RNN-Transducer\n\n***\n\n\u003cp  align=\"center\"\u003e \n     \u003ca href=\"https://github.com/sooftware/jasper/blob/main/LICENSE\"\u003e\n          \u003cimg src=\"http://img.shields.io/badge/license-Apache--2.0-informational\"\u003e \n     \u003c/a\u003e\n     \u003ca href=\"https://github.com/pytorch/pytorch\"\u003e\n          \u003cimg src=\"http://img.shields.io/badge/framework-PyTorch-informational\"\u003e \n     \u003c/a\u003e\n     \u003ca href=\"https://www.python.org/dev/peps/pep-0008/\"\u003e\n          \u003cimg src=\"http://img.shields.io/badge/codestyle-PEP--8-informational\"\u003e \n     \u003c/a\u003e\n     \u003ca href=\"https://github.com/sooftware/conformer\"\u003e\n          \u003cimg src=\"http://img.shields.io/badge/build-passing-success\"\u003e \n     \u003c/a\u003e\n    \n  RNN-Transducer are a form of sequence-to-sequence models that do not employ attention mechanisms. Unlike most sequence-to-sequence models, which typically need to process the entire input sequence (the waveform in our case) to produce an output (the sentence), the RNN-T continuously processes input samples and streams output symbols, a property that is welcome for speech dictation.    \n    \n![img](https://www.researchgate.net/publication/335044103/figure/fig3/AS:789632253952000@1565274408664/Recurrent-neural-network-RNN-transducer-structure-38.png)\n  \nThis repository contains only model code, but you can train with conformer with [this repository](https://github.com/sooftware/kospeech).\n   \n## Installation\nThis project recommends Python 3.7 or higher.\nWe recommend creating a new virtual environment for this project (using virtual env or conda).\n  \n### Prerequisites\n* Numpy: `pip install numpy` (Refer [here](https://github.com/numpy/numpy) for problem installing Numpy).\n* Pytorch: Refer to [PyTorch website](http://pytorch.org/) to install the version w.r.t. your environment.  \n* warprnnt_pytorch: Refer to [warp-transducer](https://github.com/HawkAaron/warp-transducer) to install warprnnt_pytorch.\n  \n## Usage\n\n```python\nimport torch\nimport torch.nn as nn\nfrom rnnt import RNNTransducer\n\nbatch_size, sequence_length, dim = 3, 12345, 80\n\ncuda = torch.cuda.is_available()  \ndevice = torch.device('cuda' if cuda else 'cpu')\n\ninputs = torch.rand(batch_size, sequence_length, dim).to(device)\ninput_lengths = torch.IntTensor([12345, 12300, 12000])\ntargets = torch.LongTensor([[1, 3, 3, 3, 3, 3, 4, 5, 6, 2],\n                            [1, 3, 3, 3, 3, 3, 4, 5, 2, 0],\n                            [1, 3, 3, 3, 3, 3, 4, 2, 0, 0]]).to(device)\ntarget_lengths = torch.LongTensor([9, 8, 7])\n\nmodel = nn.DataParallel(RNNTransducer(num_classes=10)).to(device)\n\n# Forward propagate\noutputs = model(inputs, input_lengths, targets, target_lengths)\n\n# Recognize input speech\noutputs = model.module.recognize(inputs, input_lengths)\n```\n  \n## Troubleshoots and Contributing\nIf you have any questions, bug reports, and feature requests, please [open an issue](https://github.com/sooftware/RNN-Transducer/issues) on github or   \ncontacts sh951011@gmail.com please.\n  \nI appreciate any kind of feedback or contribution.  Feel free to proceed with small issues like bug fixes, documentation improvement.  For major contributions and new features, please discuss with the collaborators in corresponding issues.  \n  \n## Code Style\nI follow [PEP-8](https://www.python.org/dev/peps/pep-0008/) for code style. Especially the style of docstrings is important to generate documentation.  \n  \n## Reference\n- [Sequence Transduction with Recurrent Neural Networks](https://arxiv.org/abs/1211.3711)\n- [ZhengkunTian/rnn-transducer](https://github.com/ZhengkunTian/rnn-transducer)\n  \n## Author\n  \n* Soohwan Kim [@sooftware](https://github.com/sooftware)\n* Contacts: sh951011@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsooftware%2Frnn-transducer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsooftware%2Frnn-transducer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsooftware%2Frnn-transducer/lists"}