<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[[M5 Fire] Wave playing?]]></title><description><![CDATA[<p dir="auto">Hi all,</p>
<p dir="auto">I try to follow this tutorial to play wav file on M5stack Fire: <a href="https://m5stack.hackster.io/lukasmaximus89/m5stack-rfid-face-wav-playing-flashcard-program-526cb5" target="_blank" rel="noopener noreferrer nofollow ugc">https://m5stack.hackster.io/lukasmaximus89/m5stack-rfid-face-wav-playing-flashcard-program-526cb5</a></p>
<p dir="auto">But I have a little problem with the module wave. When i run my micropython code i have an error on the fire:</p>
<pre><code>no module named 'wave'
</code></pre>
<p dir="auto">Thanks for your help.</p>
]]></description><link>https://community.m5stack.com/topic/3314/m5-fire-wave-playing</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 09:37:34 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/3314.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 26 May 2021 10:10:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [M5 Fire] Wave playing? on Sun, 31 Oct 2021 22:56:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a> ok, I see. But thanks for your reply. I post in this forum if I can figure it out</p>
]]></description><link>https://community.m5stack.com/post/15322</link><guid isPermaLink="true">https://community.m5stack.com/post/15322</guid><dc:creator><![CDATA[Hermes]]></dc:creator><pubDate>Sun, 31 Oct 2021 22:56:30 GMT</pubDate></item><item><title><![CDATA[Reply to [M5 Fire] Wave playing? on Sat, 30 Oct 2021 15:02:50 GMT]]></title><description><![CDATA[<p dir="auto">I know the ESP32 supports I2S (audio) output but have no idea how so setup and use I2S.</p>
]]></description><link>https://community.m5stack.com/post/15306</link><guid isPermaLink="true">https://community.m5stack.com/post/15306</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sat, 30 Oct 2021 15:02:50 GMT</pubDate></item><item><title><![CDATA[Reply to [M5 Fire] Wave playing? on Sat, 30 Oct 2021 13:02:04 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a> thanks for your reply. Yeah, I figured out the same thing with the file path on the core2 and it plays wavs quite reliably through the speaker.... however, this speaker is quite low volume and in my setup it has to give voice commands to an ipad (in an art exhibition)... so I need to connect to an external speaker.</p>
<p dir="auto">Do you happen to know how I can route the wav-audio to the DAC (pin 25) on the core2?</p>
<p dir="auto">I tried with the wav player template by <a class="plugin-mentions-user plugin-mentions-a" href="/user/lukasmaximus" aria-label="Profile: lukasmaximus">@<bdi>lukasmaximus</bdi></a> or <a class="plugin-mentions-user plugin-mentions-a" href="/user/lukasmaximus89" aria-label="Profile: lukasmaximus89">@<bdi>lukasmaximus89</bdi></a> ... but the result is that the firmware of core2 doesn't seem to know the I2S modes...</p>
<p dir="auto">any suggestions what to do?</p>
]]></description><link>https://community.m5stack.com/post/15301</link><guid isPermaLink="true">https://community.m5stack.com/post/15301</guid><dc:creator><![CDATA[Hermes]]></dc:creator><pubDate>Sat, 30 Oct 2021 13:02:04 GMT</pubDate></item><item><title><![CDATA[Reply to [M5 Fire] Wave playing? on Sat, 30 Oct 2021 07:22:30 GMT]]></title><description><![CDATA[<p dir="auto">I have got a wave file to play on the core2 in UIFlow but I found a bug with one of the blocks.<br />
I just used the Play local file block which played a file stored in memory.</p>
<p dir="auto">If your trying from the SD card the documents say the path is sd/somefile.wav not /sd/somefile.wav (no preceding forward slash)<br />
however this assumes that somefile.wav is stored in the root of the SD card. also the wav file has to match certain file requirements that are a restriction of MicroPython.</p>
]]></description><link>https://community.m5stack.com/post/15296</link><guid isPermaLink="true">https://community.m5stack.com/post/15296</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Sat, 30 Oct 2021 07:22:30 GMT</pubDate></item><item><title><![CDATA[Reply to [M5 Fire] Wave playing? on Fri, 29 Oct 2021 19:21:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ajb2k3" aria-label="Profile: ajb2k3">@<bdi>ajb2k3</bdi></a> Yes, I updated to the latest firmware.<br />
I know, it's an old topic, but I made a new one, about playing audio to external speakers but nobody replied :(<br />
So I am trying to figure what people did before me.</p>
]]></description><link>https://community.m5stack.com/post/15288</link><guid isPermaLink="true">https://community.m5stack.com/post/15288</guid><dc:creator><![CDATA[Hermes]]></dc:creator><pubDate>Fri, 29 Oct 2021 19:21:47 GMT</pubDate></item><item><title><![CDATA[Reply to [M5 Fire] Wave playing? on Fri, 29 Oct 2021 07:13:33 GMT]]></title><description><![CDATA[<p dir="auto">Have you updated to the latest UIFLow firmware?<br />
You are replying to old topics and the firmware has changed quite a bit since.</p>
]]></description><link>https://community.m5stack.com/post/15279</link><guid isPermaLink="true">https://community.m5stack.com/post/15279</guid><dc:creator><![CDATA[ajb2k3]]></dc:creator><pubDate>Fri, 29 Oct 2021 07:13:33 GMT</pubDate></item><item><title><![CDATA[Reply to [M5 Fire] Wave playing? on Fri, 29 Oct 2021 00:08:26 GMT]]></title><description><![CDATA[<p dir="auto">has anyone tried to run this on a core2 ?</p>
<p dir="auto">I get errors when trying to initialize i2s device:</p>
<p dir="auto">"type object 'I2S' has no attribute MODE:MASTER....</p>
]]></description><link>https://community.m5stack.com/post/15275</link><guid isPermaLink="true">https://community.m5stack.com/post/15275</guid><dc:creator><![CDATA[Hermes]]></dc:creator><pubDate>Fri, 29 Oct 2021 00:08:26 GMT</pubDate></item><item><title><![CDATA[Reply to [M5 Fire] Wave playing? on Fri, 28 May 2021 07:02:09 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for your reply, when i test this code in UIFlow 1.7.7 on Fire:</p>
<pre><code>from machine import I2S
import os, uos
from wav import wave

