{"id":4688,"date":"2022-04-28T09:41:43","date_gmt":"2022-04-28T07:41:43","guid":{"rendered":"https:\/\/www.pschatzmann.ch\/home\/?p=4688"},"modified":"2023-04-28T16:44:20","modified_gmt":"2023-04-28T14:44:20","slug":"arduino-low-latency-streaming-of-audio-data-codecs","status":"publish","type":"post","link":"https:\/\/www.pschatzmann.ch\/home\/2022\/04\/28\/arduino-low-latency-streaming-of-audio-data-codecs\/","title":{"rendered":"Arduino Low Latency Streaming of Audio Data  &#8211; Codecs"},"content":{"rendered":"<p>As we have seen in my <a href=\"https:\/\/www.pschatzmann.ch\/home\/2022\/04\/27\/low-latency-streaming-of-audio-data-using-esp-now\/\">last blog<\/a>, we will need to use a codec to send and receive the audio data with some proper sampling rate: CD quality e.g. is using 44100.<\/p>\n<p>I started to <strong>collect some promising low-complexity codecs<\/strong> and converted them to Arduino libraries:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/pschatzmann\/arduino-libsbc\">sbc<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/pschatzmann\/arduino-liblc3\">lc3<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/pschatzmann\/arduino-libopenaptx\">aptx<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/pschatzmann\/arduino-libg722\">g7.22<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/pschatzmann\/arduino-libgsm\">gsm<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/pschatzmann\/arduino-codec2\">codec2<\/a><\/li>\n<\/ul>\n<p>As a the next step I will need to provide some nice integration into my <a href=\"https:\/\/github.com\/pschatzmann\/arduino-audio-tools\">Arduino Audio Tools<\/a>.<\/p>\n<h2>Arduino Sketches<\/h2>\n<p>Detailed Information on <a href=\"https:\/\/github.com\/pschatzmann\/arduino-audio-tools\/wiki\/Encoding-and-Decoding-of-Audio\">how to use the codecs can be found in the wiki<\/a>. Examples using e.g the aptx codec will look as follows:<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/pschatzmann\/arduino-audio-tools\/blob\/main\/examples\/examples-communication\/communication-codec-espnow-send\/communication-codec-espnow-send.ino\">communication-codec-espnow-send<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/pschatzmann\/arduino-audio-tools\/blob\/main\/examples\/examples-communication\/communication-codec-espnow-receive_measure\/communication-codec-espnow-receive_measure.ino\">communication-codec-espnow-receive_measure<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/pschatzmann\/arduino-audio-tools\/blob\/main\/examples\/examples-communication\/communication-codec-espnow-receive\/communication-codec-espnow-receive.ino\">communication-codec-espnow-receive<\/a><\/li>\n<\/ul>\n<p>Running the <em>communication-codec-espnow-receive_measure<\/em> sketch shows that we can generate a signal and process it with around 132000 bytes per second_ using a SBC decoder. This is not sufficient for a sampling rate of 44100, but we can use <strong>32000<\/strong>!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As we have seen in my last blog, we will need to use a codec to send and receive the audio data with some proper sampling rate: CD quality e.g. is using 44100. I started to collect some promising low-complexity codecs and converted them to Arduino libraries: sbc lc3 aptx [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4622,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[20,22],"tags":[38],"class_list":["post-4688","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino","category-machine-sound","tag-codecs"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Arduino Low Latency Streaming of Audio Data - Codecs - Phil Schatzmann<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pschatzmann.ch\/home\/2022\/04\/28\/arduino-low-latency-streaming-of-audio-data-codecs\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Arduino Low Latency Streaming of Audio Data - Codecs - Phil Schatzmann\" \/>\n<meta property=\"og:description\" content=\"As we have seen in my last blog, we will need to use a codec to send and receive the audio data with some proper sampling rate: CD quality e.g. is using 44100. I started to collect some promising low-complexity codecs and converted them to Arduino libraries: sbc lc3 aptx [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pschatzmann.ch\/home\/2022\/04\/28\/arduino-low-latency-streaming-of-audio-data-codecs\/\" \/>\n<meta property=\"og:site_name\" content=\"Phil Schatzmann\" \/>\n<meta property=\"article:published_time\" content=\"2022-04-28T07:41:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-04-28T14:44:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/04\/transmitting.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"800\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"pschatzmann\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"pschatzmann\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2022\\\/04\\\/28\\\/arduino-low-latency-streaming-of-audio-data-codecs\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2022\\\/04\\\/28\\\/arduino-low-latency-streaming-of-audio-data-codecs\\\/\"},\"author\":{\"name\":\"pschatzmann\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"headline\":\"Arduino Low Latency Streaming of Audio Data &#8211; Codecs\",\"datePublished\":\"2022-04-28T07:41:43+00:00\",\"dateModified\":\"2023-04-28T14:44:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2022\\\/04\\\/28\\\/arduino-low-latency-streaming-of-audio-data-codecs\\\/\"},\"wordCount\":148,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2022\\\/04\\\/28\\\/arduino-low-latency-streaming-of-audio-data-codecs\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/transmitting.jpg\",\"keywords\":[\"Codecs\"],\"articleSection\":[\"Arduino\",\"Machine Sound\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2022\\\/04\\\/28\\\/arduino-low-latency-streaming-of-audio-data-codecs\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2022\\\/04\\\/28\\\/arduino-low-latency-streaming-of-audio-data-codecs\\\/\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2022\\\/04\\\/28\\\/arduino-low-latency-streaming-of-audio-data-codecs\\\/\",\"name\":\"Arduino Low Latency Streaming of Audio Data - Codecs - Phil Schatzmann\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2022\\\/04\\\/28\\\/arduino-low-latency-streaming-of-audio-data-codecs\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2022\\\/04\\\/28\\\/arduino-low-latency-streaming-of-audio-data-codecs\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/transmitting.jpg\",\"datePublished\":\"2022-04-28T07:41:43+00:00\",\"dateModified\":\"2023-04-28T14:44:20+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2022\\\/04\\\/28\\\/arduino-low-latency-streaming-of-audio-data-codecs\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2022\\\/04\\\/28\\\/arduino-low-latency-streaming-of-audio-data-codecs\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2022\\\/04\\\/28\\\/arduino-low-latency-streaming-of-audio-data-codecs\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/transmitting.jpg\",\"contentUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/04\\\/transmitting.jpg\",\"width\":800,\"height\":800},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/2022\\\/04\\\/28\\\/arduino-low-latency-streaming-of-audio-data-codecs\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Arduino Low Latency Streaming of Audio Data &#8211; Codecs\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#website\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/\",\"name\":\"Phil Schatzmann Consulting\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/home\\\/#\\\/schema\\\/person\\\/73a53638a4e34e8373405fd737dac9b1\",\"name\":\"pschatzmann\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\",\"url\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\",\"contentUrl\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\",\"width\":305,\"height\":305,\"caption\":\"pschatzmann\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.pschatzmann.ch\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/pschatzmann.png\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Arduino Low Latency Streaming of Audio Data - Codecs - Phil Schatzmann","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pschatzmann.ch\/home\/2022\/04\/28\/arduino-low-latency-streaming-of-audio-data-codecs\/","og_locale":"en_US","og_type":"article","og_title":"Arduino Low Latency Streaming of Audio Data - Codecs - Phil Schatzmann","og_description":"As we have seen in my last blog, we will need to use a codec to send and receive the audio data with some proper sampling rate: CD quality e.g. is using 44100. I started to collect some promising low-complexity codecs and converted them to Arduino libraries: sbc lc3 aptx [&hellip;]","og_url":"https:\/\/www.pschatzmann.ch\/home\/2022\/04\/28\/arduino-low-latency-streaming-of-audio-data-codecs\/","og_site_name":"Phil Schatzmann","article_published_time":"2022-04-28T07:41:43+00:00","article_modified_time":"2023-04-28T14:44:20+00:00","og_image":[{"width":800,"height":800,"url":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/04\/transmitting.jpg","type":"image\/jpeg"}],"author":"pschatzmann","twitter_card":"summary_large_image","twitter_misc":{"Written by":"pschatzmann","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pschatzmann.ch\/home\/2022\/04\/28\/arduino-low-latency-streaming-of-audio-data-codecs\/#article","isPartOf":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2022\/04\/28\/arduino-low-latency-streaming-of-audio-data-codecs\/"},"author":{"name":"pschatzmann","@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"headline":"Arduino Low Latency Streaming of Audio Data &#8211; Codecs","datePublished":"2022-04-28T07:41:43+00:00","dateModified":"2023-04-28T14:44:20+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2022\/04\/28\/arduino-low-latency-streaming-of-audio-data-codecs\/"},"wordCount":148,"commentCount":0,"publisher":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"image":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2022\/04\/28\/arduino-low-latency-streaming-of-audio-data-codecs\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/04\/transmitting.jpg","keywords":["Codecs"],"articleSection":["Arduino","Machine Sound"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pschatzmann.ch\/home\/2022\/04\/28\/arduino-low-latency-streaming-of-audio-data-codecs\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pschatzmann.ch\/home\/2022\/04\/28\/arduino-low-latency-streaming-of-audio-data-codecs\/","url":"https:\/\/www.pschatzmann.ch\/home\/2022\/04\/28\/arduino-low-latency-streaming-of-audio-data-codecs\/","name":"Arduino Low Latency Streaming of Audio Data - Codecs - Phil Schatzmann","isPartOf":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2022\/04\/28\/arduino-low-latency-streaming-of-audio-data-codecs\/#primaryimage"},"image":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2022\/04\/28\/arduino-low-latency-streaming-of-audio-data-codecs\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/04\/transmitting.jpg","datePublished":"2022-04-28T07:41:43+00:00","dateModified":"2023-04-28T14:44:20+00:00","breadcrumb":{"@id":"https:\/\/www.pschatzmann.ch\/home\/2022\/04\/28\/arduino-low-latency-streaming-of-audio-data-codecs\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pschatzmann.ch\/home\/2022\/04\/28\/arduino-low-latency-streaming-of-audio-data-codecs\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pschatzmann.ch\/home\/2022\/04\/28\/arduino-low-latency-streaming-of-audio-data-codecs\/#primaryimage","url":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/04\/transmitting.jpg","contentUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/04\/transmitting.jpg","width":800,"height":800},{"@type":"BreadcrumbList","@id":"https:\/\/www.pschatzmann.ch\/home\/2022\/04\/28\/arduino-low-latency-streaming-of-audio-data-codecs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pschatzmann.ch\/home\/"},{"@type":"ListItem","position":2,"name":"Arduino Low Latency Streaming of Audio Data &#8211; Codecs"}]},{"@type":"WebSite","@id":"https:\/\/www.pschatzmann.ch\/home\/#website","url":"https:\/\/www.pschatzmann.ch\/home\/","name":"Phil Schatzmann Consulting","description":"","publisher":{"@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pschatzmann.ch\/home\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.pschatzmann.ch\/home\/#\/schema\/person\/73a53638a4e34e8373405fd737dac9b1","name":"pschatzmann","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png","url":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png","contentUrl":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png","width":305,"height":305,"caption":"pschatzmann"},"logo":{"@id":"https:\/\/www.pschatzmann.ch\/wp-content\/uploads\/2022\/08\/pschatzmann.png"}}]}},"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/4688","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/comments?post=4688"}],"version-history":[{"count":20,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/4688\/revisions"}],"predecessor-version":[{"id":4789,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/posts\/4688\/revisions\/4789"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/media\/4622"}],"wp:attachment":[{"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/media?parent=4688"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/categories?post=4688"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pschatzmann.ch\/home\/wp-json\/wp\/v2\/tags?post=4688"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}