Error when recording vocal responses + playing a sound


Error when recording vocal responses + playing a sound

Author
Message
RobertMcGill
RobertMcGill
Associate Member
Associate Member (56 reputation)Associate Member (56 reputation)Associate Member (56 reputation)Associate Member (56 reputation)Associate Member (56 reputation)Associate Member (56 reputation)Associate Member (56 reputation)Associate Member (56 reputation)Associate Member (56 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
Supreme Being (418K reputation)Supreme Being (418K reputation)Supreme Being (418K reputation)Supreme Being (418K reputation)Supreme Being (418K reputation)Supreme Being (418K reputation)Supreme Being (418K reputation)Supreme Being (418K reputation)Supreme Being (418K reputation)

Group: Administrators
Posts: 8.9K, Visits: 37K
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
Associate Member
Associate Member (56 reputation)Associate Member (56 reputation)Associate Member (56 reputation)Associate Member (56 reputation)Associate Member (56 reputation)Associate Member (56 reputation)Associate Member (56 reputation)Associate Member (56 reputation)Associate Member (56 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


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....






Millisecond Forums


Search