# ESP-GMF Best Practices

[中文]

This chapter combines the example projects in `gmf_examples` to introduce the development workflow, typical usage, and advanced techniques for ESP-GMF in real projects, helping developers become familiar with GMF and integrate its functionality into product solutions.

gmf_examples is the officially maintained collection of GMF examples. The current basic examples are located in `gmf_examples/basic_examples`, demonstrating fundamental usage such as pipeline construction, playback, recording, muxer container recording, audio effects, looping, multi-source switching, and HTTP download. All examples can be created directly via the ESP-IDF Component Manager:

    idf.py create-project-from-example "espressif/gmf_examples=<version>:<example_name>"

For example, to create a project based on `pipeline_play_embed_music`:

    idf.py create-project-from-example "espressif/gmf_examples=0.8.0:pipeline_play_embed_music"

Basic feature examples include:

- pipeline_play_embed_music: Play audio embedded in Flash

- pipeline_play_sdcard_music: Play SD card music

- pipeline_play_http_music: Play HTTP/network music

- pipeline_record_sdcard: Record and encode audio to SD card

- pipeline_record_audio_muxer: Encode audio and mux into container formats, save to SD card

- pipeline_record_http: Record from microphone, encode and upload to HTTP server

- pipeline_audio_effects: Play audio with various effects and mixing

- pipeline_howl: Decode backing track from SD card, apply howling suppression (`aud_howl`) on the mic path, mix and play to speaker

- pipeline_loop_play_no_gap: Seamless loop playback of multiple files

- pipeline_play_multi_source_music: Multi-source audio player supporting playback from HTTP, SD card, and Flash

- pipeline_http_download_to_sdcard: Download HTTP file and write to SD card with overall speed optimization

For component examples, see the `test_apps/` or `examples/` folder in each component directory, for example `packages/esp_capture/examples`.

For more complete application examples, see ESP-ADF examples. The ESP-ADF examples cover a broader range of audio application scenarios and can serve as a reference for ESP-GMF component composition and productization workflows.

Was this page helpful?

- Thank you! We received your feedback.
- If you have any comments, fill in Espressif Documentation Feedback Form.

- We value your feedback.
- Let us know how we can improve this page by filling in Espressif Documentation Feedback Form.