{"id":18513838,"url":"https://github.com/timjjting/ptt-sounds-docker-backend","last_synced_at":"2025-05-14T12:35:22.271Z","repository":{"id":257951836,"uuid":"165413387","full_name":"TimJJTing/ptt-sounds-docker-backend","owner":"TimJJTing","description":"The backend for the project PTT Sounds","archived":false,"fork":false,"pushed_at":"2019-01-12T17:11:39.000Z","size":6222,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-17T03:34:29.960Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TimJJTing.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-01-12T17:04:42.000Z","updated_at":"2019-01-12T17:11:42.000Z","dependencies_parsed_at":"2024-10-17T04:24:21.055Z","dependency_job_id":"d0c8a67f-07c1-4c1c-90df-05531654369b","html_url":"https://github.com/TimJJTing/ptt-sounds-docker-backend","commit_stats":null,"previous_names":["timjjting/ptt-sounds-docker-backend"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimJJTing%2Fptt-sounds-docker-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimJJTing%2Fptt-sounds-docker-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimJJTing%2Fptt-sounds-docker-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimJJTing%2Fptt-sounds-docker-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TimJJTing","download_url":"https://codeload.github.com/TimJJTing/ptt-sounds-docker-backend/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254142729,"owners_count":22021590,"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-06T15:40:51.886Z","updated_at":"2025-05-14T12:35:22.246Z","avatar_url":"https://github.com/TimJJTing.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sounds of PTT (Backend)\n\nSounds of PTT is a web application that can turn an article on PTT into audible frequencies. This is the backend part of the project. For the frontend, please refer [https://github.com/TimJJTing/ptt-sounds](https://github.com/TimJJTing/ptt-sounds).\n\n## Idea\n\n[PTT](https://www.ptt.cc/bbs/index.html) is the most popular BBS in Taiwan, where one can find the public’s opinion for almost any given topic. With public’s opinion structuralized in a series of short comments and “push/boo” tags, one can read through the discussion thread to catch the public’s sentiment orientations of a topic.\n\nHowever, reading is not the only way we sense this universe. Just like the [inspiring project](https://www.nasa.gov/feature/goddard/2018/sounds-of-the-sun) by NASA, what if we could actually “hear” public's sentiment orientations? Does it feel different from reading? Can we compose meaningful sounds from public's opinions? Will a positive rated article sounds better than a negative rated article? If the author and commenters of an article start a band, how will their music sound like? This web application is designed to answer these questions.\n\n## How It Works in General\nA User first enters a PTT article URL in the \\[Frontend\\]. When the \\[Backend API\\] receives a valid PTT article URL, it dispatches a \\[Crawler\\], which crawls and re-structuralizes article contents for the \\[Sound Maker\\]. The \\[Sound Maker\\] then can process structuralized data with 3 steps, tokenization, quantization (based on sentiment polarity of words), and finally sonification. After the procedure is done, a media file will be generated and therefore can be referenced via the \\[Frontend\\].\n\n## Technology Used\n### [Frontend](https://github.com/TimJJTing/ptt-sounds)\n- Vue.js\n- Vue router\n- Bootstrap\n\n### Backend\n#### Hosting/Environment\n- Google Cloud Compute Engine\n- Docker-Compose\n\n#### Web Server\n- Nginx\n\n#### API\n- Django\n- Django rest framework\n- Celery\n\n#### Crawler\n- Scrapy/Scrapinghub\n\n#### Sound Maker\n##### Tokenization\n- pandas\n- jseg/jieba\n##### Quantization\n- numpy\n- ANTUSD\n##### Sonification\n- thinkdsp (with some customized code)\n\n#### Database\n- Postgresql\n\n#### Messaging/Cache Backend\n- Redis\n\n## TODOs\n### High Priority\n- \\[General\\] Finish the README.md\n- \\[Frontend\\] Redesign component hierarchy\n- \\[Backend-API\\] Reduce restart loading time\n- \\[Backend-API\\] Deal with warning messages\n### Medium Priority\n- \\[Backend-DB\\] Migrate from container to Cloud SQL instance\n- \\[Backend-API\\] Serve backend static and media files with Cloud Storage buckets\n### Low Priority\n- \\[Backend-Hosting\\] Migrate from Nginx to Google's load balancer service\n### Might Be A Good Idea To Do\n- \\[Frontend\\] An interface that controls ADSR via the ADSR API to change the timbre of sounds\n- \\[Frontend\\] Timbre customization interfaces\n- \\[Frontend\\] Real-time Audio-visual feature with p5.js or d3.js\n## Credits\n### Inspiration and Acknowledgements\n- [Sounds of the Sun](https://www.nasa.gov/feature/goddard/2018/sounds-of-the-sun)\n- [Prof. Feng-Yang Kuo](https://www.mis.nsysu.edu.tw/~bkuo/)\n- [Yen-tzu Chang](http://www.changyentzu.com/)\n### Resources\n- [Allen B. Downey](https://github.com/AllenDowney/ThinkDSP): The author of Think DSP, an awesome book for learning digital signal processing.\n- [NLPSA](http://academiasinicanlplab.github.io/): Where I acquire ANTUSD for this project.\n- [Jseg](https://github.com/amigcamel/Jseg): A better choice for Chinese tokenization in this project.\n### References\n- [Dockerizing a Full-stack Application](https://medium.com/@matthew.rosendin/dockerizing-a-full-stack-application-89a7d69e11e9)\n- [nginx配置location总结及rewrite规则写法](http://seanlook.com/2015/05/17/nginx-location-rewrite/)\n- [Voltage-Controlled Oscillator (VCO)](http://synthesizeracademy.com/voltage-controlled-oscillator-vco/)\n- [Setup caching in Django With Redis](https://boostlog.io/@nixus89896/setup-caching-in-django-with-redis-5abb7d060814730093a2eebe)\n- [Wave Generation in Python](http://blog.acipo.com/wave-generation-in-python/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimjjting%2Fptt-sounds-docker-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimjjting%2Fptt-sounds-docker-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimjjting%2Fptt-sounds-docker-backend/lists"}