Author Topic: Audio Recorder & Playback profile  (Read 297 times)

Exergist

  • Moderator
  • Sr. Member
  • *****
  • Posts: 325
  • Can you dig it?
Audio Recorder & Playback profile
« on: May 07, 2018, 09:52:38 am »
Attached you will find a profile that gives you the ability to record and play .wav audio files through VoiceAttack (v1.7 and later). One of the applications for this functionality is an audio journal for documenting whatever you want with your voice (like making a "captain's log"). The profile leverages a number of C# inline functions, and most notable are the functions that perform the recording, playback, and file name retrieval. The profile is included in a .vax package to provide a default directory in your VA Apps folder for storing the audio files.

Detailed descriptions of each VA command action and inline function line are provided. Here is a breakdown of the four commands in the profile:
  • Record Audio: Starts and stops audio recording. There are options for specifying the .wav file name, storage location, audio quality, and name incrementing. Name incrementing lets you create new files with incremented names (as opposed to continuously overwriting an existing file) with each new recording. You have the ability to cancel (and not save) an audio recording with a key press or by pressing the "Stop Commands" button. You can also specify if you want to have a secondary key press trigger the start of audio recording (instead of recording initiating after the command is launched). By default commands are blocked while recording to prevent actions from executing unintentionally.
  • Play Audio: Plays back the most recent .wav audio file in a specified directory.
  • Stop Audio Playback: Stops playback of a .wav audio file. Playback may also be stopped by simply pressing the "Stop Commands" button.
  • Delete Audio: Deletes the most recent .wav audio file in a specified directory.

Special thanks goes to Pfeil for providing helpful suggestions for improving the command and inline function content and efficiency.

Please let me know if you run into any issues with the profile. Cheers! :)

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 1625
Re: Audio Recorder & Playback profile
« Reply #1 on: May 07, 2018, 11:13:34 am »
The next beta will have the captured audio feature (ui and proxy) I had mentioned that is currently embedded in VA (but not exposed).  I hope that doesn't step on your toes again.

Exergist

  • Moderator
  • Sr. Member
  • *****
  • Posts: 325
  • Can you dig it?
Re: Audio Recorder & Playback profile
« Reply #2 on: May 07, 2018, 11:28:53 am »
lol no that's fine, I'm always in favor of "native" solutions over add-ons :)

It will be interesting to try out. This profile basically opens a running channel for recording audio. I'm going to guess that the "captured audio" will be limited by the Recognition settings. I.e., if a user pauses during recording and then continues speaking perhaps all of the content won't be picked up?

Exergist

  • Moderator
  • Sr. Member
  • *****
  • Posts: 325
  • Can you dig it?
Re: Audio Recorder & Playback profile
« Reply #3 on: May 14, 2018, 10:43:46 am »
The new 'Captured Audio' feature in v1.7.0.5 is quite neat. A lot of the functionality I created in the recording Gary took care of in a slick way.

The recorder still has a place though since the 'Captured Audio' is only limited to phrases that VA interprets. So if you pause while speaking the captured audio may be broken up into pieces.

@Gary is there a way to have VA just open an audio channel for recording so the functionality in this Recorder could be made 100% native?