user71884: I am in the process of making a talking robot and I have linked my ESP32 to a Google text-to-speech service. The service returns me a base64 8-bit audio response.
I need to play this audio and I can't figure out how to do it. I know that an audio playing library exist for PCM but the data that it requires is not base64.

user4143: Base64 has nothing to do with audio. It is merely a way of encapsulating binary data into ASCII text so that it can safely be included in text-based structures like JSON, or transmitted over a text-based communication channel.
There is no library to "play" base64 simply because base64 is not something you play.
First you decode the base64 text into raw 8-bit binary. It's then that data that you play through whatever library is most suitable for your hardware.
For example on the ESP32 you have the function base64_decode() available. You can read up on how to use it in this tutorial.

71884: <p>I am in the process of making a talking robot and I have linked my ESP32 to a Google text-to-speech service. The service returns me a base64 8-bit audio response.</p>
<p>I need to play this audio and I can't figure out how to do it. I know that an audio playing library exist for PCM but the data that it requires is not base64.</p>
 4143: <p>Base64 has nothing to do with audio. It is merely a way of encapsulating binary data into ASCII text so that it can safely be included in text-based structures like JSON, or transmitted over a text-based communication channel.</p>
<p>There is no library to &quot;play&quot; base64 simply because base64 is not something you play.</p>
<p>First you decode the base64 text into raw 8-bit binary. It's then <em>that</em> data that you play through whatever library is most suitable for your hardware.</p>
<p>For example on the ESP32 you have the function <code>base64_decode()</code> available. You can read up on how to use it in <a href="https://techtutorialsx.com/2018/11/27/esp32-arduino-base64-decoding/" rel="nofollow noreferrer">this tutorial</a>.</p>
