{"id":13591093,"url":"https://github.com/schreibfaul1/ESP32-vs1053_ext","last_synced_at":"2025-04-08T14:32:27.498Z","repository":{"id":41361318,"uuid":"106873261","full_name":"schreibfaul1/ESP32-vs1053_ext","owner":"schreibfaul1","description":"With this library You can easily build a WebRadio with a ESP32 board and a mp3-module.  See: https://www.youtube.com/watch?v=u4u9NvZvWRk","archived":true,"fork":false,"pushed_at":"2023-10-23T11:22:14.000Z","size":2332,"stargazers_count":107,"open_issues_count":22,"forks_count":29,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-11-06T11:45:29.641Z","etag":null,"topics":["arduino","esp32","vs1053","webradio"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/schreibfaul1.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-10-13T21:04:52.000Z","updated_at":"2024-11-06T03:46:38.000Z","dependencies_parsed_at":"2023-10-20T15:48:50.803Z","dependency_job_id":"3acbeb56-cf33-4fcf-9ff0-391d76ca9428","html_url":"https://github.com/schreibfaul1/ESP32-vs1053_ext","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/schreibfaul1%2FESP32-vs1053_ext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schreibfaul1%2FESP32-vs1053_ext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schreibfaul1%2FESP32-vs1053_ext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schreibfaul1%2FESP32-vs1053_ext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schreibfaul1","download_url":"https://codeload.github.com/schreibfaul1/ESP32-vs1053_ext/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247860955,"owners_count":21008394,"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":["arduino","esp32","vs1053","webradio"],"created_at":"2024-08-01T16:00:53.558Z","updated_at":"2025-04-08T14:32:27.160Z","avatar_url":"https://github.com/schreibfaul1.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"# ESP32 vs1053_ext\nWith this library You can easily build a MiniWebRadio in Adruino or Eclipse SDK.\nI have found the Originalcode by EdZelf ESP32 Webradio.\nThe code is extended with a WiFi-client. This library can play many radiostations up to 320kb/s.\nChunked data transfer is supported. Playlists can be m3u, pls or asx, dataformat can be mp3, wma, aac, or ogg,\nasx playlists must contains only audio but no additional videodata.\nAlso it can play mp3-files from SD Card and from text using Google Translate Service (thanks to horihiro, included esp8266-google-tts library)\u003cbr\u003e\nThe class provides optional events:\u003cbr\u003e\nvs1053_showstreaminfo \u0026nbsp;\u0026nbsp;\u0026nbsp; shows th connexted URL\u003cbr\u003e\nvs1053_showstreamtitle \u0026nbsp;\u0026nbsp;\u0026nbsp; the played title\u003cbr\u003e\nvs1053_showstation \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; the name of the connected station\u003cbr\u003e\nvs1053_info \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; additional information for debugging\u003cbr\u003e\nvs1053_bitrate \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; this is the bitrate of the set station\u003cbr\u003e\nvs1053_eof_mp3 \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; mp3 player reaches the end of file\u003cbr\u003e\nvs1053_eof_stream  \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; end of web file\u003cbr\u003e\nvs1053_commercial  \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; is there a commercial at the begin, show the duration in seconds\u003cbr\u003e\nvs1053_icyurl \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; if the station have a homepage, show the URL\u003cbr\u003e\nvs1053_lasthost \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; contains the really connected URL (originally may be changed by redirection)\n\n``` c++\n#include \"Arduino.h\"\n#include \u003cSPI.h\u003e\n#include \u003cWiFi.h\u003e\n#include \"vs1053_ext.h\"\n\n// Digital I/O used\n#define VS1053_CS      2\n#define VS1053_DCS     4\n#define VS1053_DREQ   36\n\n#define VS1053_MOSI   23\n#define VS1053_MISO   19\n#define VS1053_SCK    18\n\nString ssid =     \"Wolles-POWERLINE\";\nString password = \"xxxx\";\n\nint volume=15;\n\nVS1053 mp3(VS1053_CS, VS1053_DCS, VS1053_DREQ, VSPI, VS1053_MOSI, VS1053_MISO, VS1053_SCK);\n\n//The setup function is called once at startup of the sketch\nvoid setup() {\n\n    Serial.begin(115200);\n    SPI.begin();\n    //SD.begin();\n    WiFi.disconnect();\n    WiFi.mode(WIFI_STA);\n    WiFi.begin(ssid.c_str(), password.c_str());\n    while (WiFi.status() != WL_CONNECTED) delay(1500);\n    mp3.begin();\n    //  mp3.loadUserCode(); // FLAC plugin\n    mp3.setVolume(volume);\n    mp3.connecttohost(\"streambbr.ir-media-tec.com/berlin/mp3-128/vtuner_web_mp3/\");\n    //mp3.connecttohost(\"stream.landeswelle.de/lwt/mp3-192\");                 // mp3 192kb/s\n    //mp3.connecttohost(\"http://radio.hear.fi:8000/hear.ogg\");                // ogg\n    //mp3.connecttohost(\"tophits.radiomonster.fm/320.mp3\");                   // bitrate 320k\n    //mp3.connecttohost(\"http://star.jointil.net/proxy/jrn_beat?mp=/stream\"); // chunked data transfer\n    //mp3.connecttohost(\"http://stream.srg-ssr.ch/rsp/aacp_48.asx\");          // asx\n    //mp3.connecttohost(\"www.surfmusic.de/m3u/100-5-das-hitradio,4529.m3u\");  // m3u\n    //mp3.connecttohost(\"https://raw.githubusercontent.com/schreibfaul1/ESP32-audioI2S/master/additional_info/Testfiles/Pink-Panther.wav\"); // webfile\n    //mp3.connecttohost(\"http://stream.revma.ihrhls.com/zc5060/hls.m3u8\");    // HLS\n    //mp3.connecttohost(\"https://live-cdn.sr.se/pool2/p2musik/p2musik.isml/p2musik-audio=192000.m3u8\"); // HLS transport stream\n    //mp3.connecttoFS(SD, \"320k_test.mp3\"); // SD card, local file\n    //mp3.connecttospeech(\"Wenn die Hunde schlafen, kann der Wolf gut Schafe stehlen.\", \"de\");\n}\n\n// The loop function is called in an endless loop\nvoid loop()\n{\n    mp3.loop();\n}\n\n// next code is optional:\nvoid vs1053_info(const char *info) {                // called from vs1053\n    Serial.print(\"DEBUG:        \");\n    Serial.println(info);                           // debug infos\n}\nvoid vs1053_showstation(const char *info){          // called from vs1053\n    Serial.print(\"STATION:      \");\n    Serial.println(info);                           // Show station name\n}\nvoid vs1053_showstreamtitle(const char *info){      // called from vs1053\n    Serial.print(\"STREAMTITLE:  \");\n    Serial.println(info);                           // Show title\n}\nvoid vs1053_showstreaminfo(const char *info){       // called from vs1053\n    Serial.print(\"STREAMINFO:   \");\n    Serial.println(info);                           // Show streaminfo\n}\nvoid vs1053_eof_mp3(const char *info){              // called from vs1053\n    Serial.print(\"vs1053_eof:   \");\n    Serial.print(info);                             // end of mp3 file (filename)\n}\nvoid vs1053_bitrate(const char *br){                // called from vs1053\n    Serial.print(\"BITRATE:      \");\n    Serial.println(String(br)+\"kBit/s\");            // bitrate of current stream\n}\nvoid vs1053_commercial(const char *info){           // called from vs1053\n    Serial.print(\"ADVERTISING:  \");\n    Serial.println(String(info)+\"sec\");             // info is the duration of advertising\n}\nvoid vs1053_icyurl(const char *info){               // called from vs1053\n    Serial.print(\"Homepage:     \");\n    Serial.println(info);                           // info contains the URL\n}\nvoid vs1053_eof_speech(const char *info){           // called from vs1053\n    Serial.print(\"end of speech:\");\n    Serial.println(info);\n}\nvoid vs1053_lasthost(const char *info){             // really connected URL\n    Serial.print(\"lastURL:      \");\n    Serial.println(info);\n}\n\n```\nBreadboard\n![Breadboard](https://github.com/schreibfaul1/ESP32-vs1053_ext/blob/master/additional%20info/Breadboard.jpg)\n\nESP32 developerboard connections\n![Connections](https://github.com/schreibfaul1/ESP32-vs1053_ext/blob/master/additional%20info/ESP32_dev_board.jpg)\n\nTested with this mp3 module\n![mp3 module](https://github.com/schreibfaul1/ESP32-vs1053_ext/blob/master/additional%20info/MP3_Board.gif)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschreibfaul1%2FESP32-vs1053_ext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschreibfaul1%2FESP32-vs1053_ext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschreibfaul1%2FESP32-vs1053_ext/lists"}