{"id":19728825,"url":"https://github.com/swharden/numberspeaker","last_synced_at":"2025-04-30T01:31:27.526Z","repository":{"id":189263353,"uuid":"680359856","full_name":"swharden/NumberSpeaker","owner":"swharden","description":"Arduino library for reading numbers using a speaker","archived":false,"fork":false,"pushed_at":"2023-09-17T22:18:29.000Z","size":652,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-05-29T17:16:39.228Z","etag":null,"topics":["accessibility","arduino","audio","speaker","voice"],"latest_commit_sha":null,"homepage":"https://swharden.com/blog/2023-08-19-speaking-microcontroller/","language":"C","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/swharden.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}},"created_at":"2023-08-19T02:08:23.000Z","updated_at":"2024-02-27T21:08:54.000Z","dependencies_parsed_at":"2023-08-19T03:26:35.242Z","dependency_job_id":null,"html_url":"https://github.com/swharden/NumberSpeaker","commit_stats":null,"previous_names":["swharden/numberspeaker"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swharden%2FNumberSpeaker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swharden%2FNumberSpeaker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swharden%2FNumberSpeaker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swharden%2FNumberSpeaker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swharden","download_url":"https://codeload.github.com/swharden/NumberSpeaker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224193127,"owners_count":17271238,"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":["accessibility","arduino","audio","speaker","voice"],"created_at":"2024-11-12T00:08:01.849Z","updated_at":"2024-11-12T00:08:02.317Z","avatar_url":"https://github.com/swharden.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NumberSpeaker\n\n[![CI](https://github.com/swharden/NumberSpeaker/actions/workflows/arduino.yaml/badge.svg)](https://github.com/swharden/NumberSpeaker/actions/workflows/arduino.yaml)\n\n**NumberSpeaker is an Arduino library for reading numbers using a speaker.** A human voice from WAV files is encoded into bytes which are stored in program memory and played back using PWM to drive a speaker. The audio waveforms are stored in memory and occupy about half of the Arduino's program space.\n\n**Example (Video):** https://swharden.com/static/2023/08/19/numbers.webm\n\n![](dev/arduino-speaker.jpg)\n\n## Quickstart\n* Connect a speaker to `pin 11`\n* Open the Arduino IDE and create a new sketch\n* Press `CTRL+SHIFT+i` to open the library manager\n* Search for `NumberSpeaker` and select `Install`\n* Paste the following into your sketch\n\n```cpp\n#include \u003cNumberSpeaker.h\u003e\n\nNumberSpeaker numberSpeaker = NumberSpeaker();\n\nvoid setup() {\n  numberSpeaker.begin(); // connect a speaker to pin 11\n}\n\nvoid loop() {\n\n  numberSpeaker.speak_int(1234567);\n  delay(500);\n\n  numberSpeaker.speak_float(123.4567);\n  delay(500);\n\n  numberSpeaker.speak_string(\"69.420.42\");\n  delay(500);\n\n  numberSpeaker.speak_char('6');\n  numberSpeaker.speak_char('.');\n  numberSpeaker.speak_char('9');\n  delay(500);\n\n  for (;;) {}\n}\n```\n\n## Additional Resources\n\n* [Speaking Numbers with a Microcontroller](https://swharden.com/blog/2023-08-19-speaking-microcontroller/) - A blog post describing the strategy used to encode audio files, store them in program memory, and play them back using a speaker.\n\n* [Play Audio from SPI Flash with a Microcontroller](https://swharden.com/blog/2023-08-26-spi-flash-audio/) - A blog post describing how to use a microcontroller to drive a speaker using PWM from audio levels stored in a SPI flash chip. This strategy is useful for users who wish to play longer audio clips or use less program memory.\n\n* [Talkie](https://www.arduino.cc/reference/en/libraries/talkie/) is an official Arduino speech synthesis library. It is a software implementation of the [Texas Instruments speech synthesis architecture](https://en.wikipedia.org/wiki/Texas_Instruments_LPC_Speech_Chips) from the late 1970s. I found the voice to be poor quality for reading numbers, but it may be useful to users seeking more complex phrases or who are concerned about demands on program memory.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswharden%2Fnumberspeaker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswharden%2Fnumberspeaker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswharden%2Fnumberspeaker/lists"}