JSON Decode with Sound

Hello there, I’ve been having problems with JSON Encode and Decode functions in the HttpService, But I’m kinda getting used to it, What my problem is, Is it possible to transfer audio by JSON Decode? Like when you decode something it will have a audio inside it, Thats what I’m trying to do, simplificating, I’m trying to get a website’s song to play in Roblox, I just want to know if its possible and if theres any way I can do it.

This is not possible, mainly because roblox does not let you synthesize sounds from arbitrary data. You have to go through their upload process.

Besides that limitation, JSON is text-only (and anyways, HttpService returns strings), so even if you were able to play the data, you’d need extra steps to convert the binary sound data into a string or vice-versa—maybe with Base64 encoding or string.pack.

I will try that, but how I will convert a binary code to a sound?

If I convert to Base64 or either using string.pack I still dont know how to either play it or convert to a sound.

It is not possible to convert binary code into a sound in roblox, even if you get around JSON’s limitations. Sorry if that was unclear.

One very hacky work around I can think of is to upload the sounds to Roblox using the API but this has 3 very big limitations:

  1. ROBLOX could moderate sounds or they could be copyrighted
  2. It would take a while for the sounds to go through Roblox’s moderation system (this would cause delays)
  3. You can only upload a fixed amount of sounds per month