{"id":16108360,"url":"https://github.com/yinruiqing/change_detection","last_synced_at":"2025-04-06T04:20:07.181Z","repository":{"id":94301024,"uuid":"85595269","full_name":"yinruiqing/change_detection","owner":"yinruiqing","description":"Code for Speaker Change Detection in Broadcast TV using Bidirectional Long Short-Term Memory Networks","archived":false,"fork":false,"pushed_at":"2020-07-14T02:30:42.000Z","size":374,"stargazers_count":64,"open_issues_count":2,"forks_count":15,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-02-12T10:23:21.507Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"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/yinruiqing.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":"2017-03-20T15:42:27.000Z","updated_at":"2025-02-11T03:02:49.000Z","dependencies_parsed_at":"2023-03-13T17:02:30.129Z","dependency_job_id":null,"html_url":"https://github.com/yinruiqing/change_detection","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/yinruiqing%2Fchange_detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yinruiqing%2Fchange_detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yinruiqing%2Fchange_detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yinruiqing%2Fchange_detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yinruiqing","download_url":"https://codeload.github.com/yinruiqing/change_detection/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247431431,"owners_count":20937970,"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-09T19:26:32.765Z","updated_at":"2025-04-06T04:20:06.783Z","avatar_url":"https://github.com/yinruiqing.png","language":null,"funding_links":[],"categories":["Software"],"sub_categories":["Speaker change detection"],"readme":":warning: This repository is no longer maintained: it has been integrated into [`pyannote.audio`](https://github.com/pyannote/pyannote-audio).\n\n# Speaker Change Detection using Bi-LSTM\nCode for [**Speaker Change Detection in Broadcast TV using Bidirectional Long Short-Term Memory Networks**](https://github.com/yinruiqing/change_detection/blob/master/doc/change-detection.pdf)\n\n## Citation\n\n```\n@inproceedings{Yin2017,\n  Author = {Ruiqing Yin and Herv\\'e Bredin and Claude Barras},\n  Title = {{Speaker Change Detection in Broadcast TV using Bidirectional Long Short-Term Memory Networks}},\n  Booktitle = {{18th Annual Conference of the International Speech Communication Association, Interspeech 2017}},\n  Year = {2017},\n  Month = {August},\n  Address = {Stockholm, Sweden},\n  Url = {https://github.com/yinruiqing/change_detection}\n}\n```\n\n## Installation\n\n**Foreword:** The code is based on [`pyannote`](https://github.com/pyannote). You can also find a similar `Readme` file for [`TristouNet `](https://github.com/hbredin/TristouNet).\n\n```bash\n$ conda create --name change-detection python=2.7 anaconda\n$ source activate change-detection\n$ conda install gcc\n$ conda install -c yaafe yaafe=0.65\n$ pip install \"pyannote.audio==0.2.1\"\n$ pip install pyannote.db.etape\n```\nWhat did I just install?\n\n- [`keras`](keras.io) (and its [`theano`](http://deeplearning.net/software/theano/) backend) is used for all things deep. If you want to use `GPU`, please downgrade `Keras` version to `1.2.0`\n- [`yaafe`](https://github.com/Yaafe/Yaafe) is used for MFCC feature extraction in [`pyannote.audio`](http://pyannote.github.io).\n- [`pyannote.audio`](http://pyannote.github.io) is the core for this project. (Model architecture, optimizer, sequence generator)\n- [`pyannote.db.etape`](http://pyannote.github.io) is the ETAPE plugin for [`pyannote.database`](http://pyannote.github.io), a common API for multimedia databases and experimental protocols (*e.g.* `train`/`dev`/`test` sets definition).\n\nThen, edit `~/.keras/keras.json` to configure `keras` with `theano` backend.\n\n```json\n$ cat ~/.keras/keras.json\n{\n    \"image_dim_ordering\": \"th\",\n    \"epsilon\": 1e-07,\n    \"floatx\": \"float32\",\n    \"backend\": \"theano\"\n}\n```\n\n#### About the ETAPE database\n\nTo reproduce the experiment, you obviously need to have access to the ETAPE corpus.  \nIt can be obtained from [ELRA catalogue](http://islrn.org/resources/425-777-374-455-4/).\n\nHowever, if you own another corpus with *\"who speaks when\"* annotations, you can fork [`pyannote.db.etape`](http://github.com/pyannote/pyannote-db-etape) and adapt the code to your own database. \n\n## Training and evaluation\nYou can use:\n\n```bash\n$ pyannote-change-detection -h\n```\nto find the usage information.\n\n```\nchange detection\n\nUsage:\n    pyannote-change-detection train [--database=\u003cdb.yml\u003e --subset=\u003csubset\u003e] \u003cexperiment_dir\u003e \u003cdatabase.task.protocol\u003e\n    pyannote-change-detection evaluate [--database=\u003cdb.yml\u003e --subset=\u003csubset\u003e --epoch=\u003cepoch\u003e --min_duration=\u003cmin_duration\u003e] \u003ctrain_dir\u003e \u003cdatabase.task.protocol\u003e\n    pyannote-change-detection apply  [--database=\u003cdb.yml\u003e --subset=\u003csubset\u003e --threshold=\u003cthreshold\u003e --epoch=\u003cepoch\u003e  --min_duration=\u003cmin_duration\u003e] \u003ctrain_dir\u003e \u003cdatabase.task.protocol\u003e\n    pyannote-change-detection -h | --help\n    pyannote-change-detection --version\n...\n```\nExample of config file can be found in `change_detection/config/`. Before doing the training and evaluation, you can clone this project to local directory. \n\n```bash\ngit clone https://github.com/yinruiqing/change_detection.git\n```\n\n### Training \n\n```bash\n$ pyannote-change-detection train --database change_detection/config/db.yml --subset train change_detection/config Etape.SpeakerDiarization.TV\n```\nThis is the expected output:\n\n```\nEpoch 1/100\n62464/62464 [==============================] - 171s - loss: 0.1543 - acc: 0.9669   \nEpoch 2/100\n62464/62464 [==============================] - 117s - loss: 0.1375 - acc: 0.9692     \nEpoch 3/100\n62464/62464 [==============================] - 115s - loss: 0.1376 - acc: 0.9691     \n...\nEpoch 50/100\n62464/62464 [==============================] - 112s - loss: 0.0903 - acc: 0.9724  \n...\nEpoch 98/100\n62464/62464 [==============================] - 115s - loss: 0.0837 - acc: 0.9732     \nEpoch 99/100\n62464/62464 [==============================] - 112s - loss: 0.0839 - acc: 0.9732     \nEpoch 100/100\n62464/62464 [==============================] - 112s - loss: 0.0840 - acc: 0.9731\n\n```\n### Evaluation\n```bash\n$ pyannote-change-detection evaluate --database change_detection/config/db.yml --subset development change_detection/config/train/Etape.SpeakerDiarization.TV Etape.SpeakerDiarization.TV \n```\nThis is the expected output:\n\n```\n0         95.720% 36.603%\n0.0526316 95.526% 49.018%\n0.105263  95.213% 57.660%\n...\n0.526316  92.396% 83.756%\n...\n0.894737  88.155% 91.139%\n0.947368  87.468% 92.046%\n1         86.929% 92.672%\n\n```\nThe first column is threshold, the second column is purity and the third column is coverage. \n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyinruiqing%2Fchange_detection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyinruiqing%2Fchange_detection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyinruiqing%2Fchange_detection/lists"}