Speech synthesis: Difference between revisions

m
→‎{{header|REXX}}: clarified the usage of the SPEAK command, change some comments in the REXX section header, updated a glyph in the REXX program. -- ~~~~
m (→‎{{header|REXX}}: simplified the REXX program name. -- ~~~~)
m (→‎{{header|REXX}}: clarified the usage of the SPEAK command, change some comments in the REXX section header, updated a glyph in the REXX program. -- ~~~~)
Line 158:
=={{header|REXX}}==
{{works with|Windowx/XP or later}}
Programming note:   This REXX program uses a freeware program NIRCMD to interface with the Microsoft Windows speech synthesizer program SAM, a text to speech using a male voice.   Sam can possibly be configured to use other voices with later releases of Windows.   LaterMore recent Microsoft Windows have another speech synthesizer program:   ANNA.
<lang rexx>/*REXX pgm uses a CLI cmd to invoke Windows/XP SAM for speech synthesis.*/
parse arg t; t=space(t) /*get the (optional) text from CL*/
Line 170:
tFN='SPEAK_IT'; tFT='$$$' /*use this for the TEMP's fileID.*/
tFID=homedrive||'\TEMP\' || tFN"."tFT /*create temp name for the output*/
call lineout tFID,t /*write text──�atext──►a temp output file*/
call lineout tFID /*close the file just to be neat.*/
'NIRCMD' "speak file" tFID /*NIRCMD invokes the MS Sam voice*/
Line 176:
/*stick a fork in it, we're done.*/</lang>
Note: &nbsp; The name of the above REXX program is &nbsp; '''speak.rex'''<br>
'''usage''' &nbsp; using the command: &nbsp; <tt> speak This is an example of speech synthesis. </tt>
<pre>speak This is an example of speech synthesis.
</pre>
 
=={{header|Ruby}}==