ContextLab / quail

A python toolbox for analyzing and plotting free recall data
http://cdl-quail.readthedocs.io/en/latest/
MIT License
20 stars 10 forks source link

ENH: add onset times to speech decoding function #87

Open andrewheusser opened 6 years ago

andrewheusser commented 6 years ago

The most recent version of the google API gives onset times of each word. add this to the speech decoding function

andrewheusser commented 6 years ago

Google added a boolean enable_word_time_offsets flag to the API, so that's what I was going to use for quail as well to keep it simple (although they don't have to be the same if we want to pick a different argument name). By default, this would be set to True since I think most people using this package will want that info.

to use it:

results = quail.decode_speech('file.wav')

where results is a list of tuples (word, onset, offset). if save=True, a parsed text file and raw response object will be saved out. The format i was thinking for the parsed file would be:

WORD1, ONSET1, OFFSET1 WORD2, ONSET2, OFFSET2 ...

Does this sound good to you? Anything that would make it easier that i might be missing?

@jeremymanning @KirstensGitHub @paxtonfitzpatrick @campbellfield

KirstensGitHub commented 6 years ago

this looks great to me! I was just asking @jeremymanning why nobody uses offset times in this kind of research.. cool that google API provides that info

jeremymanning commented 6 years ago

This looks good to me, too. A few questions/comments:

jeremymanning commented 6 years ago

Looping back to this issue— I think this is where we most recently discussed incorporating onset and offset times into the eggs. If we didn’t analyze the onset times this way, how did we do it?

Also noting for @andrewheusser: for the naturalistic extensions you’ve been working on, don’t we also need timing information?