#initialize the I2S device
i2s = I2S(  mode = I2S.MODE_MASTER | I2S.MODE_TX | I2S.MODE_DAC_BUILT_IN,
            rate = 16000,
            bits = 16,
            channel_format = I2S.CHANNEL_ONLY_RIGHT,
            data_format = I2S.FORMAT_I2S_MSB)

#uncomment the following line if you have issues mounting the sd
#uos.sdconfig(uos.SDMODE_SPI,clk=18,mosi=23,miso=19,cs=4)

#create a function to play the wav
def wav_player(fname):
    wav = wave.open(fname)
    i2s.set_dac_mode(I2S.DAC_RIGHT_EN)
    i2s.sample_rate(wav.getframerate())
    i2s.bits(wav.getsampwidth() * 8)
    i2s.nchannels(wav.getnchannels())
    i2s.volume(20)

    while True:
        data = wav.readframes(1024)
        if len(data) &gt; 0:
            i2s.write(data)
        else:
            wav.close()
            break

# Playing WAV audio file
lcd.clear()
lcd.print('working',0,0,0xffffff)

try:
    uos.mountsd()
except:
    os.mountsd()
    lcd.print('sd card not mounted',0,50,0xffffff)
    pass

while True:
        wav_player('/sd/test.wav')
        i2s.stop()
        wait(5)
</code></pre>
<p dir="auto">I have another error on line 39:</p>
<blockquote>
<p dir="auto">module object has no attribute 'mountSD'</p>
</blockquote>
]]></description><link>https://community.m5stack.com/post/13911</link><guid isPermaLink="true">https://community.m5stack.com/post/13911</guid><dc:creator><![CDATA[inrepublica]]></dc:creator><pubDate>Fri, 28 May 2021 07:02:09 GMT</pubDate></item><item><title><![CDATA[Reply to [M5 Fire] Wave playing? on Fri, 28 May 2021 01:52:52 GMT]]></title><description><![CDATA[<p dir="auto">Hi, <a class="plugin-mentions-user plugin-mentions-a" href="/user/inrepublica" aria-label="Profile: inrepublica">@<bdi>inrepublica</bdi></a> ,<br />
Sorry about that,try "from wav import wave".</p>
]]></description><link>https://community.m5stack.com/post/13909</link><guid isPermaLink="true">https://community.m5stack.com/post/13909</guid><dc:creator><![CDATA[IAMLIUBO]]></dc:creator><pubDate>Fri, 28 May 2021 01:52:52 GMT</pubDate></item></channel></rss>