81 character = paragraph[loop++];
82 if (character !=
'\n' && character != 0)
84 length += 1 << speak_length(character);
87 while (character !=
'\n' && character != 0);
91 static const n_int set_frequencies[24] =
102 static const n_int vowel_reorder[8] =
104 4, 7, 0, 2, 1, 6, 3, 5
107 static const n_int consonant_reorder[16] =
109 6, 13, 3, 7, 0, 14, 1, 12,
110 9, 11, 2, 15, 4, 10, 5, 8
113 static const n_int low_freq[13]=
115 60000, 45000, 30000, 55000,
116 30000, 40000, 35000, 60000,
117 40000, 20000, 65000, 40000,
123 const n_string character_building =
"aeiovfstpbjm";
127 if (value != character_building[loop])
132 while ((loop<12) && (value != character_building[loop]));
136 low[1] = low_freq[loop ];
138 low[3] = low_freq[loop+1];
143 high[0] = set_frequencies[vowel_reorder[loop]];
145 high[2] = set_frequencies[vowel_reorder[loop+1]];
147 high[4] = set_frequencies[vowel_reorder[loop+2]+2];
149 high[6] = set_frequencies[vowel_reorder[loop+4]+3];
154 high[0] = set_frequencies[consonant_reorder[loop-4]];
156 high[2] = set_frequencies[consonant_reorder[loop-2]+3];
158 high[4] = set_frequencies[consonant_reorder[loop+1]+8];
160 high[6] = set_frequencies[consonant_reorder[loop+3]+8];
189 if (total_length < 1)
191 (void)
SHOW_ERROR(
"Speaking length is less than one");
195 out_file = fopen(filename,
"w");
199 (void)
SHOW_ERROR(
"Failed create speak file!");
207 n_uint length = 1 << power_sample;
212 if (found_character !=
'\n' && found_character != 0)
214 if (found_character !=
' ' && found_character !=
'.')
216 n_int local_high[8], local_low[4];
218 speak_freq(local_high, local_low,found_character);
245 while (found_character !=
'\n' && found_character != 0);
247 if (fclose(out_file) != 0)
249 (void)
SHOW_ERROR(
"Failed to close speak file");