autoCategories FFNet_Pattern_to_Categories (FFNet me, Pattern thee, int labeling) { try { if (! my outputCategories) { Melder_throw (U"The FFNet has no output categories."); } if (my nInputs != thy nx) { Melder_throw (U"The number of colums in the Pattern (", thy nx, U") should equal the number of inputs in the FFNet (", my nInputs, U")."); } if (! _Pattern_checkElements (thee)) { Melder_throw (U"All Pattern elements must be in the interval [0, 1].\nYou could use \"Formula...\" to scale the Pattern values first."); } autoCategories him = Categories_create (); for (long k = 1; k <= thy ny; k++) { FFNet_propagate (me, thy z[k], nullptr); long index = FFNet_getWinningUnit (me, labeling); autoDaata item = Data_copy ((Daata) my outputCategories -> item[index]); Collection_addItem_move (him.peek(), item.move()); } return him; } catch (MelderError) { Melder_throw (me, U": no Categories created."); } }
autoERPTier ERPTier_extractEventsWhereColumn_number (ERPTier me, Table table, long columnNumber, int which_Melder_NUMBER, double criterion) { try { Table_checkSpecifiedColumnNumberWithinRange (table, columnNumber); Table_numericize_Assert (table, columnNumber); // extraction should work even if cells are not defined if (my events -> size != table -> rows -> size) Melder_throw (me, U" & ", table, U": the number of rows in the table (", table -> rows -> size, U") doesn't match the number of events (", my events -> size, U")."); autoERPTier thee = Thing_new (ERPTier); Function_init (thee.peek(), my xmin, my xmax); thy numberOfChannels = my numberOfChannels; thy channelNames = NUMvector <char32 *> (1, thy numberOfChannels); for (long ichan = 1; ichan <= thy numberOfChannels; ichan ++) { thy channelNames [ichan] = Melder_dup (my channelNames [ichan]); } thy events = SortedSetOfDouble_create (); for (long ievent = 1; ievent <= my events -> size; ievent ++) { ERPPoint oldEvent = my event (ievent); TableRow row = table -> row (ievent); if (Melder_numberMatchesCriterion (row -> cells [columnNumber]. number, which_Melder_NUMBER, criterion)) { autoERPPoint newEvent = Data_copy (oldEvent); Collection_addItem_move (thy events.get(), newEvent.move()); } } if (thy events -> size == 0) { Melder_warning (U"No event matches criterion."); } return thee; } catch (MelderError) { Melder_throw (me, U": events not extracted."); } }
static autoCategoriesEditorInsert CategoriesEditorInsert_create (Thing boss, autoSimpleString str, int position) { try { autoCategoriesEditorInsert me = Thing_new (CategoriesEditorInsert); CategoriesEditorCommand_init (me.peek(), U"Insert", boss, CategoriesEditorInsert_execute, CategoriesEditorInsert_undo, 1, 1); my selection[1] = position; Collection_addItem_move (my categories.peek(), str.move()); return me; } catch (MelderError) { Melder_throw (U"CategoriesEditorInsert not created."); } }
void Regression_addParameter (Regression me, const char32 *label, double minimum, double maximum, double value) { try { autoRegressionParameter thee = Thing_new (RegressionParameter); thy label = Melder_dup (label); thy minimum = minimum; thy maximum = maximum; thy value = value; Collection_addItem_move (my parameters.get(), thee.move()); } catch (MelderError) { Melder_throw (me, U": parameter not added."); } }
autoCrossCorrelationTables CrossCorrelationTables_and_Diagonalizer_diagonalize (CrossCorrelationTables me, Diagonalizer thee) { try { autoCrossCorrelationTables him = CrossCorrelationTables_create (); for (long i = 1; i <= my size; i++) { CrossCorrelationTable item = (CrossCorrelationTable) my item[i]; autoCrossCorrelationTable ct = CrossCorrelationTable_and_Diagonalizer_diagonalize (item, thee); Collection_addItem_move (him.peek(), ct.move()); } return him; } catch (MelderError) { Melder_throw (U"CrossCorrelationTables not diagonalized."); } }
autoCategories OrderedOfString_to_Categories (OrderedOfString me) { try { autoCategories thee = Categories_create(); for (long i = 1; i <= my size; i++) { autoSimpleString item = Data_copy ( (SimpleString) my item [i]); Collection_addItem_move (thee.peek(), item.move()); } return thee; } catch (MelderError) { Melder_throw (me, U": not converted to Categories."); } }
static autoCategoriesEditorReplace CategoriesEditorReplace_create (Thing boss, autoSimpleString str, long *posList, long posCount) { try { autoCategoriesEditorReplace me = Thing_new (CategoriesEditorReplace); CategoriesEditorCommand_init (me.peek(), U"Replace", boss, CategoriesEditorReplace_execute, CategoriesEditorReplace_undo, posCount + 1, posCount); for (long i = 1; i <= posCount; i++) { my selection[i] = posList[i]; } Collection_addItem_move (my categories.peek(), str.move()); return me; } catch (MelderError) { Melder_throw (U"CategoriesEditorReplace not created."); } }
autoCategories TableOfReal_to_CategoriesColumn (TableOfReal me) { try { autoCategories thee = Categories_create (); for (long i = 1; i <= my numberOfColumns; i++) { if (my columnLabels[i]) { autoSimpleString s = SimpleString_create (my columnLabels[i]); Collection_addItem_move (thee.peek(), s.move()); } } return thee; } catch (MelderError) { Melder_throw (me, U": columnlabels not converted to Categories."); } }
autoCollection TextGrid_Sound_extractAllIntervals (TextGrid me, Sound sound, long tierNumber, int preserveTimes) { try { IntervalTier tier = TextGrid_checkSpecifiedTierIsIntervalTier (me, tierNumber); autoCollection collection = Collection_create (nullptr, tier -> numberOfIntervals ()); for (long iseg = 1; iseg <= tier -> numberOfIntervals (); iseg ++) { TextInterval segment = tier -> interval (iseg); autoSound interval = Sound_extractPart (sound, segment -> xmin, segment -> xmax, kSound_windowShape_RECTANGULAR, 1.0, preserveTimes); Thing_setName (interval.peek(), segment -> text ? segment -> text : U"untitled"); Collection_addItem_move (collection.peek(), interval.move()); } return collection; } catch (MelderError) { Melder_throw (me, U" & ", sound, U": intervals not extracted."); } }
void VocalTractTier_addVocalTract_copy (VocalTractTier me, double time, VocalTract vocaltract) { try { autoVocalTractPoint thee = VocalTract_to_VocalTractPoint (vocaltract, time); if (my d_vocalTracts -> size > 0) { VocalTractPoint vtp = (VocalTractPoint) my d_vocalTracts -> item[1]; long numberOfSections = vtp -> d_vocalTract -> nx; if (numberOfSections != vocaltract -> nx) { Melder_throw (U"The number of sections must be equal to ", numberOfSections, U"."); } } Collection_addItem_move (my d_vocalTracts.get(), thee.move()); } catch (MelderError) { Melder_throw (me, U": no VocalTract added."); } }
autoCategories Strings_to_Categories (Strings me) { try { if (my numberOfStrings < 1) { Melder_throw (U"Empty strings."); } autoCategories thee = Thing_new (Categories); Categories_init (thee.peek(), my numberOfStrings); for (long i = 1; i <= my numberOfStrings; i++) { autoSimpleString s = SimpleString_create (my strings[i]); Collection_addItem_move (thee.peek(), s.move()); } return thee; } catch (MelderError) { Melder_throw (me, U": not converted."); } }
autoFormantTier Formant_downto_FormantTier (Formant me) { try { autoFormantTier thee = FormantTier_create (my xmin, my xmax); for (long i = 1; i <= my nx; i ++) { Formant_Frame frame = & my d_frames [i]; autoFormantPoint point = FormantPoint_create (Sampled_indexToX (me, i)); point -> numberOfFormants = frame -> nFormants > 10 ? 10 : frame -> nFormants; for (long j = 1; j <= point -> numberOfFormants; j ++) { Formant_Formant pair = & frame -> formant [j]; point -> formant [j-1] = pair -> frequency; point -> bandwidth [j-1] = pair -> bandwidth; } Collection_addItem_move (thy points, point.move()); } return thee; } catch (MelderError) { Melder_throw (me, U": not converted to FormantTier."); } }
/* * Generate n different cct's that have a common diagonalizer. */ autoCrossCorrelationTables CrossCorrelationTables_createTestSet (long dimension, long n, int firstPositiveDefinite, double sigma) { try { // Start with a square matrix with random gaussian elements and make its singular value decomposition UDV' // The V matrix will be the common diagonalizer matrix that we use. autoNUMmatrix<double> d (1, dimension, 1, dimension); for (long i = 1; i <= dimension; i++) { // Generate the rotation matrix for (long j = 1; j <= dimension; j++) { d[i][j] = NUMrandomGauss (0, 1); } } autoNUMmatrix<double> v (1, dimension, 1, dimension); autoSVD svd = SVD_create_d (d.peek(), dimension, dimension); autoCrossCorrelationTables me = CrossCorrelationTables_create (); for (long i = 1; i <= dimension; i++) { for (long j = 1; j <= dimension; j++) { d[i][j] = 0; } } // Start with a diagonal matrix D and calculate V'DV for (long k = 1; k <= n; k++) { autoCrossCorrelationTable ct = CrossCorrelationTable_create (dimension); double low = k == 1 && firstPositiveDefinite ? 0.1 : -1; for (long i = 1; i <= dimension; i++) { d[i][i] = NUMrandomUniform (low, 1); } for (long i = 1; i <= dimension; i++) { for (long j = 1; j <= dimension; j++) { v[i][j] = NUMrandomGauss (svd -> v[i][j], sigma); } } // we need V'DV, however our V has eigenvectors row-wise -> VDV' NUMdmatrices_multiply_VCVp (ct -> data, v.peek(), dimension, dimension, d.peek(), 1); Collection_addItem_move (me.peek(), ct.move()); } return me; } catch (MelderError) { Melder_throw (U"CrossCorrelationTables test set not created."); } }
static autoERPTier EEG_PointProcess_to_ERPTier (EEG me, PointProcess events, double fromTime, double toTime) { try { autoERPTier thee = Thing_new (ERPTier); Function_init (thee.peek(), fromTime, toTime); thy numberOfChannels = my numberOfChannels - EEG_getNumberOfExtraSensors (me); Melder_assert (thy numberOfChannels > 0); thy channelNames = NUMvector <char32 *> (1, thy numberOfChannels); for (long ichan = 1; ichan <= thy numberOfChannels; ichan ++) { thy channelNames [ichan] = Melder_dup (my channelNames [ichan]); } long numberOfEvents = events -> nt; thy events = SortedSetOfDouble_create (); double soundDuration = toTime - fromTime; double samplingPeriod = my sound -> dx; long numberOfSamples = (long) floor (soundDuration / samplingPeriod) + 1; if (numberOfSamples < 1) Melder_throw (U"Time window too short."); double midTime = 0.5 * (fromTime + toTime); double soundPhysicalDuration = numberOfSamples * samplingPeriod; double firstTime = midTime - 0.5 * soundPhysicalDuration + 0.5 * samplingPeriod; // distribute the samples evenly over the time domain for (long ievent = 1; ievent <= numberOfEvents; ievent ++) { double eegEventTime = events -> t [ievent]; autoERPPoint event = Thing_new (ERPPoint); event -> number = eegEventTime; event -> erp = Sound_create (thy numberOfChannels, fromTime, toTime, numberOfSamples, samplingPeriod, firstTime); double erpEventTime = 0.0; double eegSample = 1 + (eegEventTime - my sound -> x1) / samplingPeriod; double erpSample = 1 + (erpEventTime - firstTime) / samplingPeriod; long sampleDifference = lround (eegSample - erpSample); for (long ichannel = 1; ichannel <= thy numberOfChannels; ichannel ++) { for (long isample = 1; isample <= numberOfSamples; isample ++) { long jsample = isample + sampleDifference; event -> erp -> z [ichannel] [isample] = jsample < 1 || jsample > my sound -> nx ? 0.0 : my sound -> z [ichannel] [jsample]; } } Collection_addItem_move (thy events.get(), event.move()); } return thee; } catch (MelderError) { Melder_throw (me, U": ERP analysis not performed."); } }
autoFilesInMemory FilesInMemory_createFromDirectoryContents (const char32 *dirpath, const char32 *fileGlobber) { try { structMelderDir parent { { 0 } }; Melder_pathToDir (dirpath, &parent); autoStrings thee = Strings_createAsFileList (Melder_cat (dirpath, U"/", fileGlobber)); if (thy numberOfStrings < 1) { Melder_throw (U"No files found."); } autoFilesInMemory me = FilesInMemory_create (); for (long i = 1; i <= thy numberOfStrings; i++) { structMelderFile file = { 0 }; MelderDir_getFile (&parent, thy strings[i], &file); autoFileInMemory fim = FileInMemory_create (&file); Collection_addItem_move (me.peek(), fim.move()); } return me; } catch (MelderError) { Melder_throw (U"FilesInMemory not created from directory \"", dirpath, U"\" for files that match \"", fileGlobber, U"\"."); } }
autoCollection TextGrid_Sound_extractIntervalsWhere (TextGrid me, Sound sound, long tierNumber, int comparison_Melder_STRING, const char32 *text, int preserveTimes) { try { IntervalTier tier = TextGrid_checkSpecifiedTierIsIntervalTier (me, tierNumber); autoCollection collection = Collection_create (nullptr, tier -> numberOfIntervals ()); long count = 0; for (long iseg = 1; iseg <= tier -> numberOfIntervals (); iseg ++) { TextInterval segment = tier -> interval (iseg); if (Melder_stringMatchesCriterion (segment -> text, comparison_Melder_STRING, text)) { autoSound interval = Sound_extractPart (sound, segment -> xmin, segment -> xmax, kSound_windowShape_RECTANGULAR, 1.0, preserveTimes); Thing_setName (interval.peek(), Melder_cat (sound -> name ? sound -> name : U"", U"_", text, U"_", ++ count)); Collection_addItem_move (collection.peek(), interval.move()); } } if (collection -> size == 0) Melder_warning (U"No label that ", kMelder_string_getText (comparison_Melder_STRING), U" the text \"", text, U"\" was found."); return collection; } catch (MelderError) { Melder_throw (me, U" & ", sound, U": intervals not extracted."); } }
autoStringsIndex Strings_to_StringsIndex (Strings me) { try { autoStringsIndex thee = StringsIndex_create (my numberOfStrings); autoPermutation sorted = Strings_to_Permutation (me, 1); long numberOfClasses = 0; char32 *strings = nullptr; for (long i = 1; i <= sorted -> numberOfElements; i++) { long index = sorted -> p[i]; char32 *stringsi = my strings[index]; if (i == 1 || Melder_cmp (strings, stringsi) != 0) { numberOfClasses++; autoSimpleString him = SimpleString_create (stringsi); Collection_addItem_move (thy classes.peek(), him.move()); strings = stringsi; } thy classIndex[index] = numberOfClasses; } return thee; } catch (MelderError) { Melder_throw (me, U": no StringsIndex created."); } }
autoCrossCorrelationTables Sound_to_CrossCorrelationTables (Sound me, double startTime, double endTime, double lagStep, long ncovars) { try { if (lagStep < my dx) { lagStep = my dx; } if (endTime <= startTime) { startTime = my xmin; endTime = my xmax; } if (startTime + ncovars * lagStep >= endTime) { Melder_throw (U"Lag time too large."); } autoCrossCorrelationTables thee = CrossCorrelationTables_create (); for (long i = 1; i <= ncovars; i++) { double lag = (i - 1) * lagStep; autoCrossCorrelationTable ct = Sound_to_CrossCorrelationTable (me, startTime, endTime, lag); Collection_addItem_move (thee.peek(), ct.move()); } return thee; } catch (MelderError) { Melder_throw (me, U": no CrossCorrelationTables created."); } }
autoFormantTier Formant_PointProcess_to_FormantTier (Formant me, PointProcess pp) { try { autoFormantTier temp = Formant_downto_FormantTier (me); autoFormantTier thee = FormantTier_create (pp -> xmin, pp -> xmax); for (long ipoint = 1; ipoint <= pp -> nt; ipoint ++) { double time = pp -> t [ipoint]; autoFormantPoint point = FormantPoint_create (time); long iformant = 1; for (; iformant <= 10; iformant ++) { double value = FormantTier_getValueAtTime (temp.peek(), iformant, time); if (value == NUMundefined) break; point -> formant [iformant-1] = value; value = FormantTier_getBandwidthAtTime (temp.peek(), iformant, time); Melder_assert (value != NUMundefined); point -> bandwidth [iformant-1] = value; } point -> numberOfFormants = iformant - 1; Collection_addItem_move (thy points, point.move()); } return thee; } catch (MelderError) { Melder_throw (me, U" & ", pp, U": not converted to FormantTier."); } }
void PairDistribution_add (PairDistribution me, const char32 *string1, const char32 *string2, double weight) { autoPairProbability pair = PairProbability_create (string1, string2, weight); Collection_addItem_move (my pairs.get(), pair.move()); }
autoFilesInMemory create_espeakdata_variants () { try { autoFilesInMemory me = FilesInMemory_create (); static unsigned char espeakdata_variants1_data[94] = { 108, 97, 110, 103, 117, 97, 103, 101, 32, 118, 97, 114, 105, 97, 110, 116, 10, 110, 97, 109, 101, 32, 99, 114, 111, 97, 107, 10, 103, 101, 110, 100, 101, 114, 32, 109, 97, 108, 101, 32, 55, 48, 10, 10, 112, 105, 116, 99, 104, 32, 56, 53, 32, 49, 49, 55, 10, 102, 108, 117, 116, 116, 101, 114, 32, 50, 48, 10, 10, 102, 111, 114, 109, 97, 110, 116, 32, 48, 32, 49, 48, 48, 32, 56, 48, 32, 49, 49, 48, 10, 10, 10, 10, 0}; autoFileInMemory espeakdata_variants1 = FileInMemory_createWithData (93, reinterpret_cast<const char *> (&espeakdata_variants1_data), U"/home/david/praat/src/espeak-work/espeak-1.46.27/espeak-data/voices/!v/croak", U"croak"); Collection_addItem_move (me.peek(), espeakdata_variants1.move()); static unsigned char espeakdata_variants2_data[325] = { 108, 97, 110, 103, 117, 97, 103, 101, 32, 118, 97, 114, 105, 97, 110, 116, 10, 110, 97, 109, 101, 32, 102, 101, 109, 97, 108, 101, 49, 10, 103, 101, 110, 100, 101, 114, 32, 102, 101, 109, 97, 108, 101, 32, 55, 48, 10, 10, 112, 105, 116, 99, 104, 32, 49, 52, 48, 32, 50, 48, 48, 10, 102, 108, 117, 116, 116, 101, 114, 32, 56, 10, 114, 111, 117, 103, 104, 110, 101, 115, 115, 32, 52, 10, 102, 111, 114, 109, 97, 110, 116, 32, 48, 32, 49, 49, 53, 32, 32, 56, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 49, 32, 49, 50, 48, 32, 32, 56, 48, 32, 49, 56, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 50, 32, 49, 48, 48, 32, 32, 55, 48, 32, 49, 53, 48, 32, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 51, 32, 49, 49, 53, 32, 32, 55, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 52, 32, 49, 49, 48, 32, 32, 56, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 53, 32, 49, 49, 48, 32, 32, 57, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 54, 32, 49, 48, 53, 32, 32, 56, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 55, 32, 49, 49, 48, 32, 32, 55, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 56, 32, 49, 49, 48, 32, 32, 55, 48, 32, 49, 53, 48, 10, 10, 115, 116, 114, 101, 115, 115, 65, 100, 100, 32, 45, 49, 48, 32, 45, 49, 48, 32, 45, 50, 48, 32, 45, 50, 48, 32, 48, 32, 48, 32, 52, 48, 32, 54, 48, 10, 0}; autoFileInMemory espeakdata_variants2 = FileInMemory_createWithData (324, reinterpret_cast<const char *> (&espeakdata_variants2_data), U"/home/david/praat/src/espeak-work/espeak-1.46.27/espeak-data/voices/!v/f1", U"f1"); Collection_addItem_move (me.peek(), espeakdata_variants2.move()); static unsigned char espeakdata_variants3_data[358] = { 108, 97, 110, 103, 117, 97, 103, 101, 32, 118, 97, 114, 105, 97, 110, 116, 10, 110, 97, 109, 101, 32, 102, 101, 109, 97, 108, 101, 50, 10, 103, 101, 110, 100, 101, 114, 32, 102, 101, 109, 97, 108, 101, 10, 10, 112, 105, 116, 99, 104, 32, 49, 52, 50, 32, 50, 50, 48, 10, 114, 111, 117, 103, 104, 110, 101, 115, 115, 32, 51, 10, 10, 102, 111, 114, 109, 97, 110, 116, 32, 48, 32, 49, 48, 53, 32, 32, 56, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 49, 32, 49, 49, 48, 32, 32, 56, 48, 32, 49, 54, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 50, 32, 49, 49, 48, 32, 32, 55, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 51, 32, 49, 49, 48, 32, 32, 55, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 52, 32, 49, 49, 53, 32, 32, 56, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 53, 32, 49, 49, 53, 32, 32, 56, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 54, 32, 49, 49, 48, 32, 32, 55, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 55, 32, 49, 49, 48, 32, 32, 55, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 56, 32, 49, 49, 48, 32, 32, 55, 48, 32, 49, 53, 48, 10, 10, 115, 116, 114, 101, 115, 115, 65, 100, 100, 32, 48, 32, 48, 32, 45, 49, 48, 32, 45, 49, 48, 32, 48, 32, 48, 32, 49, 48, 32, 52, 48, 10, 98, 114, 101, 97, 116, 104, 32, 48, 32, 50, 32, 51, 32, 51, 32, 51, 32, 51, 32, 51, 32, 50, 10, 101, 99, 104, 111, 32, 49, 52, 48, 32, 49, 48, 10, 99, 111, 110, 115, 111, 110, 97, 110, 116, 115, 32, 49, 50, 53, 32, 49, 50, 53, 10, 0}; autoFileInMemory espeakdata_variants3 = FileInMemory_createWithData (357, reinterpret_cast<const char *> (&espeakdata_variants3_data), U"/home/david/praat/src/espeak-work/espeak-1.46.27/espeak-data/voices/!v/f2", U"f2"); Collection_addItem_move (me.peek(), espeakdata_variants3.move()); static unsigned char espeakdata_variants4_data[376] = { 108, 97, 110, 103, 117, 97, 103, 101, 32, 118, 97, 114, 105, 97, 110, 116, 10, 110, 97, 109, 101, 32, 102, 101, 109, 97, 108, 101, 51, 10, 103, 101, 110, 100, 101, 114, 32, 102, 101, 109, 97, 108, 101, 10, 10, 112, 105, 116, 99, 104, 32, 49, 52, 48, 32, 50, 52, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 48, 32, 49, 48, 53, 32, 32, 56, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 49, 32, 49, 50, 48, 32, 32, 55, 53, 32, 49, 53, 48, 32, 45, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 50, 32, 49, 51, 53, 32, 32, 55, 48, 32, 49, 53, 48, 32, 45, 50, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 51, 32, 49, 50, 53, 32, 32, 56, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 52, 32, 49, 50, 53, 32, 32, 56, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 53, 32, 49, 50, 53, 32, 32, 56, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 54, 32, 49, 50, 48, 32, 32, 55, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 55, 32, 49, 49, 48, 32, 32, 55, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 56, 32, 49, 49, 48, 32, 32, 55, 48, 32, 49, 53, 48, 10, 10, 115, 116, 114, 101, 115, 115, 65, 109, 112, 32, 49, 56, 32, 49, 56, 32, 50, 48, 32, 50, 48, 32, 50, 48, 32, 50, 48, 32, 50, 48, 32, 50, 48, 10, 47, 47, 98, 114, 101, 97, 116, 104, 32, 48, 32, 50, 32, 52, 32, 52, 32, 52, 32, 52, 32, 52, 32, 52, 10, 98, 114, 101, 97, 116, 104, 32, 48, 32, 50, 32, 51, 32, 51, 32, 51, 32, 51, 32, 51, 32, 50, 10, 101, 99, 104, 111, 32, 49, 50, 48, 32, 49, 48, 10, 114, 111, 117, 103, 104, 110, 101, 115, 115, 32, 52, 10, 10, 10, 0}; autoFileInMemory espeakdata_variants4 = FileInMemory_createWithData (375, reinterpret_cast<const char *> (&espeakdata_variants4_data), U"/home/david/praat/src/espeak-work/espeak-1.46.27/espeak-data/voices/!v/f3", U"f3"); Collection_addItem_move (me.peek(), espeakdata_variants4.move()); static unsigned char espeakdata_variants5_data[351] = { 108, 97, 110, 103, 117, 97, 103, 101, 32, 118, 97, 114, 105, 97, 110, 116, 10, 110, 97, 109, 101, 32, 102, 101, 109, 97, 108, 101, 52, 10, 103, 101, 110, 100, 101, 114, 32, 102, 101, 109, 97, 108, 101, 10, 10, 101, 99, 104, 111, 32, 49, 51, 48, 32, 49, 53, 10, 112, 105, 116, 99, 104, 32, 49, 52, 50, 32, 50, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 48, 32, 49, 50, 48, 32, 32, 56, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 49, 32, 49, 49, 53, 32, 32, 56, 48, 32, 49, 54, 48, 32, 45, 50, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 50, 32, 49, 51, 48, 32, 32, 55, 53, 32, 49, 53, 48, 32, 45, 50, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 51, 32, 49, 50, 51, 32, 32, 55, 53, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 52, 32, 49, 50, 53, 32, 32, 56, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 53, 32, 49, 50, 53, 32, 32, 56, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 54, 32, 49, 49, 48, 32, 32, 56, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 55, 32, 49, 49, 48, 32, 32, 55, 53, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 56, 32, 49, 49, 48, 32, 32, 55, 53, 32, 49, 53, 48, 10, 10, 115, 116, 114, 101, 115, 115, 65, 100, 100, 32, 45, 50, 48, 32, 45, 50, 48, 32, 45, 50, 48, 32, 45, 50, 48, 32, 48, 32, 48, 32, 50, 48, 32, 49, 50, 48, 10, 115, 116, 114, 101, 115, 115, 65, 109, 112, 32, 49, 56, 32, 49, 54, 32, 50, 48, 32, 50, 48, 32, 50, 48, 32, 50, 48, 32, 50, 48, 32, 50, 48, 10, 0}; autoFileInMemory espeakdata_variants5 = FileInMemory_createWithData (350, reinterpret_cast<const char *> (&espeakdata_variants5_data), U"/home/david/praat/src/espeak-work/espeak-1.46.27/espeak-data/voices/!v/f4", U"f4"); Collection_addItem_move (me.peek(), espeakdata_variants5.move()); static unsigned char espeakdata_variants6_data[426] = { 108, 97, 110, 103, 117, 97, 103, 101, 32, 118, 97, 114, 105, 97, 110, 116, 32, 10, 110, 97, 109, 101, 32, 102, 101, 109, 97, 108, 101, 53, 10, 103, 101, 110, 100, 101, 114, 32, 102, 101, 109, 97, 108, 101, 32, 10, 10, 112, 105, 116, 99, 104, 32, 49, 54, 48, 32, 50, 50, 56, 10, 114, 111, 117, 103, 104, 110, 101, 115, 115, 32, 48, 10, 10, 102, 111, 114, 109, 97, 110, 116, 32, 48, 32, 49, 48, 53, 32, 32, 56, 48, 32, 49, 53, 48, 32, 10, 102, 111, 114, 109, 97, 110, 116, 32, 49, 32, 49, 49, 48, 32, 32, 56, 48, 32, 49, 54, 48, 32, 10, 102, 111, 114, 109, 97, 110, 116, 32, 50, 32, 49, 49, 48, 32, 32, 55, 48, 32, 49, 53, 48, 32, 10, 102, 111, 114, 109, 97, 110, 116, 32, 51, 32, 49, 49, 48, 32, 32, 55, 48, 32, 49, 53, 48, 32, 10, 102, 111, 114, 109, 97, 110, 116, 32, 52, 32, 49, 49, 53, 32, 32, 56, 48, 32, 50, 48, 48, 32, 10, 102, 111, 114, 109, 97, 110, 116, 32, 53, 32, 49, 49, 53, 32, 32, 56, 48, 32, 49, 48, 48, 32, 10, 102, 111, 114, 109, 97, 110, 116, 32, 54, 32, 49, 49, 48, 32, 32, 55, 48, 32, 49, 53, 48, 32, 10, 102, 111, 114, 109, 97, 110, 116, 32, 55, 32, 49, 49, 48, 32, 32, 55, 48, 32, 49, 48, 48, 32, 10, 102, 111, 114, 109, 97, 110, 116, 32, 56, 32, 49, 49, 48, 32, 32, 55, 48, 32, 49, 53, 48, 32, 10, 10, 115, 116, 114, 101, 115, 115, 65, 100, 100, 32, 48, 32, 48, 32, 45, 49, 48, 32, 45, 49, 48, 32, 48, 32, 48, 32, 49, 48, 32, 52, 48, 32, 10, 98, 114, 101, 97, 116, 104, 32, 48, 32, 52, 32, 32, 54, 32, 32, 32, 54, 32, 32, 32, 54, 32, 32, 32, 54, 32, 32, 48, 32, 49, 48, 32, 10, 101, 99, 104, 111, 32, 49, 52, 48, 32, 49, 48, 32, 10, 118, 111, 105, 99, 105, 110, 103, 32, 55, 53, 32, 10, 99, 111, 110, 115, 111, 110, 97, 110, 116, 115, 32, 49, 53, 48, 32, 49, 53, 48, 10, 98, 114, 101, 97, 116, 104, 119, 32, 49, 53, 48, 32, 49, 53, 48, 32, 50, 48, 48, 32, 50, 48, 48, 32, 52, 48, 48, 32, 52, 48, 48, 32, 10, 0}; autoFileInMemory espeakdata_variants6 = FileInMemory_createWithData (425, reinterpret_cast<const char *> (&espeakdata_variants6_data), U"/home/david/praat/src/espeak-work/espeak-1.46.27/espeak-data/voices/!v/f5", U"f5"); Collection_addItem_move (me.peek(), espeakdata_variants6.move()); static unsigned char espeakdata_variants7_data[39] = { 108, 97, 110, 103, 117, 97, 103, 101, 32, 118, 97, 114, 105, 97, 110, 116, 10, 110, 97, 109, 101, 32, 107, 108, 97, 116, 116, 10, 107, 108, 97, 116, 116, 32, 49, 10, 32, 10, 0}; autoFileInMemory espeakdata_variants7 = FileInMemory_createWithData (38, reinterpret_cast<const char *> (&espeakdata_variants7_data), U"/home/david/praat/src/espeak-work/espeak-1.46.27/espeak-data/voices/!v/klatt", U"klatt"); Collection_addItem_move (me.peek(), espeakdata_variants7.move()); static unsigned char espeakdata_variants8_data[39] = { 108, 97, 110, 103, 117, 97, 103, 101, 32, 118, 97, 114, 105, 97, 110, 116, 10, 110, 97, 109, 101, 32, 107, 108, 97, 116, 116, 50, 10, 107, 108, 97, 116, 116, 32, 50, 10, 10, 0}; autoFileInMemory espeakdata_variants8 = FileInMemory_createWithData (38, reinterpret_cast<const char *> (&espeakdata_variants8_data), U"/home/david/praat/src/espeak-work/espeak-1.46.27/espeak-data/voices/!v/klatt2", U"klatt2"); Collection_addItem_move (me.peek(), espeakdata_variants8.move()); static unsigned char espeakdata_variants9_data[40] = { 108, 97, 110, 103, 117, 97, 103, 101, 32, 118, 97, 114, 105, 97, 110, 116, 10, 110, 97, 109, 101, 32, 107, 108, 97, 116, 116, 51, 10, 107, 108, 97, 116, 116, 32, 51, 10, 32, 10, 0}; autoFileInMemory espeakdata_variants9 = FileInMemory_createWithData (39, reinterpret_cast<const char *> (&espeakdata_variants9_data), U"/home/david/praat/src/espeak-work/espeak-1.46.27/espeak-data/voices/!v/klatt3", U"klatt3"); Collection_addItem_move (me.peek(), espeakdata_variants9.move()); static unsigned char espeakdata_variants10_data[336] = { 108, 97, 110, 103, 117, 97, 103, 101, 32, 118, 97, 114, 105, 97, 110, 116, 10, 110, 97, 109, 101, 32, 109, 97, 108, 101, 49, 10, 103, 101, 110, 100, 101, 114, 32, 109, 97, 108, 101, 32, 55, 48, 10, 10, 112, 105, 116, 99, 104, 32, 55, 53, 32, 49, 48, 57, 10, 102, 108, 117, 116, 116, 101, 114, 32, 53, 10, 114, 111, 117, 103, 104, 110, 101, 115, 115, 32, 52, 10, 99, 111, 110, 115, 111, 110, 97, 110, 116, 115, 32, 56, 48, 32, 49, 48, 48, 10, 10, 102, 111, 114, 109, 97, 110, 116, 32, 48, 32, 32, 57, 56, 32, 49, 48, 48, 32, 49, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 49, 32, 32, 57, 55, 32, 49, 48, 48, 32, 49, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 50, 32, 32, 57, 55, 32, 32, 57, 53, 32, 49, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 51, 32, 32, 57, 55, 32, 32, 57, 53, 32, 49, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 52, 32, 32, 57, 55, 32, 32, 56, 53, 32, 49, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 53, 32, 49, 48, 53, 32, 32, 56, 48, 32, 49, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 54, 32, 32, 57, 53, 32, 32, 56, 48, 32, 49, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 55, 32, 49, 48, 48, 32, 49, 48, 48, 32, 49, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 56, 32, 49, 48, 48, 32, 49, 48, 48, 32, 49, 48, 48, 10, 10, 47, 47, 115, 116, 114, 101, 115, 115, 65, 100, 100, 32, 45, 49, 48, 32, 45, 49, 48, 32, 45, 50, 48, 32, 45, 50, 48, 32, 48, 32, 48, 32, 52, 48, 32, 55, 48, 10, 0}; autoFileInMemory espeakdata_variants10 = FileInMemory_createWithData (335, reinterpret_cast<const char *> (&espeakdata_variants10_data), U"/home/david/praat/src/espeak-work/espeak-1.46.27/espeak-data/voices/!v/m1", U"m1"); Collection_addItem_move (me.peek(), espeakdata_variants10.move()); static unsigned char espeakdata_variants11_data[265] = { 108, 97, 110, 103, 117, 97, 103, 101, 32, 118, 97, 114, 105, 97, 110, 116, 10, 110, 97, 109, 101, 32, 109, 97, 108, 101, 50, 10, 103, 101, 110, 100, 101, 114, 32, 109, 97, 108, 101, 10, 10, 112, 105, 116, 99, 104, 32, 56, 56, 32, 49, 49, 53, 10, 101, 99, 104, 111, 32, 49, 51, 48, 32, 49, 53, 10, 102, 111, 114, 109, 97, 110, 116, 32, 48, 32, 49, 48, 48, 32, 32, 56, 48, 32, 49, 50, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 49, 32, 32, 57, 48, 32, 32, 56, 53, 32, 49, 50, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 50, 32, 49, 49, 48, 32, 32, 56, 53, 32, 49, 50, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 51, 32, 49, 48, 53, 32, 32, 57, 48, 32, 49, 50, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 52, 32, 49, 48, 48, 32, 32, 57, 48, 32, 49, 50, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 53, 32, 49, 48, 48, 32, 32, 57, 48, 32, 49, 50, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 54, 32, 49, 48, 48, 32, 32, 57, 48, 32, 49, 50, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 55, 32, 49, 48, 48, 32, 32, 57, 48, 32, 49, 50, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 56, 32, 49, 48, 48, 32, 32, 57, 48, 32, 49, 50, 48, 10, 0}; autoFileInMemory espeakdata_variants11 = FileInMemory_createWithData (264, reinterpret_cast<const char *> (&espeakdata_variants11_data), U"/home/david/praat/src/espeak-work/espeak-1.46.27/espeak-data/voices/!v/m2", U"m2"); Collection_addItem_move (me.peek(), espeakdata_variants11.move()); static unsigned char espeakdata_variants12_data[286] = { 108, 97, 110, 103, 117, 97, 103, 101, 32, 118, 97, 114, 105, 97, 110, 116, 10, 110, 97, 109, 101, 32, 109, 97, 108, 101, 51, 10, 103, 101, 110, 100, 101, 114, 32, 109, 97, 108, 101, 10, 10, 112, 105, 116, 99, 104, 32, 56, 48, 32, 49, 50, 50, 10, 102, 111, 114, 109, 97, 110, 116, 32, 48, 32, 49, 48, 48, 32, 49, 48, 48, 32, 49, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 49, 32, 32, 57, 54, 32, 32, 57, 55, 32, 49, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 50, 32, 32, 57, 54, 32, 32, 57, 55, 32, 49, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 51, 32, 32, 57, 54, 32, 49, 48, 51, 32, 49, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 52, 32, 32, 57, 53, 32, 49, 48, 51, 32, 49, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 53, 32, 32, 57, 53, 32, 49, 48, 51, 32, 49, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 54, 32, 49, 48, 48, 32, 49, 48, 48, 32, 49, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 55, 32, 49, 48, 48, 32, 49, 48, 48, 32, 49, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 56, 32, 49, 48, 48, 32, 49, 48, 48, 32, 49, 48, 48, 10, 10, 115, 116, 114, 101, 115, 115, 65, 100, 100, 32, 49, 48, 32, 49, 48, 32, 48, 32, 48, 32, 48, 32, 48, 32, 45, 51, 48, 32, 45, 51, 48, 10, 0}; autoFileInMemory espeakdata_variants12 = FileInMemory_createWithData (285, reinterpret_cast<const char *> (&espeakdata_variants12_data), U"/home/david/praat/src/espeak-work/espeak-1.46.27/espeak-data/voices/!v/m3", U"m3"); Collection_addItem_move (me.peek(), espeakdata_variants12.move()); static unsigned char espeakdata_variants13_data[291] = { 108, 97, 110, 103, 117, 97, 103, 101, 32, 118, 97, 114, 105, 97, 110, 116, 10, 110, 97, 109, 101, 32, 109, 97, 108, 101, 52, 10, 103, 101, 110, 100, 101, 114, 32, 109, 97, 108, 101, 10, 10, 112, 105, 116, 99, 104, 32, 55, 48, 32, 49, 49, 48, 10, 10, 102, 111, 114, 109, 97, 110, 116, 32, 48, 32, 49, 48, 51, 32, 49, 48, 48, 32, 49, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 49, 32, 49, 48, 51, 32, 49, 48, 48, 32, 49, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 50, 32, 49, 48, 51, 32, 49, 48, 48, 32, 49, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 51, 32, 49, 48, 51, 32, 49, 48, 48, 32, 49, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 52, 32, 49, 48, 54, 32, 49, 48, 48, 32, 49, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 53, 32, 49, 48, 54, 32, 49, 48, 48, 32, 49, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 54, 32, 49, 48, 54, 32, 49, 48, 48, 32, 49, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 55, 32, 49, 48, 51, 32, 49, 48, 48, 32, 49, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 56, 32, 49, 48, 51, 32, 49, 48, 48, 32, 49, 48, 48, 10, 10, 115, 116, 114, 101, 115, 115, 65, 100, 100, 32, 45, 49, 48, 32, 45, 49, 48, 32, 45, 51, 48, 32, 45, 51, 48, 32, 48, 32, 48, 32, 54, 48, 32, 57, 48, 10, 0}; autoFileInMemory espeakdata_variants13 = FileInMemory_createWithData (290, reinterpret_cast<const char *> (&espeakdata_variants13_data), U"/home/david/praat/src/espeak-work/espeak-1.46.27/espeak-data/voices/!v/m4", U"m4"); Collection_addItem_move (me.peek(), espeakdata_variants13.move()); static unsigned char espeakdata_variants14_data[263] = { 108, 97, 110, 103, 117, 97, 103, 101, 32, 118, 97, 114, 105, 97, 110, 116, 10, 110, 97, 109, 101, 32, 109, 97, 108, 101, 53, 10, 103, 101, 110, 100, 101, 114, 32, 109, 97, 108, 101, 10, 10, 102, 111, 114, 109, 97, 110, 116, 32, 48, 32, 49, 48, 48, 32, 32, 56, 53, 32, 49, 51, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 49, 32, 32, 57, 48, 32, 32, 56, 53, 32, 49, 51, 48, 32, 32, 52, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 50, 32, 32, 56, 48, 32, 32, 56, 53, 32, 49, 51, 48, 32, 32, 51, 49, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 51, 32, 49, 48, 53, 32, 32, 56, 53, 32, 49, 51, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 52, 32, 49, 48, 53, 32, 32, 56, 53, 32, 49, 51, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 53, 32, 49, 48, 53, 32, 32, 56, 53, 32, 49, 51, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 54, 32, 49, 48, 53, 32, 32, 56, 53, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 55, 32, 49, 48, 53, 32, 32, 56, 53, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 56, 32, 49, 48, 53, 32, 32, 56, 53, 32, 49, 53, 48, 10, 10, 105, 110, 116, 111, 110, 97, 116, 105, 111, 110, 32, 50, 10, 0}; autoFileInMemory espeakdata_variants14 = FileInMemory_createWithData (262, reinterpret_cast<const char *> (&espeakdata_variants14_data), U"/home/david/praat/src/espeak-work/espeak-1.46.27/espeak-data/voices/!v/m5", U"m5"); Collection_addItem_move (me.peek(), espeakdata_variants14.move()); static unsigned char espeakdata_variants15_data[189] = { 108, 97, 110, 103, 117, 97, 103, 101, 32, 118, 97, 114, 105, 97, 110, 116, 10, 110, 97, 109, 101, 32, 109, 97, 108, 101, 54, 10, 103, 101, 110, 100, 101, 114, 32, 109, 97, 108, 101, 10, 10, 112, 105, 116, 99, 104, 32, 56, 50, 32, 49, 49, 55, 10, 10, 102, 111, 114, 109, 97, 110, 116, 32, 48, 32, 49, 48, 48, 32, 32, 57, 48, 32, 49, 50, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 49, 32, 49, 48, 48, 32, 32, 57, 48, 32, 49, 52, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 50, 32, 49, 48, 48, 32, 32, 55, 48, 32, 49, 52, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 51, 32, 49, 48, 48, 32, 32, 55, 53, 32, 49, 52, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 52, 32, 49, 48, 48, 32, 32, 56, 48, 32, 49, 52, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 53, 32, 49, 48, 48, 32, 32, 56, 48, 32, 49, 52, 48, 10, 10, 0}; autoFileInMemory espeakdata_variants15 = FileInMemory_createWithData (188, reinterpret_cast<const char *> (&espeakdata_variants15_data), U"/home/david/praat/src/espeak-work/espeak-1.46.27/espeak-data/voices/!v/m6", U"m6"); Collection_addItem_move (me.peek(), espeakdata_variants15.move()); static unsigned char espeakdata_variants16_data[255] = { 108, 97, 110, 103, 117, 97, 103, 101, 32, 118, 97, 114, 105, 97, 110, 116, 10, 110, 97, 109, 101, 32, 109, 97, 108, 101, 55, 10, 103, 101, 110, 100, 101, 114, 32, 109, 97, 108, 101, 10, 10, 112, 105, 116, 99, 104, 32, 32, 55, 53, 32, 49, 50, 53, 10, 10, 102, 111, 114, 109, 97, 110, 116, 32, 48, 32, 49, 48, 48, 32, 49, 50, 53, 32, 49, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 49, 32, 49, 48, 48, 32, 57, 48, 32, 56, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 50, 32, 49, 48, 48, 32, 55, 48, 32, 57, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 51, 32, 49, 48, 48, 32, 54, 48, 32, 57, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 52, 32, 49, 48, 48, 32, 54, 48, 32, 57, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 53, 32, 32, 55, 53, 32, 53, 48, 32, 57, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 54, 32, 32, 57, 48, 32, 53, 48, 32, 49, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 55, 32, 49, 48, 48, 32, 53, 48, 32, 49, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 56, 32, 49, 48, 48, 32, 53, 48, 32, 49, 48, 48, 10, 118, 111, 105, 99, 105, 110, 103, 32, 49, 53, 53, 10, 10, 0}; autoFileInMemory espeakdata_variants16 = FileInMemory_createWithData (254, reinterpret_cast<const char *> (&espeakdata_variants16_data), U"/home/david/praat/src/espeak-work/espeak-1.46.27/espeak-data/voices/!v/m7", U"m7"); Collection_addItem_move (me.peek(), espeakdata_variants16.move()); static unsigned char espeakdata_variants17_data[187] = { 108, 97, 110, 103, 117, 97, 103, 101, 32, 118, 97, 114, 105, 97, 110, 116, 10, 110, 97, 109, 101, 32, 119, 104, 105, 115, 112, 101, 114, 10, 103, 101, 110, 100, 101, 114, 32, 109, 97, 108, 101, 10, 10, 112, 105, 116, 99, 104, 32, 56, 50, 32, 49, 49, 55, 10, 102, 108, 117, 116, 116, 101, 114, 32, 50, 48, 10, 10, 102, 111, 114, 109, 97, 110, 116, 32, 48, 32, 49, 48, 48, 32, 32, 48, 32, 49, 48, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 49, 32, 49, 48, 48, 32, 56, 48, 32, 49, 48, 48, 10, 10, 118, 111, 105, 99, 105, 110, 103, 32, 49, 55, 10, 98, 114, 101, 97, 116, 104, 32, 32, 32, 55, 53, 32, 32, 55, 53, 32, 32, 53, 48, 32, 32, 52, 48, 32, 32, 49, 53, 32, 32, 49, 48, 10, 98, 114, 101, 97, 116, 104, 119, 32, 49, 53, 48, 32, 49, 53, 48, 32, 50, 48, 48, 32, 50, 48, 48, 32, 52, 48, 48, 32, 52, 48, 48, 10, 0}; autoFileInMemory espeakdata_variants17 = FileInMemory_createWithData (186, reinterpret_cast<const char *> (&espeakdata_variants17_data), U"/home/david/praat/src/espeak-work/espeak-1.46.27/espeak-data/voices/!v/whisper", U"whisper"); Collection_addItem_move (me.peek(), espeakdata_variants17.move()); static unsigned char espeakdata_variants18_data[393] = { 108, 97, 110, 103, 117, 97, 103, 101, 32, 118, 97, 114, 105, 97, 110, 116, 10, 110, 97, 109, 101, 32, 102, 101, 109, 97, 108, 101, 95, 119, 104, 105, 115, 112, 101, 114, 10, 103, 101, 110, 100, 101, 114, 32, 102, 101, 109, 97, 108, 101, 10, 10, 112, 105, 116, 99, 104, 32, 49, 54, 48, 32, 50, 50, 48, 10, 114, 111, 117, 103, 104, 110, 101, 115, 115, 32, 51, 10, 10, 102, 111, 114, 109, 97, 110, 116, 32, 48, 32, 49, 48, 53, 32, 32, 32, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 49, 32, 49, 49, 48, 32, 32, 52, 48, 32, 49, 54, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 50, 32, 49, 49, 48, 32, 32, 55, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 51, 32, 49, 49, 48, 32, 32, 55, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 52, 32, 49, 49, 53, 32, 32, 56, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 53, 32, 49, 49, 53, 32, 32, 56, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 54, 32, 49, 49, 48, 32, 32, 55, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 55, 32, 49, 49, 48, 32, 32, 55, 48, 32, 49, 53, 48, 10, 102, 111, 114, 109, 97, 110, 116, 32, 56, 32, 49, 49, 48, 32, 32, 55, 48, 32, 49, 53, 48, 10, 10, 115, 116, 114, 101, 115, 115, 65, 100, 100, 32, 48, 32, 48, 32, 45, 49, 48, 32, 45, 49, 48, 32, 48, 32, 48, 32, 49, 48, 32, 52, 48, 10, 10, 47, 47, 32, 119, 104, 105, 115, 112, 101, 114, 10, 118, 111, 105, 99, 105, 110, 103, 32, 50, 48, 10, 98, 114, 101, 97, 116, 104, 32, 55, 53, 32, 55, 53, 32, 53, 48, 32, 52, 48, 32, 49, 53, 32, 49, 48, 10, 98, 114, 101, 97, 116, 104, 119, 32, 49, 53, 48, 32, 49, 53, 48, 32, 50, 48, 48, 32, 50, 48, 48, 32, 52, 48, 48, 32, 52, 48, 48, 10, 32, 10, 0}; autoFileInMemory espeakdata_variants18 = FileInMemory_createWithData (392, reinterpret_cast<const char *> (&espeakdata_variants18_data), U"/home/david/praat/src/espeak-work/espeak-1.46.27/espeak-data/voices/!v/whisperf", U"whisperf"); Collection_addItem_move (me.peek(), espeakdata_variants18.move()); return me; } catch (MelderError) { Melder_throw (U"FilesInMemory not created."); } }
static void update (CategoriesEditor me, long from, long to, const long *select, long nSelect) { long size = ((Categories) my data) -> size; if (size == 0) { autoSimpleString str = SimpleString_create (CategoriesEditor_EMPTYLABEL); Collection_addItem_move ((Categories) my data, str.move()); update (me, 0, 0, nullptr, 0); return; } if (from == 0 && from == to) { from = 1; to = size; } if (from < 1 || from > size) { from = size; } if (to < 1 || to > size) { to = size; } if (from > to) { long ti = from; from = to; to = ti; } // Begin optimization: add the items from a table instead of separately. try { autostring32vector table (from, to); long itemCount = GuiList_getNumberOfItems (my list); for (long i = from; i <= to; i++) { char wcindex[20]; snprintf (wcindex,20, "%5ld ", i); table[i] = Melder_dup_f (Melder_cat (Melder_peek8to32 (wcindex), OrderedOfString_itemAtIndex_c ((OrderedOfString) my data, i))); } if (itemCount > size) { // some items have been removed from Categories? for (long j = itemCount; j > size; j --) { GuiList_deleteItem (my list, j); } itemCount = size; } if (to > itemCount) { for (long j = 1; j <= to - itemCount; j ++) { GuiList_insertItem (my list, table [itemCount + j], 0); } } if (from <= itemCount) { long n = (to < itemCount ? to : itemCount); for (long j = from; j <= n; j++) { GuiList_replaceItem (my list, table[j], j); } } } catch (MelderError) { throw; } // End of optimization // HIGHLIGHT GuiList_deselectAllItems (my list); if (size == 1) { /* the only item is always selected */ const char32 *catg = OrderedOfString_itemAtIndex_c ((OrderedOfString) my data, 1); GuiList_selectItem (my list, 1); updateWidgets (me); // instead of "notify". BUG? GuiText_setString (my text, catg); } else if (nSelect > 0) { // Select but postpone highlighting for (long i = 1; i <= nSelect; i++) { GuiList_selectItem (my list, select[i] > size ? size : select[i]); } } // VIEWPORT { long top = GuiList_getTopPosition (my list), bottom = GuiList_getBottomPosition (my list); long visible = bottom - top + 1; if (nSelect == 0) { top = my position - visible / 2; } else if (select[nSelect] < top) { // selection above visible area top = select[1]; } else if (select[1] > bottom) { // selection below visible area top = select[nSelect] - visible + 1; } else { long deltaTopPos = -1, nUpdate = to - from + 1; if ( (from == select[1] && to == select[nSelect]) || // Replace (nUpdate > 2 && nSelect == 1) /* Inserts */) { deltaTopPos = 0; } else if (nUpdate == nSelect + 1 && select[1] == from + 1) { // down deltaTopPos = 1; } top += deltaTopPos; } if (top + visible > size) { top = size - visible + 1; } if (top < 1) { top = 1; } GuiList_setTopPosition (my list, top); } }
void Label_addTier (Label me) { Collection_addItem_move (me, Tier_create (10)); }
void TextGrid_anySound_alignInterval (TextGrid me, Function anySound, long tierNumber, long intervalNumber, const char32 *languageName, bool includeWords, bool includePhonemes) { try { IntervalTier headTier = TextGrid_checkSpecifiedTierIsIntervalTier (me, tierNumber); if (intervalNumber < 1 || intervalNumber > headTier -> numberOfIntervals ()) Melder_throw (U"Interval ", intervalNumber, U" does not exist."); TextInterval interval = headTier -> interval (intervalNumber); if (! includeWords && ! includePhonemes) Melder_throw (U"Nothing to be done, because you asked neither for word alignment nor for phoneme alignment."); if (str32str (headTier -> name, U"/") ) Melder_throw (U"The current tier already has a slash (\"/\") in its name. Cannot create a word or phoneme tier from it."); autoSound part = anySound -> classInfo == classLongSound ? LongSound_extractPart (static_cast <LongSound> (anySound), interval -> xmin, interval -> xmax, true) : Sound_extractPart (static_cast <Sound> (anySound), interval -> xmin, interval -> xmax, kSound_windowShape_RECTANGULAR, 1.0, true); autoSpeechSynthesizer synthesizer = SpeechSynthesizer_create (languageName, U"default"); double silenceThreshold = -35, minSilenceDuration = 0.1, minSoundingDuration = 0.1; autoTextGrid analysis; if (! Melder_equ (interval -> text, U"")) { try { analysis = SpeechSynthesizer_and_Sound_and_TextInterval_align (synthesizer.peek(), part.peek(), interval, silenceThreshold, minSilenceDuration, minSoundingDuration); } catch (MelderError) { Melder_clearError (); // ignore all error messages from DTW and the like } } if (analysis.peek()) { /* * Clean up the analysis. */ Melder_assert (analysis -> xmin == interval -> xmin); Melder_assert (analysis -> xmax == interval -> xmax); Melder_assert (analysis -> numberOfTiers () == 4); Thing_cast (IntervalTier, analysisWordTier, analysis -> tier (3)); if (! IntervalTier_check (analysisWordTier)) Melder_throw (U"Analysis word tier out of order."); IntervalTier_removeEmptyIntervals (analysisWordTier, nullptr); Melder_assert (analysisWordTier -> xmax == analysis -> xmax); Melder_assert (analysisWordTier -> numberOfIntervals () >= 1); TextInterval firstInterval = analysisWordTier -> interval (1); TextInterval lastInterval = analysisWordTier -> interval (analysisWordTier -> numberOfIntervals ()); firstInterval -> xmin = analysis -> xmin; lastInterval -> xmax = analysis -> xmax; if (lastInterval -> xmax != analysis -> xmax) Melder_fatal (U"analysis ends at ", analysis -> xmax, U", but last interval at ", lastInterval -> xmax, U" seconds"); if (! IntervalTier_check (analysisWordTier)) Melder_throw (U"Analysis word tier out of order (2)."); Thing_cast (IntervalTier, analysisPhonemeTier, analysis -> tier (4)); if (! IntervalTier_check (analysisPhonemeTier)) Melder_throw (U"Analysis phoneme tier out of order."); IntervalTier_removeEmptyIntervals (analysisPhonemeTier, analysisWordTier); Melder_assert (analysisPhonemeTier -> xmax == analysis -> xmax); Melder_assert (analysisPhonemeTier -> numberOfIntervals () >= 1); firstInterval = analysisPhonemeTier -> interval (1); lastInterval = analysisPhonemeTier -> interval (analysisPhonemeTier -> numberOfIntervals ()); firstInterval -> xmin = analysis -> xmin; lastInterval -> xmax = analysis -> xmax; Melder_assert (lastInterval -> xmax == analysis -> xmax); if (! IntervalTier_check (analysisPhonemeTier)) Melder_throw (U"Analysis phoneme tier out of order (2)."); } long wordTierNumber = 0, phonemeTierNumber = 0; IntervalTier wordTier = nullptr, phonemeTier = nullptr; /* * Include a word tier. */ if (includeWords) { /* * Make sure that the word tier exists. */ autoMelderString newWordTierName; MelderString_copy (& newWordTierName, headTier -> name, U"/word"); for (long itier = 1; itier <= my numberOfTiers (); itier ++) { IntervalTier tier = static_cast <IntervalTier> (my tier (itier)); if (Melder_equ (newWordTierName.string, tier -> name)) { if (tier -> classInfo != classIntervalTier) Melder_throw (U"A tier with the prospective word tier name (", tier -> name, U") already exists, but it is not an interval tier." U"\nPlease change its name or remove it."); wordTierNumber = itier; break; } } if (! wordTierNumber) { autoIntervalTier newWordTier = IntervalTier_create (my xmin, my xmax); Thing_setName (newWordTier.peek(), newWordTierName.string); Ordered_addItemAtPosition_move (my tiers.get(), newWordTier.move(), wordTierNumber = tierNumber + 1); } Melder_assert (wordTierNumber >= 1 && wordTierNumber <= my tiers -> size); wordTier = static_cast <IntervalTier> (my tier (wordTierNumber)); /* * Make sure that the word tier has boundaries at the edges of the interval. */ IntervalTier_insertIntervalDestructively (wordTier, interval -> xmin, interval -> xmax); /* * Copy the contents of the word analysis into the interval in the word tier. */ long wordIntervalNumber = IntervalTier_hasTime (wordTier, interval -> xmin); Melder_assert (wordIntervalNumber != 0); if (analysis.peek()) { Thing_cast (IntervalTier, analysisWordTier, analysis -> tier (3)); if (! IntervalTier_check (analysisWordTier)) Melder_throw (U"Analysis word tier out of order (3)."); if (! IntervalTier_check (wordTier)) Melder_throw (U"Word tier out of order (3)."); for (long ianalysisInterval = 1; ianalysisInterval <= analysisWordTier -> numberOfIntervals (); ianalysisInterval ++) { TextInterval analysisInterval = analysisWordTier -> interval (ianalysisInterval); TextInterval wordInterval = nullptr; double tmin = analysisInterval -> xmin, tmax = analysisInterval -> xmax; if (tmax == analysis -> xmax) { wordInterval = wordTier -> interval (wordIntervalNumber); TextInterval_setText (wordInterval, analysisInterval -> text); } else { wordInterval = wordTier -> interval (wordIntervalNumber); autoTextInterval newInterval = TextInterval_create (tmin, tmax, analysisInterval -> text); wordInterval -> xmin = tmax; Collection_addItem_move (wordTier -> intervals.get(), newInterval.move()); wordIntervalNumber ++; } } if (! IntervalTier_check (analysisWordTier)) Melder_throw (U"Analysis word tier out of order (4)."); if (! IntervalTier_check (wordTier)) Melder_throw (U"Word tier out of order (4)."); } } /* * Include a phoneme tier. */ if (includePhonemes) { /* * Make sure that the phoneme tier exists. */ autoMelderString newPhonemeTierName; MelderString_copy (& newPhonemeTierName, headTier -> name, U"/phon"); for (long itier = 1; itier <= my numberOfTiers (); itier ++) { IntervalTier tier = static_cast <IntervalTier> (my tier (itier)); if (Melder_equ (newPhonemeTierName.string, tier -> name)) { if (tier -> classInfo != classIntervalTier) Melder_throw (U"A tier with the prospective phoneme tier name (", tier -> name, U") already exists, but it is not an interval tier." U"\nPlease change its name or remove it."); phonemeTierNumber = itier; break; } } if (! phonemeTierNumber) { autoIntervalTier newPhonemeTier = IntervalTier_create (my xmin, my xmax); Thing_setName (newPhonemeTier.peek(), newPhonemeTierName.string); Ordered_addItemAtPosition_move (my tiers.get(), newPhonemeTier.move(), phonemeTierNumber = wordTierNumber ? wordTierNumber + 1 : tierNumber + 1); } Melder_assert (phonemeTierNumber >= 1 && phonemeTierNumber <= my tiers -> size); phonemeTier = static_cast <IntervalTier> (my tiers -> item [phonemeTierNumber]); /* * Make sure that the phoneme tier has boundaries at the edges of the interval. */ IntervalTier_insertIntervalDestructively (phonemeTier, interval -> xmin, interval -> xmax); /* * Copy the contents of the phoneme analysis into the interval in the phoneme tier. */ long phonemeIntervalNumber = IntervalTier_hasTime (phonemeTier, interval -> xmin); Melder_assert (phonemeIntervalNumber != 0); if (analysis.peek()) { Thing_cast (IntervalTier, analysisPhonemeTier, analysis -> tiers -> item [4]); for (long ianalysisInterval = 1; ianalysisInterval <= analysisPhonemeTier -> numberOfIntervals (); ianalysisInterval ++) { TextInterval analysisInterval = analysisPhonemeTier -> interval (ianalysisInterval); TextInterval phonemeInterval = nullptr; double tmin = analysisInterval -> xmin, tmax = analysisInterval -> xmax; if (tmax == analysis -> xmax) { phonemeInterval = phonemeTier -> interval (phonemeIntervalNumber); TextInterval_setText (phonemeInterval, analysisInterval -> text); } else { phonemeInterval = phonemeTier -> interval (phonemeIntervalNumber); autoTextInterval newInterval = TextInterval_create (tmin, tmax, analysisInterval -> text); phonemeInterval -> xmin = tmax; Collection_addItem_move (phonemeTier -> intervals.get(), newInterval.move()); phonemeIntervalNumber ++; } } } if (includeWords) { /* * Synchronize the boundaries between the word tier and the phoneme tier. */ //for (long iinterval = 1; iinterval <= } } } catch (MelderError) { Melder_throw (me, U" & ", anySound, U": interval not aligned."); } }
void Label_init (Label me, long initialNumberOfTiers) { Ordered_init (me, classTier, initialNumberOfTiers); for (long i = 1; i <= initialNumberOfTiers; i ++) { Collection_addItem_move (me, Tier_create (10)); } }
void Tier_init (Tier me, long initialCapacity) { Sorted_init (me, classAutosegment, initialCapacity); Collection_addItem_move (me, Autosegment_create (-1e30, 1e30, nullptr)); }