This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
O.S's profile picture

[1.4.6] "Voice" Recognition

Started by O.S, 27 October 2012 - 07:08 PM
O.S #1
Posted 27 October 2012 - 09:08 PM
Proposal:
A fairly simple (yet very useful) idea occurred to me. Why not have computers (and turtles) that respond to 'voice'?

Features:
Now, by voice I mean chat. It could come in the form of a peripheral (a microphone, obviously) which could allow it to be shut off. Any computer with one attached and within range would get an event (much like a rednet broadcast) which would then have to be parsed by a program to be used. It should probably ignore all commands (any message beginning with "/") to avoid conflicts.

Examples:
The purpose of this is to make simple interactions with turtles or computer controlled bases while not needing to reach the console. A few examples of what programs could be made with this:
  • You walk into your base and type "lock" (or a passphrase) in your chat and a nearby, hidden console responds by closing your piston door.
  • After setting up a quarry, you type "mine here" and using gps-type triangulation, a turtle finds its way to you and proceeds to execute its mining program.
  • A scout turtle flies over head or underground passively listening, marking on its map where and what it heard from the players it is spying on.
Potential Issues:
The first obvious one is that this should be one way communication. While adding a "Speaker" as well to print out chat messages might sound like a good idea, the potential for spam is just too much. Plus, that would almost make terminals obsolete.

Next is how much information should be included in the event. Pulling a username seems to be on the same level as pulling a block id. I think leaving the messages unnamed would make things more interesting since developers would need to be creative to tell one person from the next. Maybe an arbitrary "voice print" id so messages could be compared to each other. Distances (much like rednet) would be nice as you could design a gps system as mentioned above.

Finally, the last problem I thought of is conflicts with "chat" mods. Many servers use chat mods that limit who can hear which messages. Usually in the form of channels, such as team/guild channels. How to deal with this one, I honestly have no idea, as each mod can have any number of methods to do what they do…
tom2018 #2
Posted 27 October 2012 - 09:30 PM
This is one of the best ideas so far we could also have a cfg so it can talk back ( a cfg because we dont want people to use it for spam so its optional.)
Sebra #3
Posted 27 October 2012 - 09:39 PM
Idea seems valid for peripheral/upgrade only.
ChunLing #4
Posted 27 October 2012 - 11:09 PM
There are already a couple of very good remote control type peripherals, and rumors are that there will eventually be a programmable rednet-enabled item in the core CC.
O.S #5
Posted 27 October 2012 - 11:33 PM
I apologize as I wasn't aware custom peripherals were possible until after I posted my original suggestion. I've been using the wiki for all my information until just recently so I'm new to the forums. So yes, I agree I should have posted this in the peripheral forums.

As for the rednet remote suggestion, it sounds like a good idea but (depending on it's implentation) it might feel 'too easy' compared to the CC method of making things difficult (i.e. Block Ids). Don't get me wrong, I like the style as it promotes creativity in your coding. But I am interested as to how it is approached in the core version.
ChunLing #6
Posted 28 October 2012 - 12:03 AM
Well, the main thing is probably that you'd have to program the rednet portable to have it do anything useful. You can already place/break a wireless turtle if you just want to be able to use a rednet enabled console anywhere, so the portable item would mainly be for the sake of elegance/seamless interaction, not a change in the core mechanics.
wilcomega #7
Posted 31 October 2012 - 08:24 PM
i think you shoulod be able to record stuff and then use it later for comaprement. this would be great for certain people accesing a nuclearcontrol program. with soemthing like a mic peripheral
ChunLing #8
Posted 31 October 2012 - 10:40 PM
Except that the compare would invariably be false.
Dlcruz129 #9
Posted 02 November 2012 - 03:24 PM
To solve the speaker problem, maybe it only appears in the chat of the player who said the code.

Example:
dlcruz129: lock
Computer: I have locked all of your doors.
Jasonfran #10
Posted 02 November 2012 - 11:17 PM
I don't think the suggestion was that the computer talks on chat. Its just that the computer can read the chat
Dlcruz129 #11
Posted 03 November 2012 - 03:18 AM
I don't think the suggestion was that the computer talks on chat. Its just that the computer can read the chat

Read potential issue 1: he wants speakers to be able to talk back.
ChunLing #12
Posted 03 November 2012 - 03:51 AM
The eventual addition of a rednet capable portable computer will obviate this as a meaningful upgrade for the core CC. CCPortable already provides this functionality if properly programmed.