Robotic Voice Sample For Speaker

Topics and discussion about specific mods
Post Reply
mmmPI
Smart Inserter
Smart Inserter
Posts: 3372
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Robotic Voice Sample For Speaker

Post by mmmPI »

Robotic Voice Sample For Speaker
https://mods.factorio.com/mod/Robotic-V ... or-Speaker


What :
This mod aim at providing ways to make talking machines in game, using circuits and speakers, by providing short sample of single words, letters, numbers, or smalls expressions that are part of the game vocabulary. It require use of circuits networks and I hope can provide opportunity to use them ranging from very easy, and being a tool to learn circuits and "ear" one's progression, to very difficult to master.

How
Words are picked with the intent of making sentences or announcements , here is an example of a simple machine that says : "The" "Factory" "Must" "Grow" if you give it a fish :
The Factory Must Grow.jpg
The Factory Must Grow.jpg (129.42 KiB) Viewed 693 times


Inserters send a pulse to the speaker attached when grabbing the fish. Speakers are set up to say 1 word when they receive a pulse. There are 4 speakers, one that says "The", then the second one "Factory", then "Must", and the last one "Grow".
That's it for the words ?
For the simplest form, yes, pretty much, for the details :

The first 2 words , "The" and "Factory", are part of the "instrument" "f-addons". The f means "female voice", there also is a male voice, which can say the same words, "m-addons". Those are words that i personnally added because they are not "frequent" in english, but I thought "frequent" in the context of factorio. And missing from the other groups.There are 103 words in this group, each of them having its own number from 1 to 103, in alphabetical order. Here words 89 and 24 are called. Words like "biters" or "outpost", "time" "arrival" "departure"....

The 2 others words are part of a larger group, "f-common", which list some of the most commonly used word in english. There are 246 words in this group. They are not really related to factorio, i had no particular plan when adding those, they should offer more flexibility words like :
" my name is young, sometimes people song"

Another group of word can be found in the group "bulk". This one is very specific to the items that are present in the game, and some receipes too. There are 238 words in this one and every item from the game should have its name in it, like "Rocket" or "satelite" or "solid fuel" or "personnal-laser-defense-equipment".
What about numbers ?
There is a category "number" but it doesn't contain all the numbers mind you, instead english structure for numbers allow for recording only the numbers from 0 to 20 and every tens to a hundred 30 40 ..90. 100, then also thousand(s) million(s) and billion(s).

95 is ninety(90) and five(5)
1 344 534 312 should be decomposed into
1 billion (and) 3 hundreds (and) fourty(40) four(4) millions (and) five(5) hundreds (and) thirty(30) four(4) thousands (and) three(3) hundreds and twelve(12).

I don't have a blueprint for that one, that's something I consider difficult. There are simpler contraption to begin with such as :
Counting up to 20
Count to 20 when constant turned on.jpg
Count to 20 when constant turned on.jpg (117.91 KiB) Viewed 693 times


Turning on/off the constant combinator will make the machine count/pause.

This is an example of another settings for the programmable speaker. Instead of having different speaker for each number, this time the same speaker is used for all numbers.

To achieve this the option "signal value is pitch" is enabled. This means the speaker will play the sound corresponding to the number received. There is a little trick, because 0"zero" is the first number that the machine can call, and as such it is attached to number 1, if you want the machine to say "8", you need to send it 9 !

If you send "9" for too long to the speaker, the machine will start saying the number again 8 8 8 ...., so it needs to be a pulse or a short time relative to the sound, in the example there is a self-reseting timer that counts 60 ticks, or 1 second and a pulse is generated each second.

There is also a counter that count how many pulses were generated. That number is send to the speaker. With the addition of 1, to make up for the 0 when a new pulse arrive.And a little something for the machine to not say "zero zero zero zero" when it's turned off because of that additionnal 1.

That's already a bit more circuits :)
That seem limited
Yes it is, the mod is new and not ambitious. There is a mod that does chat text to speech much better already.
I can only shows the blueprint i was able to make for now, which are also limited by my skills and cannot demonstrate what can be done with more skill or more time. I'd be happy to learn how to make better ones, i'm sharing those if it can help getting started, not as useful contraption on their own.

Countdowns :

It is possible to mix numbers and words, to make a countdown before rocket launch by using both techniques :



