Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Scripting Text Buttons To Speech On Roblox?

Asked by 4 years ago
Edited 4 years ago

I think it's about time that this starts getting worked on by the Roblox Community. Since currently custom chat systems are failures and no one has seemed to be picking up the progress recently. (UPDATE DO NOT ATTEMPT MAKING THIS!) I uploaded a text to speech audio which is composed of about 70 Phonemes in a single clip. Basically it's vocal sounds for building words in the English language and being able to hear them in game. I figured well then why not make it better and have it instead able to compose short or entire sentences. I'm not sure yet if this will actually be useful at all in reality or if it would work to any degree. I imagine this will only be used for negative purposes instead which filtering and safe chat couldn't even prevent this. The GUI could even have a more custom and feature rich appearance if you're good at making scripts and UI's. However I really want to make this work currently though I have very crappy scripting scripts to none at all though. I know how to mark though each sound to the points it need to play at and when to stop this is no problem for me. But the problem I am actually having currently is figuring out how to script the buttons. So that when a button is pressed the imputed data sound will be sent to the Text Input. While that is probably I would assume is easy to figure out and script. I also need the ability to have the 2 calculator features. Which are deleting a previous Phonemes in the input and sending it out to the game to be heard from a player to others. Even if this was through being nearby that would be perfect. The calculator script I believe is tough to figure out. Especially for adding words together. Currently the only attempts at this I have found are where people have scripts that randomly generate like 3 of them together. I want a custom approach to this basically which would be way more useful if it were to work. Too Long Didn't Read? Here's the Summary "Hi, I suck at scripting on Roblox and need help storing the data sounds when the buttons are clicked on this GUI. With the ability of adding more of them together. In the order based upon how they were clicked by the user. Also it needs to have two calculator features like removing a previous sound in the list input and a way to send the resulting vocals out to all other players. If you know how to accomplish this it would be great if I could receive your help. I need a script made entirely from scratch. If anything you will get ultimate credit for the project getting accomplished. While I and everyone else have to grab a copy of the script from your Roblox user account inventory."

I'm moving this project to ReWorld.io a modern styled Roblox game clone. Here's the audio files for them provided as 3 different vocal preset types. Soundcloud /music-evps/sets/synthetic-voices Currently available are British Boy Voice, British Guy Voice, & British Woman Voice. (British Girl Voice broke to pieces.)

ahh, ear, al, awe, an, air, in, ch, iihh, ill, ing, ur, ink, oi, un, ol, om, th, onhh, or, sh, uh, st, your, umcc, dd, hh, yuhh, oo, jj, ll, mm, nuhh, pp, gg, ruh, ss, tt, ff, vv, bb, wuhay, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, ze.

Usage Example: " Th ih ss, ff or mm ss, ay, cc om pp ll e tt ll e, ff on cc sh un uh bb ll, ss n tt n ss, ff or, n e th ing, u, d ss i er. " As you have noticed it takes time to write these out. If way to make these presets for parts of words.

I was banned an hour later without a given reason.I didn't even have any bad intention or order anything in a messed up format. Yet they still get to keep the 5 dollars that I have given them a day before to buy Robux in order to make this sound clip.

0
Keeping track of which buttons were clicked in which order is doable. When the first button is clicked, add that sound to the end of a table, second button - add that sound to the end of the table and so on. When the player is done choosing their sounds you can iterate through the table playing each sound. royaltoe 5144 — 4y
0
Thanks for the helpful advice currenlty I know nothing about tables so I will try figuring them out. Joshuagibson2 16 — 4y

1 answer

Log in to vote
0
Answered by
proo34 41
4 years ago

Use values in a script. Set variables for each sound as a letter or combination of letters. When you want it to speak something then have it grab text out of the text property and decode what each character is. It will be hard because a script needs to know what a combination is versus the single letter sounds. It can be coded but will be quite rigorous. To start, using on sound property to do all the speaking will be quite hard to do, so maybe having 3 of the same clip can help. We can use a "isPlaying" command to help the script know when one is playing. If we have 3 of the same sound, it will ensure that we have a reliable speech. So to begin, begin by adding the script into the text button. Then duplicate the sound file of the word sounds 3 times into the script. Name the audios "Voice1", "Voice2", and "Voice3."

Now we have everything setup and ready to go. Now for the hard part. We need to grab all the text from the text button.

local play1 = script:WaitForChild("Voice1")
local play2 = script:WaitForChild("Voice2")
local play3 = script:WaitForChild("Voice3")
--These above will wait for the audios to load to ensure it works.

repeat
wait()
if script.Voice1.isPlaying then
    print("Playing Voice1")
else
    if script.Voice2.isPlaying then
        print("Playing Voice2")
    else
        if script.Voice3.isPlaing then
            print("Playing Voice3")
        else
            print("All sound files are playing.")
until script.Voice1.isPlaying == false or script.Voice2.isPlaying == false or script.Voice3.isPlaying == false
--This will wait until a audio is available to play a sound which is important to get clear speech.

This is all I can do as I have no idea what each noise will be and how this needs to be done. I can help you if you add me on discord.

Trykon#4585

0
Thank you for as much help as you could provide. At this point in time it's the most help I have got across social platforms. I really do appreciate it. Even though it's not a proper answer to what I need done I am glad you tried to help me out. Joshuagibson2 16 — 4y
0
I will code it for you, you just have to add me on roblox proo34 41 — 4y
0
Wish I could but I was banned for 3 days for creating the audio language sounds. Joshuagibson2 16 — 4y
0
u have to distort the voice so its obvious it isnt real, or you can use a robo voice. EmbeddedHorror 299 — 4y
0
Nah they marked it as inappropriate for Roblox without any other reaoning for banning me given. I have heard other users voices in audio files play. Without them ever getting banned for it. Therefore that's clearly not the issue here. Roblox just knows this could be easily exploitable for saying bad words to other players in game. Without being able to stop this from occuring/ Joshuagibson2 16 — 4y
Ad

Answer this question