General

DF2301Q speak its Learned Command or other words as playback device

userHead Steve.Parus 2026-07-31 02:09:46 33 Views1 Replies

Is there a way to have the DF2301Q speak its learned command or other words using playByCMDID or some other method? Have it basically perform as a simple playback device ?

 

However, the response from a DF2301Q playByCMDID to a Learned Command varies among ‘ok’, ‘done’, ‘doing it’ and ‘ok got it’ with no pattern that I can see. The response to playByCMDID for the same Learned Command seems to change randomly. I would want to avoid those appended words. 

 

The response from the DF2301Q device itself to a spoken learned command also varies among those randomly.

setMuteMode(1); can be used to mute those responses but am curious about the variation in responses.

 

 

 

2026-07-31 09:22:23

playByCMDID() plays whatever reply sound is baked in for that ID, not the thing you taught it. So it's always going to say ok/done/doing it instead of whatever word you trained.

Learned commands seem to just cycle through a handful of random ack sounds, I've noticed the same thing. The built-in ones are consistent but the ones you train yourself just pull from that same little pool of 4. Don't think there's a way to change it.

Short answer on the playback device thing: nope. The learn mode only teaches it to recognize the sound, it doesn't save the audio to play back later.

If you actually need it to say specific words, stack a DFPlayer on there. Get the ID off the DF2301Q and just trigger whatever file you want on the player side.

setMuteMode(1) is what I use to shut those random acks up. Full list of IDs is on the Getting Started page if you need it: https://wiki.dfrobot.com/sen0539-en/docs/21332

userHeadPic Jason.Miao