_TITLE "Audio Insult needs Voice.exe" ' ref Spriggsy 2020-07-23 https://www.qb64.org/forum/index.php?topic=2846.msg121080#msg121080
loopcnt = loopcnt + 1
insult = GetInsult
TTS insult
SLEEP '< should of put this inside loop?
URLFile = "insultresponse"
URL = "https://evilinsult.com/generate_insult.php?lang=en"
a% = API_request(URL, URLFile)
GetInsult = ""
insultresponse
= STRING.Replace
(insultresponse
, """, CHR$(34)) insultresponse
= STRING.Replace
(insultresponse
, ">", ">") GetInsult = insultresponse
r$ = a
API_request
= URLDownloadToFileA
(0, URL
+ CHR$(0), File
+ CHR$(0), 0, 0)
x
= WinExec
("voice -d " + lines
+ CHR$(0), 0)