Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Problem in the sound of audio files presentation

Hello,
I have experienced an apparent random problem when I present audio stim using Expyriment. Sometimes, the recorded sound comes along with some white noise. I am using wav files recorded using Audacity. I stress the problem is not related to specific files. For the same file, this problem sometimes happens, sometimes it doesn't. I have alternatively tried to convert the files to mp3 but then I ran into another problem: I get no sound at all even trying many different codecs, such as ffmpeg libmp3lame.

I am using Expyriment 0.7.0 (Revision 7a6b73d) with Python 2.7 in a linux machine using Ubuntu 16.04.

Thank you very much in advance.
Best,
Ana Luísa Pinho

Comments

  • Hi anapinho,

    Have you checked the audio settings (buffer size, audio devices you are using, and so on)?

  • Dear anapinho,

    as rrr mentioned, this sounds like an issue with a too low audio buffer. Did you change the audio buffer to a custom value? The default is 2048, which should be high enough. You could try increasing it even further with expyriment.control.defaults.audiosystem_buffer_size = 4096 (this needs to be set before initializing Expyriment).

    Could you also check the specifics of the wav file? What is the bitrate of that for instance?

  • Hello,
    Thank you for your suggestions.

    These are the specifications of my wav files:
    RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 44100 Hz

    I tried to increase the expyriment.control.defaults.audiosystem_buffer_size to 8192 and I still get the same problem. One thing I noticed is that if I open and close twice a file in vlc while running expyriment, the problem is solved. Even though it might be a short-term solution, I still would like to find a more stable long-term solution to this problem.

    Best,
    Ana Luísa

  • edited February 2017

    Very strange. Could you maybe send me one of the files? Then I can check if it works here.

  • Hello,
    I am not allowed to attach .wav files. Is there any other way I can send it to you?

    Thank you.
    Ana Luísa

  • Depending on the size, you could send it to florian@expyriment.org, or alternatively, send it via services like https://wetransfer.com/

  • I just tested with the audio files you sent me and the following script:

    import expyriment as xpy
    
    
    exp = xpy.control.initialize()
    
    s1 = xpy.stimuli.Audio("nord_ou_sud.wav")
    s2 = xpy.stimuli.Audio("ouest_ou_est.wav")
    s1.preload()
    s2.preload()
    
    for x in range(10):
        s1.play()
        xpy.control.wait_end_audiosystem()
        s2.play()
        xpy.control.wait_end_audiosystem()
    

    This worked fine on my computer. I tested with a newer version of Expyriment, though, but that should not make a difference, as there were no changes with regards to audio playback. Does the problem occur with this particular script on your computer? If not, can you send me a script that does show the problem?

    Also, it might be worth to check which Pygame version you are using. I tested with 1.9.3.

  • Hello,
    I am using '1.9.2b8'. Do you think I should upgrade to 1.9.3? I can send my expyriment program if you want, even though it contains many other things. But I am basically loading my Audio, using the same object as you did, i.e. stimuli.Audio().

  • Hello once again,
    How did you install pygame 1.9.3? I installed it through pip and I just did an upgrade and I still get the same (apparently beta version).

  • python -m pip install -U pygame should just work fine. If the installation of Pygame 1.9.3 worked, then you should also get this version when you install it. I don't think two pygame versions can be installed in parallel in the same Python distribution. Are you using different Python installations or virtual environments?

  • Hello,
    I have re-installed pygame to the newest vs, i.e. 1.9.3. I removed the old installation. After several trials (since the problem was apparently random), it seems the problem disappeared. I thus believe it was related to my beta vs of pygame. Thank you very much for your feedback. It helped to solve the problem. :)

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games