Rapid account: Manolis Teletos

Manolis Teletos / manosteletos

Discussions

5
Title
Created at (Click to sort ascending)
A
2
The v2_mp3 is out . Tueย 5:46 12/12/23
A
2
Arman the mp3 version is out . In python you can parse it like this : import http.client conn = http.client.HTTPSConnection("text-to-music-api.p.rapidapi.com") headers = { 'X-RapidAPI-Key': "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", 'X-RapidAPI-Host': "text-to-music-api.p.rapidapi.com" } conn.request("GET", "/play?ascii_text=IaMaTextThatWillGiveMusic", headers=headers) res = conn.getresponse() if res.status == 200: # Save the response content (MIDI or MP3 data) to a local file with open("output", "wb") as file: file.write(res.read()) print("MIDI or MP3 file saved as output") else: print("Failed to retrieve the file. Status code:", res.status) Monย 6:43 11/12/23
A
1
Hello fellow developer, Json files can be accessed via the endpoint in the url ending with output_format=json With this modification in the GET method the system returns the data in the form of JSON. Thanks for asking. Best regards Emmanuel Wedย 7:46 16/8/23
A
2
The v2_mp3 is out . Tueย 5:46 12/12/23
A
2
Arman the mp3 version is out . In python you can parse it like this : import http.client conn = http.client.HTTPSConnection("text-to-music-api.p.rapidapi.com") headers = { 'X-RapidAPI-Key': "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", 'X-RapidAPI-Host': "text-to-music-api.p.rapidapi.com" } conn.request("GET", "/play?ascii_text=IaMaTextThatWillGiveMusic", headers=headers) res = conn.getresponse() if res.status == 200: # Save the response content (MIDI or MP3 data) to a local file with open("output", "wb") as file: file.write(res.read()) print("MIDI or MP3 file saved as output") else: print("Failed to retrieve the file. Status code:", res.status) Monย 6:43 11/12/23