Interface address
http://gmapi.liulikeji.top:15842/dfpwm
Request format: httpget / httppost
Enter: json
Parameters: URL (audio file download link)
Return: Type: String (DFPWM file download link)
http://fserver.liulikeji.top:15848/wavfile/ {id} .dfpwm
Example 1:
Play: http://fserver.liulikeji.top: 15848/Cloud Data Center/2460671937.MP3
Musicurl = "http://fserver.liulikeji.top:15848/%E4%BA%91P%E5%BF%83/2460671937.MP3 ""local json = textutils.serialisejson
LOCAL DFPWMURL = http.post ("http://gmapi.liulikeji.top:15842/dfpwm", json) .Radall ()-Output: dfwpm file download link link
shell.run ("Speaker", "Play", DFPWMURL)-Play DFPWM
Example 2:
Use Sogou translation text to read the interface: Hello World!
txt = "Hello World!"Musicurl = "https://fanyi.sogou.com/reventondc/synthesis?speed=1&lang=zh-chs&from=translab&Speaker=3.&Text=" ..txt
local json = textutils.serialisejson
LOCAL DFPWMURL = http.post ("http://gmapi.liulikeji.top:15842/dfpwm", json) .Radall ()-Output: dfwpm file download link shell.run ("Speaker", "Play", dfpw murl)-Play dfpwm
Chinese:
Use urlencode encoding
URL to righteousness, url coding/decoding tool
%E4%BD%A0%E5%A5%BD%EF%BC%8C%E4%B8%96%E7%8C%EF%BC%81
txt = "%E4%bd%A0%A5%A5%BD%EF%EF%BC%E4%B8%96%E7%95%EF%BC%81"Musicurl = "https://fanyi.sogou.com/reventondc/synthesis?speed=1&lang=zh-chs&from=translab&Speaker=3.&Text=" ..txt
local json = textutils.serialisejson
LOCAL DFPWMURL = http.post ("http://gmapi.liulikeji.top:15842/dfpwm", json) .Radall ()-Output: dfwpm file download link link
shell.run ("Speaker", "Play", DFPWMURL)-Play DFPWM
Attached::
Online file storage: Liulikeji.top (liulikeji.top)