<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm3.aspx.cs" Inherits="NECPPATEL.WebForm3" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <audio controls autoplay></audio>
    <script type="text/javascript" src="recorder.js"> </script>
                    <fieldset><legend>RECORD AUDIO</legend>
    		<input onclick="startRecording()" type="button" value="start recording" />
    		<input onclick="stopRecording()" type="button" value="stop recording and play" />
                    </fieldset>


    		<script>

    		    window.AudioContext = window.AudioContext ||
                      window.webkitAudioContext;

    		    var context = new AudioContext();

    		    navigator.getUserMedia({ audio: true }, function (stream) {
    		        var microphone = context.createMediaStreamSource(stream);
    		        var filter = context.createBiquadFilter();

    		        // microphone -> filter -> destination.
    		        microphone.connect(filter);
    		        filter.connect(context.destination);
    		    }, errorCallback);


    		</script>

    </div>
    </form>
</body>
</html>
