**What are you trying to achieve?:
I have a routine with a microphone component, but the speech onset time is always recorded as 0. The speech is recorded accurately, and the offset is recorded too. However, speech onset does not seem to be recorded at all.
**What did you try to make it work?:
I’ve used the routine from the demo, keeping the settings the same and the result is that onset time is saved unreliably (i.e. some times it’s recorded and others it still appears as 0). I have also tried to use this code from an issue on github here:
speechStart = mic.script.wordData[0][‘start’]
speechEnd = mic.script.wordData[-1][‘end’]
thisExp.addData(“mic.speechStart”, speechStart)
thisExp.addData(“mic.speechEnd”, speechEnd)
but this code does not recognise wordData resulting in the experiment crashing. I have also tried to reduce the frequency of recording, but the experiment would not run at all, returning the following error:
AttributeError: ‘Stream’ object has no attribute ‘handle’