@ EchoOff
@Title = [beard works] The world's smallest batch processing speech software V2.0
: Begin
@CLS
EchoWhen there are too many threads, there are too many threads, too many threads.
Echo.
Echo[The world's smallest speech reading software]
EchoBeard software studio · honors
Echo.
Echo1. Both Chinese and English can be read
Echo2. You must first set the default voice in the control panel.
Echo3. You can choose whether to record simultaneously.
Echo4. Each paragraph in the text cannot exceed 1024 characters
Echo.
EchoWhen there are too many threads, there are too many threads, too many threads.
@ Echo. & Echo.
Color0b
@ Set/P fn = "● enter the file name of the text to read :"
If not exist
% FN % echo. & Echo ◆ the file does not exist! & Echo. & pause & goto begin
Echo.
Set/P yn = "● whether to generate a voice file simultaneously (y/N ):"
If/I
% YN %= NGotoRead
Echo.
Echo● Reading text. Please wait ......
EchoConst forreading
= 1> LY. vbs
EchoSet objfso
= Createobject ("scripting. FileSystemObject ")
> LY. vbs
EchoSet objtextfile
= Objfso. opentextfile (wscript. Arguments (0), forreading)
> LY. vbs
EchoStrtext
= Objtextfile. readall> LY. vbs
EchoConst ssfmcreateforwrite
= 3> LY. vbs
EchoSet objvoice
= Createobject ("SAPI. spvoice ")
> LY. vbs
EchoSet objfile
= Createobject ("SAPI. spfilestream.1 ")
> LY. vbs
EchoObjfile. Open "C: \ test.wav", ssfmcreateforwrite
> LY. vbs
EchoSet objVoice. AudioOutputStream
= ObjFile> ly. vbs
EchoSet objshell = createobject ("wscript. shell ")
> Ly. vbs
EchoObjVoice. Speak strText
> Ly. vbs
EchoObjTextFile. Close
> Ly. vbs
Ly. vbs
% FN %
: Read
Echo.
Echo● Press any key to start reading ......
Pause>Nul
Echo.
For/F "tokens = *"
% A in
(% FN %)Do echo%
& Echo. & start/wait "" mshta vbscript: CreateObject ("SAPI. SpVoice"). Speak ("%") (Window. close)
@ Echo.
@ Echo● Reading is complete! The generated audio file is saved in C: \ test.wav.
@ Echo.
: End
@ Echo● Press any key to exit
Pause>Nul
@ EchoOn
@ DelLy. vbs
-----------------------------------