Error when recording vocal responses + playing a sound


Author
Message
RobertMcGill
RobertMcGill
Respected Member (334 reputation)Respected Member (334 reputation)Respected Member (334 reputation)Respected Member (334 reputation)Respected Member (334 reputation)Respected Member (334 reputation)Respected Member (334 reputation)Respected Member (334 reputation)Respected Member (334 reputation)
Group: Forum Members
Posts: 4, Visits: 4
Hello all,

In my experiment I will be recording participants' vocalizations, which are cued by both a visual (picture) and auditory (beep sound) signal. 
I have coded this as follows:

<trial 1>
/ stimulustimes = [0=image, beep]
/ beginresponsetime = 0
/ trialduration = 3000
/ validresponse = (anyresponse)
/ inputdevice = voicerecord
/ recorddata = true
/responseinterrupt = trial
</trial>

<picture image>
/ items = ("image1.jpg")
/ size = (700, 700)
</picture>

<sound beep>
/items = ("beep.wav")  
/playthrough = true    
</sound>

The problem is that when I run this, I get an error: DirectSound Error -2004353017: Unknown DirectSound error..  Line 170, File win\SoundPlayer.cpp

Recording vocal responses without playing a beep sound and vice versa is not a problem, but doing both simultaneously gives this error.

Doe anyone perhaps know how to solve this issue?

Thanks a lot in advance!


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
RobertMcGill - Wednesday, January 17, 2018
Hello all,

In my experiment I will be recording participants' vocalizations, which are cued by both a visual (picture) and auditory (beep sound) signal. 
I have coded this as follows:

<trial 1>
/ stimulustimes = [0=image, beep]
/ beginresponsetime = 0
/ trialduration = 3000
/ validresponse = (anyresponse)
/ inputdevice = voicerecord
/ recorddata = true
/responseinterrupt = trial
</trial>

<picture image>
/ items = ("image1.jpg")
/ size = (700, 700)
</picture>

<sound beep>
/items = ("beep.wav")  
/playthrough = true    
</sound>

The problem is that when I run this, I get an error: DirectSound Error -2004353017: Unknown DirectSound error..  Line 170, File win\SoundPlayer.cpp

Recording vocal responses without playing a beep sound and vice versa is not a problem, but doing both simultaneously gives this error.

Doe anyone perhaps know how to solve this issue?

Thanks a lot in advance!


That DirectSound Error is indicative of a problem with the "beep.wav" file you are using. Specifically, the file probably has the wrong sample size (32bits). Windows DirectSound API (which the <sound> element maps to) expects files to have a sample size of 16bits. If you open said file in an audio editor of your choice and save explicitly save it as 16-bit PCM WAV, things should work fine.

If you have trouble figuring out how to do this, put the WAV file in a ZIP archive and attach it to this thread (click +Insert -> Add File). I can then convert the file to 16-bit sample size for you.

RobertMcGill
RobertMcGill
Respected Member (334 reputation)Respected Member (334 reputation)Respected Member (334 reputation)Respected Member (334 reputation)Respected Member (334 reputation)Respected Member (334 reputation)Respected Member (334 reputation)Respected Member (334 reputation)Respected Member (334 reputation)
Group: Forum Members
Posts: 4, Visits: 4
Dave - Wednesday, January 17, 2018
RobertMcGill - Wednesday, January 17, 2018
Hello all,

In my experiment I will be recording participants' vocalizations, which are cued by both a visual (picture) and auditory (beep sound) signal. 
I have coded this as follows:

<trial 1>
/ stimulustimes = [0=image, beep]
/ beginresponsetime = 0
/ trialduration = 3000
/ validresponse = (anyresponse)
/ inputdevice = voicerecord
/ recorddata = true
/responseinterrupt = trial
</trial>

<picture image>
/ items = ("image1.jpg")
/ size = (700, 700)
</picture>

<sound beep>
/items = ("beep.wav")  
/playthrough = true    
</sound>

The problem is that when I run this, I get an error: DirectSound Error -2004353017: Unknown DirectSound error..  Line 170, File win\SoundPlayer.cpp

Recording vocal responses without playing a beep sound and vice versa is not a problem, but doing both simultaneously gives this error.

Doe anyone perhaps know how to solve this issue?

Thanks a lot in advance!


That DirectSound Error is indicative of a problem with the "beep.wav" file you are using. Specifically, the file probably has the wrong sample size (32bits). Windows DirectSound API (which the <sound> element maps to) expects files to have a sample size of 16bits. If you open said file in an audio editor of your choice and save explicitly save it as 16-bit PCM WAV, things should work fine.

If you have trouble figuring out how to do this, put the WAV file in a ZIP archive and attach it to this thread (click +Insert -> Add File). I can then convert the file to 16-bit sample size for you.

Thanks a lot for this information! I managed to convert it into 16-bit PCM WAV myself and it works now!

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search