I just finished mastering the Good Sponge Sampler Vol 2. Great original music from New London, CT
Carl Franklin | Posted on
Friday, February 1, 2013 at 04:54PM
Carl Franklin | Posted on
Friday, February 1, 2013 at 04:54PM
Carl Franklin | Posted on
Thursday, January 17, 2013 at 02:14PM Watch this video on how a guy created a vocal area in his bedroom $30 worth of stuff you can get online and at your neighborhood store (cheap Uhaul moving blankets and some hanging hooks). You can REALLY hear the difference!
Here’s a link to the YouTube Video: http://tinyurl.com/BaffleVideo
He uses two blankets, a quilted moving blanket which you can buy for $15 at http://tinyurl.com/QuiltedBlanket, and under that a regular furniture pad, which you can buy for $8 at http://tinyurl.com/FurniturePad. You’ll also need $6 worth of hooks from Home Depot or any hardware store and a set of shower rings, which you can also get at any Wal-Mart for a few bucks.
If you don’t have a way to build something like this and you have a walk-in closet in your house? Record in there! You’ll be amazed at the difference in quality you can get in a closet full of clothes.
Carl Franklin | Posted on
Saturday, September 29, 2012 at 02:07PM I think we were driving through Iowa. I was working at the table in the back of the RV and I hear Richard say "Holy Crap! That was the biggest turbine blade I've ever seen!" I immediately look out the window to see ... nothing! I thought he was looking at a windmill. But no, he saw a single 100' turbine blade being driven down the highway strapped to a flatbed!
Of course, I didn't know this, so I go back to work. A few minutes later, Richard says "Holy Crap! Here comes another one!" This time, I look out the window and I see it.
Thinking on his feet, Richard says "Grab the camera! They come in threes!" I grab the camera and hand it up to Richard.
Sure enough, here comes another one. Snap! And then, another, and another...
Turns out Iowa is swimming in windmills.
Carl Franklin | Posted on
Wednesday, June 13, 2012 at 11:09AM When we use speech recognition on our Windows 7 machine, the last thing most of us think about is the record level of our microphone. If it's too low, recognition will not be accurate because the system can't hear you proporly. If the level is too high you will overdrive the amplifier and again, the result is low accuracy.
If you are lucky enough to be a .NET developer you can use a neat little trick to automatically adjust the input gain.
Here's the XAML for a simple window that shows an audio level meter and a slider for manually adjusting the input gain:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace AudioGainTestCS
{
/// <summary>
/// This application automatically adjusts the record level (input volume)
/// as you use speech recognition. A mismatched record level can be
/// disastrous if you're going to use speech recognition. Note that for
/// this demo, I'm using a DictationGrammar, but it works with any grammar.
///
/// The key is the WaveLibMixer.dll, which you can find on CodeProject.
/// This library lets you get and set levels and other controls associated with
/// audio devices.
///
/// The SpeechRecognitionEngine raises an event on a regular interval passing in
/// the volume at the input device. When you are not speaking this level is close
/// to zero. When you are shouting it's closer to 99.
///
/// Given the volume of speech over time and the ability to control the record level
/// dynamically, well... it's pretty darned easy to automatically adjust the
/// microphone for the speaker.
///
/// Don't get caught without this nice little tool!
///
/// Carl
/// </summary>
public partial class MainWindow : Window
{
// -- Add a reference to System.Speech
private System.Speech.Recognition.SpeechRecognitionEngine speech = new System.Speech.Recognition.SpeechRecognitionEngine();
// -- Add a reference to WaveLibMixer.dll, which you can find at:
// http://www.codeproject.com/Articles/11695/Audio-Library-Part-I-Windows-Mixer-Control
private WaveLib.AudioMixer.MixerLine audioLine;
private Int32 peakLevel;
public MainWindow()
{
InitializeComponent();
this.Loaded+=new RoutedEventHandler(MainWindow_Loaded);
speech.AudioLevelUpdated+=new EventHandler<System.Speech.Recognition.AudioLevelUpdatedEventArgs>(speech_AudioLevelUpdated);
speech.SpeechRecognized+=new EventHandler<System.Speech.Recognition.SpeechRecognizedEventArgs>(speech_SpeechRecognized);
Slider1.ValueChanged += new RoutedPropertyChangedEventHandler<double>(Slider1_ValueChanged);
}
private void MainWindow_Loaded(object sender, System.Windows.RoutedEventArgs e) {
// -- Create a new input mixer object to control an audio input device
WaveLib.AudioMixer.Mixer audioMixer = new WaveLib.AudioMixer.Mixer(WaveLib.AudioMixer.MixerType.Recording);
// -- Open the default recording device
audioMixer.DeviceId = audioMixer.DeviceIdDefault;
// -- Does the mixer have lines? It ought to...
if ((audioMixer.Lines.Count > 0)) {
// -- Select the first line, which is usually the Master Volume
audioLine = audioMixer.Lines[0];
// -- Does that line have a Volume control? It really ought to...
if (audioLine.ContainsVolume) {
// -- Set the input volume (record level) to 50%
audioLine.Volume = audioLine.VolumeMax / 2;
// -- Set up the slider min/max and value based on the volume
Slider1.Minimum = audioLine.VolumeMin;
Slider1.Maximum = audioLine.VolumeMax;
Slider1.Value = audioLine.Volume;
}
else {
// -- Jeez... lame.
Slider1.IsEnabled = false;
}
}
// -- The progress bar is used as an audio meter.
// The speech recognition engine gives us a volume value from 0 to 99.
// So we set the ProgressBar min and max accordingly
ProgressBar1.Minimum = 0;
ProgressBar1.Maximum = 99;
// -- Set the speech synthesizer to use the default audio input device
speech.SetInputToDefaultAudioDevice();
// -- Tell the speech synthesizer to recognize plain speech, not commands.
speech.LoadGrammar(new System.Speech.Recognition.DictationGrammar());
// -- Start recognizing
speech.RecognizeAsync(System.Speech.Recognition.RecognizeMode.Multiple);
}
private void speech_AudioLevelUpdated(object sender, System.Speech.Recognition.AudioLevelUpdatedEventArgs e) {
// -- This is an event handler that happens on a regular interval.
// The e.AudioLevel is a value from 0 to 99 representing the
// volume of the talker's voice in almost real-time.
// -- Setting the progressbar value to this level creates an audio meter.
ProgressBar1.Value = e.AudioLevel;
// -- If the volume is over 70% loud, knock the slider down a bit
// which will in turn drop the record level
if ((e.AudioLevel > 70)) {
Slider1.Value -= 1000;
}
// -- Keep track of the peak level for this sentence.
if ((e.AudioLevel > peakLevel)) {
peakLevel = e.AudioLevel;
}
}
private void speech_SpeechRecognized(object sender, System.Speech.Recognition.SpeechRecognizedEventArgs e) {
// -- This event handler fires after the talker speaks a sentence.
// e.Result.Text contains the text that they have spoken.
// -- In this case, I'm capitalizing the sentence, adding a period at the end,
// and displaying the text in a text box.
TextBox1.Text = (e.Result.Text.Substring(0, 1).ToUpper()
+ (e.Result.Text.Substring(1) + "."));
if ((peakLevel < 20)) {
Slider1.Value += 3000;
}
// -- Reset the peak level
peakLevel = 0;
}
void Slider1_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
// -- When the value of the slider changes,
// set the audio input volume (the record level) to that value.
// This can happen when the user moves the slider, or some code
// sets the Slider1.Value
if (audioLine != null)
{
audioLine.Volume = (int)Slider1.Value;
}
}
}
}
Carl Franklin | Posted on
Monday, April 30, 2012 at 07:30PM The Kinect For Windows SDK v1.0 is awesome, but it doesn't recover well when it loses sight of you whilst tracking your skeleton. With a timer control and a little code to restart the KinectSensor, you can recover is 5 seconds or less.
This is the same code I use in GesturePak, a gesture recording and recognition SDK for Kinect for Windows.
Create a new WPF application and add a reference to the Kinect SDK assembly:
C:\Program Files\Microsoft SDKs\Kinect\v1.0\Assemblies\Microsoft.Kinect.dll
You don't need any controls for this demo. It simply turns the form red when tracking, and white when not tracking.
The basic idea is that when we lose tracking for the first time, you kick off a timer to fire it's Tick event in 1/2 a second. In the timer Tick handler you stop the Kinect Sensor, Start it up again, and then set the timer's Interval to a more reasonable amount of time. I use 5 seconds, but you should test it in your app. If it's too short, you don't give the Kinect time to track you, and if it's too long and it doesn''t track you, you could be sitting and waiting too long. 5 seconds seems reasonable to me.
When the state changes from not tracking to tracking, you simply disable the timer.
Here's the code in both C# and VB.NET. In each case you can replace the default code behind MainWindow.xaml and run it. The C# app has to have a reference to System.Windows.Forms
C#
VB.NET