This one is still using a fish to generate the initial pulse that start countdown for testing purposes no real satelites was used. Changing the value 5 in the combinator that multiply the number of fish to a higher number would make the countdown start at a higher number. It is similar to the previous contraption, extended, with a second part that activate only when the countdown is finished. "4 3 2 1 Rocket Launching Now !".

You can see ear already that it's not perfect, it skip some words the first time. That's how it is going to sound when it fails. It is actually possible to "see" too, using this mod : https://mods.factorio.com/mod/dish-display-signals, to help debug if a sound can't be heard because the signal didn't reached the speaker, or if the speaker received the signal but was already playing something, or the signal had an incorrect value that didn't correspond to any word.

For testing purpose it's also possible to use the pushbutton mod , it remove the need for fish and the multiplier. Here is a larger example that count down from 20 ,then call for the rocket launch, "wait for it to happen" , shown with little lamps, and then make commentary after it's done :


It's most likely bigger than it needs to be, but it features constant combinators that allow to configure the timing between words (T) and the number of "repetition" (R) before reading the next group of words, in a semi-expandable system.
There are letters and special signals too
E E E E, short of actual sample of laughter, which may come later, that's the closest i found to make the robot laugh.
It can says "OK", or X 123 Y 546, coordinates, or outpost C24 those kind of things, in case it can be of some use, it can thus name the signals. Special signals and colors being in the same group but can be used as word, "Everything blue is red " it makes no sense, but it's possible to make the machine say it :).

That's a terrible system
That's not the best clearly x). Any additions of words in a category risk messing up the ID of previous words, or be added at the end of the list and be hard to find with the alphabet. I don't plan to add few words everyday, more like 300 at once, in a new category once the list of missing word is large enough ( months?) to justify it, or if it make sense to add a whole new category that would cause no change to existing lists.

I'm considering one related to the vocabulary for music, such as "repeat" "random" "shuffle" "track" and the name of the instruments or notes.
I'm also considering one with vocal sample from songs, but it may be another mod, with also some percussion samples. There are already many meme sounds out there i don't plan to add my owns.

I don't want to just "add words" for the sake of it, i will accept every suggestions, but i'm not going to search for list of words without specific ideas in mind.
No something else is wrong
Please let me know !

Illiander42
Filter Inserter
Filter Inserter
Posts: 514
Joined: Mon Feb 05, 2018 10:01 am
Contact:

Re: Robotic Voice Sample For Speaker

Post by Illiander42 »

You're going to love it if my speaker suggestions make it into 2.0.

If it all makes it in, you might be able to just stick the phonetic alphabet's parts in and call it a day.

mmmPI
Smart Inserter
Smart Inserter
Posts: 3372
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Robotic Voice Sample For Speaker

Post by mmmPI »

For sure i 'd appreciate playing with the results if the suggestion is implemented !! :D

But when it comes to :
Illiander42 wrote:
Tue Jun 18, 2024 2:30 pm
you might be able to just stick the phonetic alphabet's parts in and call it a day
I doubt i would attempt this for "speech", there was attempt already, but it seem more difficult to make speech synthesis sounds "human" with this approach, taking example of this attempt : https://mods.factorio.com/mods/minimal/ ... r-phonemes
Which sounds https://www.youtube.com/watch?v=Y875JPsUVJg ( this is not using any AI ).

Using the mod i made, the transition between words is jarring sometimes, more than in regular airport or train station, due to numbers or words being pronounced with slight inflexion, or accent in part of the words that are placed differently when the word is in a sentence and not having re-recorded 20 times all the words to make sure it would work in every circumstances of a particular script, there's many little details like those that are already "sounding" robotic and could be improved ^^ but the words themselves are containing the proper prononciation and transition which does a great deal for me to be allowed to recognize them. ( source : https://xkcd.com/2942/ :D )

I have searched different methods to make the sounds, i used that particular AI because it was free and easy to access; and the other methods i could use were not giving results "as good". But since then i got my hands on some musical voice synthetizer. ( similar to https://en.wikipedia.org/wiki/Vocaloid ) Those i found are not as good for "speech" or "words" but they can do vowel very good :) with cyclic sound, it would make it easier to have different "voice" musical instrument such as offered by the mod https://mods.factorio.com/mod/musical-speaker-fixed.

Post Reply

Return to “Mods”