This commit is contained in:
2025-06-15 23:12:37 -04:00
parent 41559eff5d
commit da19dc6381
2 changed files with 10 additions and 47 deletions

View File

@@ -49,44 +49,6 @@ local function playTTSFile(speakers, value)
os.pullEvent("speaker_audio_empty")
end
end
-- local ttsRoute = "https://ttsmp3.com/makemp3_new.php"
-- local fileName = "tts.dfpwm"
-- local encodedValue = textutils.urlEncode(value)
-- print("Encoded TTS value: " .. encodedValue)
-- local body = "msg=" .. encodedValue .. "&lang=Gwyneth&source=ttsmp3"
-- local headers = {
-- ["Content-Type"] = "application/x-www-form-urlencoded"
-- }
-- print("Sending HTTP POST request")
-- local response = http.post({
-- url = ttsRoute,
-- method = "POST",
-- body = body,
-- headers = headers,
-- binary = false
-- })
-- print("HTTP POST request successful" )
-- local data = response.readAll()
-- response.close()
-- local responseData = textutils.unserialiseJSON(data, { parse_null = true })
-- local soundRequest = http.get({
-- url = responseData.URL,
-- binary = true
-- })
-- local soundData = soundRequest.readAll()
-- soundRequest.close()
-- local encodedData = encoder.encode(soundData)
-- local file = fs.open(fileName, "w")
-- file.write(encodedData)
-- file.close()
-- playSound(speakers, fileName)
end
local function createSoundFile(fileName)