{"id":17036276,"url":"https://github.com/mpariente/pystoi","last_synced_at":"2025-05-16T03:04:10.885Z","repository":{"id":31885914,"uuid":"130055600","full_name":"mpariente/pystoi","owner":"mpariente","description":"Python implementation of the Short Term Objective Intelligibility measure ","archived":false,"fork":false,"pushed_at":"2023-12-29T16:47:47.000Z","size":815,"stargazers_count":339,"open_issues_count":5,"forks_count":58,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-05-08T22:34:20.749Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"MATLAB","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/mpariente.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}},"created_at":"2018-04-18T12:01:22.000Z","updated_at":"2025-04-27T19:59:15.000Z","dependencies_parsed_at":"2024-01-08T12:14:33.504Z","dependency_job_id":null,"html_url":"https://github.com/mpariente/pystoi","commit_stats":{"total_commits":47,"total_committers":9,"mean_commits":5.222222222222222,"dds":"0.36170212765957444","last_synced_commit":"9ff1cfa743d59b50f1bd35c21c2e8686de6ac026"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpariente%2Fpystoi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpariente%2Fpystoi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpariente%2Fpystoi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpariente%2Fpystoi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mpariente","download_url":"https://codeload.github.com/mpariente/pystoi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254459088,"owners_count":22074605,"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-14T08:49:55.922Z","updated_at":"2025-05-16T03:04:05.870Z","avatar_url":"https://github.com/mpariente.png","language":"MATLAB","readme":"# Python implementation of STOI\n\nImplementation of the classical and extended Short Term Objective Intelligibility measures\n\nIntelligibility measure which is highly correlated with the intelligibility of degraded speech signals, e.g., due to additive noise, single/multi-channel noise reduction, binary masking and vocoded speech as in CI simulations. The STOI-measure is intrusive, i.e., a function of the clean and degraded speech signals. STOI may be a good alternative to the speech intelligibility index (SII) or the speech transmission index (STI), when you are interested in the effect of nonlinear processing to noisy speech, e.g., noise reduction, binary masking algorithms, on speech intelligibility.   \nDescription taken from [Cees Taal's website](http://www.ceestaal.nl/code/)\n\n\n### Install\n\n`pip install pystoi` or\n`pip3 install pystoi`\n\n### Usage\n```\nimport soundfile as sf\nfrom pystoi import stoi\n\nclean, fs = sf.read('path/to/clean/audio')\ndenoised, fs = sf.read('path/to/denoised/audio')\n\n# Clean and den should have the same length, and be 1D\nd = stoi(clean, denoised, fs, extended=False)\n```\n\n### Running the Octave tests \n\n```bash \nsudo apt update \nsudo apt install octave octave-signal \npip install oct2py\n```\n\n```bash\npython -m pytest tests/test_python_octave.py\npython -m pytest tests/test_stoi_octave.py\n```\n\n### Matlab code \u0026 Testing\n\nAll the Matlab code in this repo is taken from or adapted from the code available [here](http://www.ceestaal.nl/code/) (STOI – Short-Time Objective Intelligibility Measure – ) written by Cees Taal.\n\nThanks to Cees Taal who open-sourced his Matlab implementation and enabled thorough testing of this python code.\n\nIf you want to run the tests, you will need Matlab, `matlab.engine` (install instructions [here](https://fr.mathworks.com/help/matlab/matlab_external/install-the-matlab-engine-for-python.html)) and `matlab_wrapper` (install with `pip install matlab_wrapper`).\nThe tests can only be ran under Python 2.7 as `matlab.engine` and `matlab_wrapper` are only compatible with Python2.7\nTests are passing at relative and absolute tolerance of `1e-3`, which is enough for the considered application (all the variability is coming from the resampling method when signals are not natively sampled at 10kHz).\n\nVery big thanks to @gauss256 who translated all the matlab scripts to Octave, and wrote all the tests for it!\n\n### Contribute\n\nAny contribution are welcome~, specially to improve the execution speed of the code~ (thank you Przemek Pobrotyn for a 4x speed-up!) :\n\n* ~Improve the resampling method to match Matlab's resampling in `tests/`.~ This can be considered a solved issue thanks to @gauss256 !\n* Write tests for Python 3 (with [`transplant`](https://github.com/bastibe/transplant) for example)\n\n\n### References\n* [1] C.H.Taal, R.C.Hendriks, R.Heusdens, J.Jensen 'A Short-Time\n  Objective Intelligibility Measure for Time-Frequency Weighted Noisy Speech',\n  ICASSP 2010, Texas, Dallas.\n* [2] C.H.Taal, R.C.Hendriks, R.Heusdens, J.Jensen 'An Algorithm for\n  Intelligibility Prediction of Time-Frequency Weighted Noisy Speech',\n  IEEE Transactions on Audio, Speech, and Language Processing, 2011.\n* [3] J. Jensen and C. H. Taal, 'An Algorithm for Predicting the\n  Intelligibility of Speech Masked by Modulated Noise Maskers',\n  IEEE Transactions on Audio, Speech and Language Processing, 2016.\n","funding_links":[],"categories":["Audio Related Packages"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpariente%2Fpystoi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmpariente%2Fpystoi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpariente%2Fpystoi/lists"}