Author |
Topic: Paid Work for Programmer Assistance (Read 1062 times) |
|
JGHarston
Junior Member
member is offline


Gender: 
Posts: 52
|
 |
Re: Paid Work for Programmer Assistance
« Reply #2 on: Aug 27th, 2014, 9:01pm » |
|
on Aug 22nd, 2014, 09:54am, Kipper wrote:| However, it also has commands which allow the user to convert text back to spoken speech using speech synthesiser. I would like to be able to force that code to do this within a BBC programme by supplying a string ($) to it. |
|
When I had access to some Dragon installations I did some experimentation, and all my investigations show that it is impossible to programatically instruct Dragon to "speak" a file. All of Dragon's commands are only available to the user via Dragon's GUI, none of them are available to other programs. This is confirmed by the manual: Quote:| Text-to-speech is available only in the DragonPad, Microsoft Word, and Corel WordPerfect. You can, however, copy and paste text from other programs and then use text-to-speech (by...) select Read That from the Advanced submenu (or right-click in your document and click Read That from the shortcut menu). |
|
So, it's one of those frustrating cases where your program would have to pop up a box and tell the user: "drag your file into the Dragon box, then click the 'Read' button in the Dragon menu", where a program goes out of its way to destroy the entire point of computers, that is, to automate processes and remove human interaction.
The best option is, as you mention, look for another speech synthesiser, specifically one that can be programatically instructed. Oh, for being able to just do: *SAY hello 
|
| « Last Edit: Aug 27th, 2014, 9:03pm by JGHarston » |
Logged
|
|
|
|
JGHarston
Junior Member
member is offline


Gender: 
Posts: 52
|
 |
Re: Paid Work for Programmer Assistance
« Reply #3 on: Aug 27th, 2014, 11:25pm » |
|
on Aug 27th, 2014, 9:01pm, JGHarston wrote:| Oh, for being able to just do: *SAY hello :) |
|
And as if by magic...
Martin Krolik has written just such a command, and it's even called SAY. Download SayStatic.exe or SayDynamic.exe. Rename it to Say.exe (or use the original filename), and then you can do: SAY Hello world.
It 'says' the string on the command line, so to 'say' a file a quick bit of BASIC code would be something like: Code:in%=OPENIN(in$)
REPEAT
text$=GET$#in%
OSCLI(path_to_say$+"SAY "+text$)
UNTIL EOF#in%
|
| « Last Edit: Aug 27th, 2014, 11:26pm by JGHarston » |
Logged
|
|
|
|
JGHarston
Junior Member
member is offline


Gender: 
Posts: 52
|
 |
Re: Paid Work for Programmer Assistance
« Reply #4 on: Aug 28th, 2014, 12:56pm » |
|
I've just had this read out my CV. Sounds weird! ;) Code: REM > SayFile
REM Use Martin Krolik's SAY command to read text from a file
:
say$=@dir$+"saydynamic.exe"
in%=OPENIN("")
REPEAT
line$=GET$#in%
IF line$<>"" THEN
REPEAT
A%=INSTR(line$," ",72):IF A%=0:A%=LEN line$+1
text$=LEFT$(line$,A%-1):line$=MID$(line$,A%+1)
PRINT text$:OSCLI say$+" "+text$
UNTIL line$=""
ENDIF
UNTIL EOF#in%
CLOSE#in%
It pauses at the end of every SAY command, so an improvement would be to collect lines together until a semicolon, comma or full stop is encountered and SAY each part.
Otherwise it sounds. Like the speaker. Is falling asleep. Every few seconds.
|
| « Last Edit: Aug 28th, 2014, 1:13pm by JGHarston » |
Logged
|
|
|
|
Edja
Developer
member is offline


Posts: 60
|
 |
Re: Paid Work for Programmer Assistance
« Reply #5 on: Aug 29th, 2014, 08:21am » |
|
Quote:| It 'says' the string on the command line, so to 'say' a file a quick bit of BASIC code would be something like .. . |
| What is the solution explained here doing differently from the method explained in the WIKI article "Speaking the contents of a file by Richard Russell, October 2008" ? The WIKI explains how to speak a string or the content of a file. What am I missing here ? Eddy
|
|
Logged
|
|
|
|
JGHarston
Junior Member
member is offline


Gender: 
Posts: 52
|
 |
Re: Paid Work for Programmer Assistance
« Reply #6 on: Aug 29th, 2014, 3:02pm » |
|
on Aug 29th, 2014, 08:21am, Edja wrote:| What is the solution explained here doing differently from the method explained in the WIKI article "Speaking the contents of a file by Richard Russell, October 2008" ? |
|
Absolutely nothing. It's just as the question had been asked here I automatically assumed that a solution had not actually been found and written up, so it never occurred to me to check the Wiki as the very fact the question was being asked made me subconciously assume that looking in the Wiki would be useless as otherwise, why would the questioner be asking the question?
The lesson to be learned - always check the Wiki before posting.
|
|
Logged
|
|
|
|
KenDown
Full Member
member is offline


Posts: 181
|
 |
Re: Paid Work for Programmer Assistance
« Reply #7 on: Sep 3rd, 2014, 8:22pm » |
|
It must be pointed out, however, that the quality of the text ouput by the speak command demonstrated in Richard Russell's SPEAK example program does depend heavily on the voice you have installed. I recently upgraded my computer and had to reinstall all programs. The speech was awful - almost unintelligible - until I installed an early version of Microsoft Autoroute which comes with quite a nice female voice.
|
|
Logged
|
|
|
|
rtr2
Guest
|
 |
Re: Paid Work for Programmer Assistance
« Reply #8 on: Sep 3rd, 2014, 9:20pm » |
|
on Sep 3rd, 2014, 8:22pm, KenDown wrote:| I recently upgraded my computer and had to reinstall all programs. The speech was awful |
|
You say you upgraded, but you omitted the most important piece of information - to what version of Windows? On English versions of Windows Vista and Windows 7 the default voice is Microsoft Anna; no male voice is included as standard. On Windows 8 Microsoft David (male), Microsoft Hazel (female, UK) and Microsoft Zira (female, US) are supplied.
It's worth bearing in mind that the SAPI5 command syntax allows you not only to use a specific voice (if available) but also to specify that a female or male voice is preferentially used. This can be useful when you don't know which voices will be available.
|
|
Logged
|
|
|
|
|