Summary: Build a LabVIEW subVI to wait for audio level to exceed a user-defined threshold, and then record audio until the audio level drops below the threshold again.
![]() |
This module refers to LabVIEW, a software development environment that features a graphical programming language. Please see the LabVIEW QuickStart Guide module for tutorials and documentation that will help you: |
| • Apply LabVIEW to Audio Signal Processing | |
| • Get started with LabVIEW | |
| • Obtain a fully-functional evaluation edition of LabVIEW |
frame length [s] (0.1) -- DBL max duration [s] (10) -- DBL threshold level (0.1) -- DBL fs [Hz] (22050) -- DBL error in (no error) -- error cluster Parentheses ( ) indicate default value; square brackets [ ] designate units.
signal out -- waveform error out -- error cluster frame length.
Once "sam_ListenForAudio" completes execution (i.e., when the audio level exceeds
threshold level), record and store audio frames until
either of two possible conditions occurs: (1) maximum audio level within a frame is lower than
the threshold level, or (2) total number of stored audio
frames would exceed max duration.
signal out.
The last audio frame containing silence must be excluded from
signal out.
This subVI is rather complex to build and debug, so
feel free to download the finished subVI
sam_GrabAudioDynamic.vi.
You may find it helpful to test the subVI with the demo sam_GrabAudioDynamic_demo.vi.
""Communication Systems Projects with LabVIEW" features ten projects that draw upon a library of over 40 subVIs constructed as part of the project activities. Each module in this manual completely […]"
"Starting point collection that gathers all modules from this course"