Groups | Search | Server Info | Login | Register
Groups > comp.text.pdf > #2573
| From | Paul <nospam@needed.invalid> |
|---|---|
| Newsgroups | alt.comp.os.windows-10, alt.comp.freeware, comp.text.pdf |
| Subject | Re: Text to audio file on Windows |
| Date | 2024-07-26 01:12 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <v7vb7t$2mrpk$1@dont-email.me> (permalink) |
| References | (2 earlier) <v7rjp7$1s95i$1@dont-email.me> <v7tngd$29qgv$1@dont-email.me> <ec9a0d842475ade5bf8f610273bc5b5df036370a@novabbs.org> <v7ugoc$2f559$1@dont-email.me> <07859b34a905564ca27a49358f2eb4b0361719f4@novabbs.org> |
Cross-posted to 3 groups.
On Thu, 7/25/2024 10:41 PM, Larry Wolff wrote:
> On 7/25/2024 4:40 PM, Newyana2 wrote:
>
>>> The problem is converting that spoken words to an audio file.
>>>
>>> I searched far and wide, and while I found lots of online clickbait, I
>>> can't yet find a freeware Windows 10 program to convert it to audio.
>>>
>>> That's why I had asked for help.
>>> But nobody seems to know the answer any better than I do.
>>>
>>> I guess that means freeware Windows 10 offline text to audio file
>>> conversion tools probably do not exist since nobody can find any.
>>>
>>
>> I gave you the answer. Windows can do it through the
>> speech API, using the very simple script that I posted. All
>> you need to do is give it a TXT file by copying the text out
>> of the PDF.
>
> Thanks for that VBS script as it probably would work for nerdy people.
> But I'm trying to help non-nerds who won't be running visual basic.
>
> What I want is what everyone wants which is a program that anyone can
> download and just run with an input file and an output file without having
> to install Microsoft Visual Basic, Pascal, Docker, or other crutches.
>
> What is the setup required to add visual basic to a PC to run your script?
>
Standard protocol, is you show interest by copying the offered script
into a text file and running it. Such as following the instructions,
dragging and dropping something, or... whatever. Then, if you're having
trouble with your bog-standard PC, post back and ask for a little more help.
My Windows 11 daily driver, is Win11Home and is bog-standard (no special features,
Visual Studio is on another OS as H: ).
MsgBox "Drop a text file onto the script to be converted to sound file"
Just rejecting it out of hand, what are the odds he'll write one for
the next individual who comes along ?
A measure of OS support, is watching what happens to the icon, when
I change the name of the script to
newscript.vbs
I changed the output filename a bit, in the following. C:\users\username\Desktop\Recording.wav
The script worked fine, and it was fast.
************************************** Content of newscript.vbs ********************************
' begin VBS file code:
Dim Voice, SpFile
Dim FSO, s1, Arg, TS
Arg = WScript.Arguments(0)
Set FSO = CreateObject("Scripting.FileSystemObject")
If FSO.fileexists(Arg) = False Then
MsgBox "Drop a text file onto the script to be converted to sound file."
WScript.quit
End If
Set TS = FSO.OpenTextFile(Arg, 1)
s1 = TS.ReadAll
TS.Close
Set TS = Nothing
Set FSO = Nothing
Set Voice = CreateObject("Sapi.spVoice")
Set SpFile = CreateObject("Sapi.spFileStream")
Set oShell = CreateObject("WScript.Shell")
strHomeFolder = oShell.ExpandEnvironmentStrings("%USERPROFILE%")
strOutput = strHomeFolder & "\Desktop\Recording.wav"
' SpFile.open "C:\Windows\Desktop\Recording.wav", 3, False
SpFile.open strOutput, 3, False
Set Voice.AudioOutputStream = SpFile
Voice.Speak s1, 64
SpFile.close
Set SpFile = Nothing
Set Voice = Nothing
MsgBox "Done."
************************************** Content of newscript.vbs ********************************
This is the result. Recording.wav, uploaded to sndup.net .
Scroll down a bit, to see the player-box with the triangle-start button on the left of it.
http://sndup.net/d3g9z/
Paul
Back to comp.text.pdf | Previous | Next — Previous in thread | Next in thread | Find similar
Text to audio file on Windows Larry Wolff <larrywolff@larrywolff.net> - 2024-07-23 17:43 -0400
Re: Text to audio file on Windows Newyana2 <newyana@invalid.nospam> - 2024-07-23 21:45 -0400
Re: Text to audio file on Windows david <this@is.invalid> - 2024-07-24 11:58 -0600
Re: Text to audio file on Windows Newyana2 <newyana@invalid.nospam> - 2024-07-24 15:13 -0400
Re: Text to audio file on Windows Paul <nospam@needed.invalid> - 2024-07-24 17:33 -0400
Re: Text to audio file on Windows Newyana2 <newyana@invalid.nospam> - 2024-07-24 17:47 -0400
Re: Text to audio file on Windows Newyana2 <newyana@invalid.nospam> - 2024-07-24 17:58 -0400
Re: Text to audio file on Windows Joe Beanfish <joebeanfish@nospam.duh> - 2024-07-25 14:29 +0000
Re: Text to audio file on Windows Larry Wolff <larrywolff@larrywolff.net> - 2024-07-25 16:59 -0400
Re: Text to audio file on Windows Newyana2 <newyana@invalid.nospam> - 2024-07-25 17:40 -0400
Re: Text to audio file on Windows Larry Wolff <larrywolff@larrywolff.net> - 2024-07-25 22:41 -0400
Re: Text to audio file on Windows Paul <nospam@needed.invalid> - 2024-07-26 01:12 -0400
Re: Text to audio file on Windows Newyana2 <newyana@invalid.nospam> - 2024-07-26 08:23 -0400
Re: Text to audio file on Windows Stan Brown <the_stan_brown@fastmail.fm> - 2024-07-25 22:00 -0700
Re: Text to audio file on Windows Paul <nospam@needed.invalid> - 2024-07-26 11:38 -0400
Re: Text to audio file on Windows Stan Brown <the_stan_brown@fastmail.fm> - 2024-07-26 16:39 -0700
Re: Text to audio file on Windows Paul <nospam@needed.invalid> - 2024-07-26 20:08 -0400
Re: Text to audio file on Windows Newyana2 <newyana@invalid.nospam> - 2024-07-26 09:21 -0400
Re: Text to audio file on Windows Newyana2 <newyana@invalid.nospam> - 2024-07-26 09:24 -0400
Re: Text to audio file on Windows Joe Beanfish <joebeanfish@nospam.duh> - 2024-07-29 16:10 +0000
Re: Text to audio file on Windows Larry Wolff <larrywolff@larrywolff.net> - 2024-08-18 16:47 -0400
csiph-web