DArshit94 / wami-recorder

Automatically exported from code.google.com/p/wami-recorder
0 stars 0 forks source link

Setting sampling rate in wami #11

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Enter "Wami.setSettings({rate : "16000", allrates : true});" after 
Wami.setup in the index.html 

What is the expected output? What do you see instead?
I expected the rate of the recorded wav file to be 16k but it was still 22k. 

What version of the WAMI recorder are you using? What version of Flash are you 
using?  In what browser?  On what operating system?
- most recent one on 02/28/2012
- Chrome
- Windows 7

Thank you

Original issue reported on code.google.com by moslas...@gmail.com on 28 Feb 2012 at 11:19

GoogleCodeExporter commented 8 years ago

Original comment by mcgrawian@gmail.com on 20 Mar 2012 at 2:28

GoogleCodeExporter commented 8 years ago
I had also same problem. Are there any time-plan to fix this bug. I have tried 
to change rate information in actionsscript code and compile with flex sdk 
again. But generated swf file size is half of the original and could not be 
shown up.

Original comment by muharrem...@gmail.com on 23 Mar 2012 at 9:21

GoogleCodeExporter commented 8 years ago
Try this:

Wami.setSettings({'sampleRate':16000});

It worked for me. I think you just called it with the wrong args.

Original comment by andrew.l...@gmail.com on 5 Apr 2012 at 7:12

GoogleCodeExporter commented 8 years ago
>>Comment 3 by andrew.l...@gmail.com, Apr 5, 2012
>>Try this:
>>Wami.setSettings({'sampleRate':16000});
>>It worked for me. I think you just called it with the wrong args.

Wami.setup("wami");
Wami.setSettings({'sampleRate':16000});

Does not work for me at all.  In fact any javascript code after the setSettings 
is halted.  Are there any other specifics that you did to set the rate?  At 
this time I am completely unable to change rate.

Original comment by rdgeh...@gmail.com on 23 Sep 2012 at 3:09

GoogleCodeExporter commented 8 years ago
The issue that I have is that setSettings() isn't defined in the recorder.js 
file.  After looking at the Parrot example on the MIT website, I was able to 
manually fix this but adding the following script:

        Wami.setSettings = function (options)
        {
            recorder.setSettings(options);
        }

Then I put the script in the onLoaded event to call the setSettings:

    function setupRecorder() {
        Wami.setup({ id: "wami", onReady: setupGUI, onLoaded: onWamiLoaded });
    }

    function onWamiLoaded()
    {
        Wami.setSettings({ 'sampleRate': 16000 });
    }

Hope this helps someone.

Original comment by vbgu...@gmail.com on 7 Mar 2013 at 3:27

Attachments:

GoogleCodeExporter commented 8 years ago
that helped me! thanks.

Original comment by onan...@gmail.com on 19 Mar 2013 at 11:43

GoogleCodeExporter commented 8 years ago
Another solution is calling Wami.setSettings() inside the function setupGUI() 
which is called via onReady:

function setupRecorder() {
    Wami.setup({
       id : "wami",
       onReady : setupGUI
    });
}

function setupGUI() {

     Wami.setSettings({ sampleRate: 16000 });   // <--- Add this line

     var gui = new Wami.GUI({
         id : "wami",
     });
        ...
}

Looks like the function Wami.setSettings() is not visible outside of 
Wami.setup()

Original comment by knv...@gmail.com on 6 May 2013 at 1:02

GoogleCodeExporter commented 8 years ago
I had also same problem. I fixed the bug by adding the following script inside 
the delegateWamiAPI() in the recorder.js:

Wami.setSettings({ 'sampleRate': 16000 });

But the new issue is coming. I can set the sampleRate successfully,but I can't 
playback the audio anymore. the log show bellow:

FLASH: Not WAV: 8kHz and 16kHz are supported for recording but not playback.  
11kHz doesn't work in Ubuntu.  Enable all rates via a parameter passed into the 
Flash.

How should I do?

Original comment by YangJin...@gmail.com on 26 Feb 2015 at 8:25