> For the complete documentation index, see [llms.txt](https://guide.petoi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.petoi.com/biboard/demo-applications/14.play-mp3.md).

# 14.Play MP3

There is a demo named **testMP3** in the "OpenCatEsp32/ModuleTests" file directory. The main function of this demo is to play .mp3 files stored in the SPIFFS file system. Users can choose to play different .mp3 files by entering 0\~6 numbers (the .mp3 file index) in the serial monitor.

Before compiling the demo, please [download, install, and configure the software environment](https://guide.petoi.com/biboard/demo-applications/pages/8ajuxMEplUPiNYi4SRyi#id-2.-set-up-biboard) ([Arduino IDE 1.8.19](https://www.arduino.cc/en/software)*, development board esp32 **2.0.12***, library [ESP8266Audio 1.9.7](https://www.arduino.cc/reference/en/libraries/esp8266audio/), partition configuration [BiBoard V0](/biboard/demo-applications/13.add-hardware-partition-configuration-option-in-arduino-ide.md) or [BiBoard V1](https://guide.petoi.com/biboard/demo-applications/pages/8ajuxMEplUPiNYi4SRyi#id-2.4-choose-hardware-partition)).

After compiling, use the latest SPIFFS file upload plugin to upload the .mp3 file to the SPIFFS file system partition of BiBoard. For details, please refer to the chapter [File System SPIFFS](https://docs.petoi.com/biboard/demo-applications/12.file-system-spiffs).

{% hint style="info" %}
Note:

* The [SPIFFS file upload plugin](https://github.com/me-no-dev/arduino-esp32fs-plugin/releases/tag/1.0) in Arduino IDE 1.8.\* is written in Java. And Arduino IDE 2.0 is written in a different language (TypeScript + Golang), so the previous upload plugin cannot be used in Arduino IDE 2.0. There is currently no support for the Arduino IDE 2.0 SPIFFS file upload plugin.

So it is recommended that you temporarily install and use the [Arduino IDE 1.8.\* IDE](https://www.arduino.cc/en/software) to upload sketch and .mp3 file.

Of course, you can also use VS Code + PlatformIO to upload the sketch and .mp3 files. For details, please refer to the following documents:

[Getting Started with VS Code and PlatformIO IDE for ESP32 and ESP8266 (Windows, Mac OS X, Linux Ubuntu)](https://randomnerdtutorials.com/vs-code-platformio-ide-esp32-esp8266-arduino/#2)

[ESP32 with VS Code and PlatformIO: Upload Files to Filesystem (SPIFFS)](https://randomnerdtutorials.com/esp32-vs-code-platformio-spiffs/)

Before uploading the sketch and .mp3 files, please move the "data" folder to the project root directory, store the code files in the "src" directory, and configure the partition option "board\_build.partitions" in the **platformio.ini** in the project root directory, as shown in the following figure:

![](/files/xqqVHzSvwvayS9MEexKg)
{% endhint %}

## For the BiBoard V1

On the BiBoard V1 mainboard, the two pins associated with the DAC function are already utilized by the voice module; therefore, to enable MP3 playback, a hardware modification is required (soldering a jumper wire to connect ESP32's pin **25** to the input pin of the power amplifier chip), as shown in the figure below:

<figure><img src="/files/G0Qn0ulxJtRz4sxcPCd7" alt=""><figcaption></figcaption></figure>

After performing the hardware modification, if you upload the original OpencatEsp32.ino's firmware: when using the voice command to control the robot, the voice module can't provide a voice response, but the robot can perform the action response.\
If you restore the original hardware configuration (remove the jumper wire from the mainboard pins). The voice module can work normally.\
We have fully verified the functionality, so please feel free to modify the hardware settings; however, exercise caution when soldering jumper wires to ensure they connect to the correct pins.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://guide.petoi.com/biboard/demo-applications/14.play-mp3.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
