User Tools

Site Tools


outputting_20speech_20to_20a_20file

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

outputting_20speech_20to_20a_20file [2018/03/31 13:19]
127.0.0.1 external edit
outputting_20speech_20to_20a_20file [2018/04/15 12:52] (current)
richardrussell Added syntax highlighting
Line 1: Line 1:
 =====Outputting speech to a file===== =====Outputting speech to a file=====
  
-//by Richard Russell, October 2008//\\ \\  The supplied example program **SPEAK.BBC** illustrates how you can use Windows'​ built-in speech synthesis capabilities to output speech to your PC's loudspeakers,​ but what if you want to create a sound file containing the speech? Fortunately the **SAPI 5** speech system (typically available in Windows 2000, XP and Vista) supports this facility directly.\\ \\  The code below outputs speech to a specified WAV file:\\ \\ +//by Richard Russell, October 2008//\\ \\  The supplied example program **SPEAK.BBC** illustrates how you can use Windows'​ built-in speech synthesis capabilities to output speech to your PC's loudspeakers,​ but what if you want to create a sound file containing the speech? Fortunately the **SAPI 5** speech system (typically available in Windows 2000, XP and Vista) supports this facility directly.\\ \\  The code below outputs speech to a specified WAV file: 
 + 
 +<code bb4w> ​
         INSTALL @lib$+"​COMLIBA"​         INSTALL @lib$+"​COMLIBA"​
  
Line 23: Line 25:
  
         SYS "​PlaySound",​ file$, 0, &20001         SYS "​PlaySound",​ file$, 0, &20001
 +</​code>​
 +
 Note that this code requires **COMLIB** (or **COMLIBA**) version **3.3** or later, as supplied with //BBC BASIC for Windows// version 5.90a. Note that this code requires **COMLIB** (or **COMLIBA**) version **3.3** or later, as supplied with //BBC BASIC for Windows// version 5.90a.
outputting_20speech_20to_20a_20file.txt · Last modified: 2018/04/15 12:52 by richardrussell