{"id":19810992,"url":"https://github.com/accenture/speech2spikes","last_synced_at":"2025-05-01T08:32:19.633Z","repository":{"id":171358523,"uuid":"647828711","full_name":"Accenture/speech2spikes","owner":"Accenture","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-20T17:48:31.000Z","size":72,"stargazers_count":5,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-17T09:52:37.226Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Accenture.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":"2023-05-31T15:51:07.000Z","updated_at":"2025-02-05T14:43:57.000Z","dependencies_parsed_at":"2024-01-08T23:23:34.067Z","dependency_job_id":"a9fcd724-5d82-4109-8c8b-ba4220768de7","html_url":"https://github.com/Accenture/speech2spikes","commit_stats":null,"previous_names":["accenture/speech2spikes"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Accenture%2Fspeech2spikes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Accenture%2Fspeech2spikes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Accenture%2Fspeech2spikes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Accenture%2Fspeech2spikes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Accenture","download_url":"https://codeload.github.com/Accenture/speech2spikes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251847828,"owners_count":21653582,"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-12T09:24:18.143Z","updated_at":"2025-05-01T08:32:19.410Z","avatar_url":"https://github.com/Accenture.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"README for Speech2Spikes Python Package\n===================================\n\nSpeech2Spikes is an algorithm designed to convert raw audio data into spike trains that can be utilized by neuromorphic processors using efficient operations (https://doi.org/10.1145/3584954.3584995).\n\nThis package is built on top of the PyTorch framework, providing a convenient and efficient solution for transforming audio signals into spiking representations. \n\nInstallation\n------------\nYou can easily install speech2spikes using pip:\n\n```shell\npip install speech2spikes\n```\n\nUsage\n-----\nTo convert a batch of audio tensors into spike trains, follow these simple steps:\n\n1. Import the S2S class from the speech2spikes package:\n    ```python\n    from speech2spikes import S2S\n    ```\n\n2. Initialize the S2S object:\n    ```python\n    s2s = S2S()\n    ```\n\n3. Convert the batch of audio tensors to spike trains:\n    ```python\n    spike_trains = s2s(batch)\n    ```\n   where `batch` is a list of tuples of form `[(audio, target)]`.\n\nThe `spike_trains` output will be a tuple of two tensors, `spikes` and `targets`. Raw audio data is expected to be in the format `(..., timesteps)`.\n\nS2S can also be used as a collate function in PyTorch DataLoaders like this:\n```\ndl = torch.utils.data.DataLoader(\n    train_set,\n    batch_size = BATCH_SIZE,\n    shuffle = True,\n    collate_fn = s2s\n)\n```\n\nNotes\n-----\nThe Speech2Spikes paper shows spikes as being separated into positive and negative channels however, this code does not separate the spikes this way, instead returning them as signed ints (+1, -1, and 0). We have not seen a decrease in accuracy by doing this and find that reducing the input dimensionality can significantly reduce the overall model size.  \n  \nSimilarly, the cumulative sum feature described in the paper can be replicated using `S2S(cumsum=True)` but is disabled by default due to limited improvements in accuracy while drastically increasing the input dimensionality.\n\nLicense\n-------\nSpeech2Spikes is made available under a proprietary license that permits using, copying, sharing, and making derivative works from Speech2Spikes and its source code for academics/non-commercial purposes only, as long as the above copyright notice and this permission notice are included in all copies of the software.\n\nSee the `LICENSE` file for more information.\n\nContact\n-------\nIf you have any questions, suggestions, or feedback, please feel free to reach out to us at `neuromorphic_inquiries@accenture.com`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faccenture%2Fspeech2spikes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faccenture%2Fspeech2spikes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faccenture%2Fspeech2spikes/lists"}