<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: hm</title>
    <description>The latest articles on DEV Community by hm (@hm_3da474f199e3c1d45337cf).</description>
    <link>https://dev.to/hm_3da474f199e3c1d45337cf</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2304020%2F56bbc776-a872-4151-b9bf-5c5a4b3186e6.jpg</url>
      <title>DEV Community: hm</title>
      <link>https://dev.to/hm_3da474f199e3c1d45337cf</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hm_3da474f199e3c1d45337cf"/>
    <language>en</language>
    <item>
      <title>👏 I Created a React Component That Recognizes Finger Snaps! (feat. TensorFlow.js)</title>
      <dc:creator>hm</dc:creator>
      <pubDate>Fri, 31 Jan 2025 08:41:51 +0000</pubDate>
      <link>https://dev.to/hm_3da474f199e3c1d45337cf/i-created-a-react-component-that-recognizes-finger-snaps-feat-tensorflowjs-4lin</link>
      <guid>https://dev.to/hm_3da474f199e3c1d45337cf/i-created-a-react-component-that-recognizes-finger-snaps-feat-tensorflowjs-4lin</guid>
      <description>&lt;p&gt;Hello! I'm excited to introduce "Wake-Up," an open-source React component that can recognize the sound of clapping or finger snapping on the web. 🎉&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MIT License (commercial use allowed)&lt;/strong&gt;: Ready to test with a model size of just 5MB!&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  🎮 Try It Out Now!
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://codepen.io/hmmhmmhm/full/RNbdjeV" rel="noopener noreferrer"&gt;👉 Visit the Demo Page&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/llami-team/wake-me" rel="noopener noreferrer"&gt;🔍 GitHub Repository&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;⚠️ Tips for Better Recognition:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Use an &lt;strong&gt;external microphone&lt;/strong&gt; for the best results.&lt;br&gt;
&lt;strong&gt;Earphones&lt;/strong&gt; or &lt;strong&gt;Airpods&lt;/strong&gt; may not work as well.&lt;br&gt;
Works on both &lt;strong&gt;desktop&lt;/strong&gt; and &lt;strong&gt;mobile&lt;/strong&gt;!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  💻 How to Use It?
&lt;/h3&gt;

&lt;p&gt;First, install it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;wake-me
&lt;span class="c"&gt;# or&lt;/span&gt;
yarn add wake-me
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can easily use it in &lt;strong&gt;React&lt;/strong&gt; like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;WakeMe&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;wake-me&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;App&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;WakeMe&lt;/span&gt; &lt;span class="na"&gt;onSnap&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Snap!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🤔 Potential Use Cases
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;🎙️ &lt;strong&gt;AI Systems&lt;/strong&gt;: Wake up AI assistants with a finger snap, just like saying "Hey Siri."&lt;/li&gt;
&lt;li&gt;🎭 &lt;strong&gt;Presentations&lt;/strong&gt;: Advance slides with a snap.&lt;/li&gt;
&lt;li&gt;🖥️ &lt;strong&gt;Video Conferences&lt;/strong&gt;: Get attention or a turn to speak.&lt;/li&gt;
&lt;li&gt;🎨 &lt;strong&gt;Digital Art&lt;/strong&gt;: Interactive exhibitions responding to audience sounds.&lt;/li&gt;
&lt;li&gt;🤖 &lt;strong&gt;Smart Homes&lt;/strong&gt;: Control IoT devices with claps or finger snaps.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ✨ Features of the Library
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;🚀 High-performance AI model implemented with &lt;strong&gt;TensorFlow.js&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;⚡ Real-time sound detection and analysis.&lt;/li&gt;
&lt;li&gt;🪶 Lightweight and easy-to-use structure.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can also use it with &lt;strong&gt;vanilla JavaScript&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"https://cdn.jsdelivr.net/npm/wake-me@latest/dist/vanilla/vanilla.global.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;wakeMe&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;WakeMe&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;onSnap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Snap!&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="na"&gt;onNoise&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;score&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Noise level:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;score&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="nx"&gt;wakeMe&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;init&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🤔 Can It Be Used Commercially?
&lt;/h3&gt;

&lt;p&gt;Yes! This project is provided by the &lt;a href="https://llami.net" rel="noopener noreferrer"&gt;LLAMI Team&lt;/a&gt; and is available under the MIT license, so feel free to use it as you like!&lt;/p&gt;

&lt;h3&gt;
  
  
  😭 Limitations of the Library
&lt;/h3&gt;

&lt;p&gt;The current version is designed for tablet demonstrations, and on devices like MacBooks, it may also pick up sounds such as keyboard typing, tapping on a desk, or chair squeaks. We're working to improve this!&lt;/p&gt;

&lt;h3&gt;
  
  
  🔍 GitHub Repo Link
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/llami-team/wake-me" rel="noopener noreferrer"&gt;https://github.com/llami-team/wake-me&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
