Голоса перенесены в AppData
This commit is contained in:
+21
-3
@@ -91,6 +91,8 @@ type
|
||||
procedure frAutoActions1btnCounterAddClick(Sender: TObject);
|
||||
procedure frAutoActions1btnCounterEditClick(Sender: TObject);
|
||||
procedure frAutoActions1btnCounterDeleteClick(Sender: TObject);
|
||||
procedure frSettings1btnOpenRomaningClick(Sender: TObject);
|
||||
procedure frSettings1btnOpenStreamClick(Sender: TObject);
|
||||
private
|
||||
{ Private declarations }
|
||||
procedure toSpeech(aText: string);
|
||||
@@ -167,13 +169,13 @@ end;
|
||||
procedure TTTW_Bot.toSpeech(aText: string);
|
||||
var
|
||||
tts: ttts;
|
||||
s, s1: string;
|
||||
s: string;
|
||||
begin
|
||||
s := ExtractFilePath(ParamStr(0)) + 'piper\piper.exe';
|
||||
s1 := ExtractFilePath(ParamStr(0)) + 'piper\voices';
|
||||
|
||||
if frTTS1.cbVoices.ItemIndex = -1 then
|
||||
exit;
|
||||
tts := ttts.Create(s, s1);
|
||||
tts := ttts.Create(s, myConst.VoicesPath);
|
||||
try
|
||||
tts.SetModel(frTTS1.cbVoices.text);
|
||||
tts.TextToSpeech(aText, true);
|
||||
@@ -496,6 +498,10 @@ begin
|
||||
CreateDir(myConst.AppDataPath + 'ytSongs');
|
||||
myConst.ytSongsPath := myConst.AppDataPath + 'ytSongs\';
|
||||
|
||||
if not DirectoryExists(myConst.AppDataPath + 'Voices') then
|
||||
CreateDir(myConst.AppDataPath + 'Voices');
|
||||
myConst.VoicesPath := myConst.AppDataPath + 'Voices\';
|
||||
|
||||
myConst.SilentPlay := myConst.GeneralPath + 'SilentPlayer.exe';
|
||||
myConst.ytPlay := myConst.GeneralPath + 'Player.exe';
|
||||
myConst.cfg1 := myConst.GeneralPath + 'botapp.cfg';
|
||||
@@ -884,6 +890,18 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TTTW_Bot.frSettings1btnOpenRomaningClick(Sender: TObject);
|
||||
begin
|
||||
frSettings1.btnOpenRomaningClick(Sender);
|
||||
|
||||
end;
|
||||
|
||||
procedure TTTW_Bot.frSettings1btnOpenStreamClick(Sender: TObject);
|
||||
begin
|
||||
frSettings1.btnOpenStreamClick(Sender);
|
||||
|
||||
end;
|
||||
|
||||
procedure TTTW_Bot.frTTS1btnSendClick(Sender: TObject);
|
||||
begin
|
||||
frTTS1.btnSendClick(Sender);
|
||||
|
||||
Reference in New Issue
Block a user