expyfun.stimuli.crm_sentence#

expyfun.stimuli.crm_sentence(fs, sex, talker_num, callsign, color, number, ref_rms=0.01, ramp_dur=0.01, stereo=False, path=None)[source]#

Get a specific sentence from the hard drive.

Parameters:
fsfloat

The sampling rate of the corpus to load. You must have run expyfun.stimuli.crm_prepare_corpus() for that sampling rate first.

sexstr | int

The sex of the talker

talker_numstr | int

The zero-indexed talker number. Note that, obviously, male 2 is a different talker from female 2.

callsignstr | int

The callsign of the sentence.

colorstr | int

The color of the sentence.

numberstr | int

The number of the sentence. Note that due to zero-indexing, a value of '3' will cause the talker to say “three”, while a value of 3 will cause the talker to say “four” (see Notes below for more information).

ref_rmsfloat

The baseline RMS value to normalize the stimuli. Default is 0.01. Normalization is done at the corpus level, not at the sentence or talker.

ramp_durfloat

The duration (in seconds) of the onset-offset ramps. Use 0 for no ramp.

stereobool

Whether to return the data as stereo or not.

pathstr

The location of the stimulus directory. Defaults to the data directory where the raw CRM originals are stored.

Returns:
sentencearray

The requested sentence data.

Notes

Use expyfun.stimuli.crm_info() to see allowable values.

When getting a CRM sentence, you can use the full word (e.g., ‘male’, ‘green’), the first letter of that word (‘m’, ‘g’), or the index of that word in the list of options (0, 3). It should be noted that the index of '1' is 0, so care must be taken if using indices for the number argument.

Examples using expyfun.stimuli.crm_sentence#

Use the CRM corpus

Use the CRM corpus