logo
down
shadow

Detect specific sound in audio


Detect specific sound in audio

By : user2952036
Date : November 18 2020, 03:49 PM
wish helps you In most distance measurement and room impulse response measurement cases researches use Maximum length sequence (MLS) or sine sweep signals. These signals are played back and recorded. The recorded audio is used along with the inverted original signal to identify the presence of the played back audio. These MLS and sine sweep signals are very robust even in noisy environment. Each of them have their own advantages.
A similar method of playing back sound in a device and hearing it from another device is done by the microsoft guys to measure the distance between the devices- http://research.microsoft.com/en-us/projects/BeepBeep/
code :


Share : facebook icon twitter icon
Can I use freetts to detect a specific sound from audio input?

Can I use freetts to detect a specific sound from audio input?


By : Nicolae Cozma
Date : March 29 2020, 07:55 AM
To fix this issue No, see "Where is the speech recognizer?" in the freetts FAQ.
Detect sound boundaries in an audio file

Detect sound boundaries in an audio file


By : chintan
Date : March 29 2020, 07:55 AM
I wish this helpful for you Miki for the links. Aubio is a tool that works perfectly. The program aubioquiet will detect silence boundaries and print their timestamps:
$ aubioquiet temp.wav NOISY: 0.638549 QUIET: 2.008526 NOISY: 4.992290 QUIET: 6.286803 NOISY: 9.258957 QUIET: 10.559275 NOISY: 13.531428 QUIET: 14.622766 NOISY: 17.623945 QUIET: 18.953287 NOISY: 21.931248 QUIET: 23.260590 NOISY: 26.238548 QUIET: 27.643356 NOISY: 30.632925 QUIET: 31.915827 NOISY: 34.882175 QUIET: 36.165081
How to detect lound sound in audio files using Sox?

How to detect lound sound in audio files using Sox?


By : dippity doo
Date : March 29 2020, 07:55 AM
To fix this issue Peak amplitude is not a good measure of overall loudness. All this measurement does is find the maximum or minimum sample that occurs over a period. The problem with this is that a clip with all zeros and a single one will measure the same max peak amplitude as the clip with all ones. The RMS (root mean square) amplitude is a better gauge of loudness. Its computed by summing the square of all of the samples and then taking the sqrt of the result. https://en.wikipedia.org/wiki/Amplitude
Using UWP monitor live audio and detect gun-fire/clap sound

Using UWP monitor live audio and detect gun-fire/clap sound


By : A B
Date : March 29 2020, 07:55 AM
will help you You can find the decibels of a frame by finding the average amplitude of all the pcm data from that frame.I believe you want create a graph that handles the input so that looks like this
code :
private static event LoudNoise<double>;
private static int quantum = 0;
static AudioGraph ingraph;
private static AudioDeviceInputNode deviceInputNode;
private static AudioFrameOutputNode frameOutputNode;

public static async Task<bool> CreateInputDeviceNode(string deviceId)
{
    Console.WriteLine("Creating AudioGraphs");
    // Create an AudioGraph with default settings
    AudioGraphSettings graphsettings = new AudioGraphSettings(AudioRenderCategory.Media);
    graphsettings.EncodingProperties = new AudioEncodingProperties();
    graphsettings.EncodingProperties.Subtype = "Float";
    graphsettings.EncodingProperties.SampleRate = 48000;
    graphsettings.EncodingProperties.ChannelCount = 2;
    graphsettings.EncodingProperties.BitsPerSample = 32;
    graphsettings.EncodingProperties.Bitrate = 3072000;
    //settings.DesiredSamplesPerQuantum = 960;
    //settings.QuantumSizeSelectionMode = QuantumSizeSelectionMode.ClosestToDesired;
    CreateAudioGraphResult graphresult = await AudioGraph.CreateAsync(graphsettings);

    if (graphresult.Status != AudioGraphCreationStatus.Success)
    {
        // Cannot create graph
        return false;
    }

    ingraph = graphresult.Graph;AudioGraphSettings nodesettings = new AudioGraphSettings(AudioRenderCategory.GameChat);
nodesettings.EncodingProperties = AudioEncodingProperties.CreatePcm(48000, 2, 32);
    nodesettings.DesiredSamplesPerQuantum = 960;
    nodesettings.QuantumSizeSelectionMode = QuantumSizeSelectionMode.ClosestToDesired;
    frameOutputNode = ingraph.CreateFrameOutputNode(ingraph.EncodingProperties);
    quantum = 0;
    ingraph.QuantumStarted += Graph_QuantumStarted;

    DeviceInformation selectedDevice;

    string device = Windows.Media.Devices.MediaDevice.GetDefaultAudioCaptureId(Windows.Media.Devices.AudioDeviceRole.Default);
    if (!string.IsNullOrEmpty(device))
    {
            selectedDevice = await DeviceInformation.CreateFromIdAsync(device);
    } else
    {
        return false;
    }

    CreateAudioDeviceInputNodeResult result =
        await ingraph.CreateDeviceInputNodeAsync(MediaCategory.Media, nodesettings.EncodingProperties, selectedDevice);
    if (result.Status != AudioDeviceNodeCreationStatus.Success)
    {
        // Cannot create device output node
        return false;
    }


    deviceInputNode = result.DeviceInputNode;
    deviceInputNode.AddOutgoingConnection(frameOutputNode);
    frameOutputNode.Start();
    ingraph.Start();
    return true;
}
private static void Graph_QuantumStarted(AudioGraph sender, object args)
{
    if (++quantum % 2 == 0)
    {
        AudioFrame frame = frameOutputNode.GetFrame();
        float[] dataInFloats;
        using (AudioBuffer buffer = frame.LockBuffer(AudioBufferAccessMode.Write))
        using (IMemoryBufferReference reference = buffer.CreateReference())
        {
            // Get the buffer from the AudioFrame
            ((IMemoryBufferByteAccess)reference).GetBuffer(out byte* dataInBytes, out uint capacityInBytes);

            float* dataInFloat = (float*)dataInBytes;
            dataInFloats = new float[capacityInBytes / sizeof(float)];

            for (int i = 0; i < capacityInBytes / sizeof(float); i++)
            {
                dataInFloats[i] = dataInFloat[i];
            }
        }

        double decibels = 0f;
        foreach (var sample in dataInFloats)
        {
            decibels += Math.Abs(sample);
        }
        decibels = 20 * Math.Log10(decibels / dataInFloats.Length);
        // You can pass the decibel value where ever you'd like from here
        if (decibels > 10)
        {
            LoudNoise?.Invoke(this, decibels);
         }
    }
}
How do I interpret the audio stream from the microphone to detect a certain sound in WP7?

How do I interpret the audio stream from the microphone to detect a certain sound in WP7?


By : Gdp
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further I think this might help http://en.wikipedia.org/wiki/Pulse-code_modulation. I think the values in a way represent the offset of the mechanical part in the microphone from its middle position, but I am sure the theory and vocabulary might go really deep.
When it comes to recognizing sounds - it can also get arbitrarily complex, but a clapper might be a simple task - you basically want to detect a sudden increase in volume, which would manifest in a sharp, short-term increase of the moving-average of absolute values in the stream, so I'd put a sliding windows on the stream and keep checking with certain thresholds - one short window for the high volume threshold and two adjacent, longer and lower threshold windows to make sure there was no such noise before and after the clapper.
shadow
Privacy Policy - Terms - Contact Us © ourworld-yourmove.org