Skip to content

Brain.csv

DeRaafMedia edited this page Oct 28, 2014 · 28 revisions

The Brain.csv file is the file in directory brains/TheNameOfYouBot/Brain.csv. This is the file you need to edit to pair trigger words with certain events/functions. Keep the name of the path brains/TheNameOfYouBot/Brain.csv, I know this isn't the Pythonical way (all lowercases) but in the Brain.csv the world of Python meets the world of most likely some sort of C variant.

Just make sure you read the naming conventions

The directory in which Brain.csv sits needs to be the same exact name of the IRCBot you use!!

The Brain.csv has the following structure:

The first row holds the column titles. This cannot be changed. The software assumes there is a first row of column titles and starts reading at row 2 (or row[1] to be more correct).

The column titles themselves aren't mission critical, it's more a reminder of their function. You can rename them (leave them blank), just have a first row that doesn't have data you want to excecute in it:

First column = Trigger Word / The word/sentence that should trigger an action.

Second column = Directed trigger / If the word (sentence) is in combinatie with the IRCBots nickname do something special (not quit implemented in the code yet).

Third column = Response text / The text that should be used to response to a certain trigger word/sentence (in the IRC chat and/or spoken on Mac OS x systems). The response text needs to be formatted in a certain way. The whole sentence is double quoted and single quotes needs to be escaped. A good sentence looks like this:

"It\'s like thus a sentence should look. Double quotes around the sentence and a backward slash in front of single quotes like so \'."

Fourth column = Response voice / The name of the Mac OS X voice you want to use (A list of names is provide below).

Fifth column = Sensor function / If you want to pull data from a sensor with the Serial Device coupled with the IRCBot. You need to provide the exact file name of the function you wrote and put into the skills/ directory minus the .py file extension (skills/sensor_function.py becomes 'sensor_function').

Sixth column = Sensor function parameters / If you want to pass a parameter (or parameters) to the sensor function insert them here. A parameter can be one parameter (i.e param_1) but it also can be multiple parameters if you write a function that can read a certain formatted parameter (i.e param_1/param_2/param_3/). In the script just split this parameter at the /.

Seventh column = Is dependent on Serial / I'm thinking of implementing some sort of serial queuing solutions (fast serial communication from different function can lead to congestion and data losses). This is not implemented yet. For safety set this value to yes (all lowercase) if this function needs the serial port. If you use this function to get data from an other source than the serial use no (all lowercase).

Eight column = Actuator function / If you want to push data to a Serial Device coupled with the IRCBOt. You need to provide the exact file name of the function you wrote and put into the skills/ directory minus the .py file extension (skills/actuator_function.py becomes 'actuator_function').

Ninth column = Actuator function parameter / If you want to pass a parameter (or parameters) to the actuator function insert them here. A parameter can be one parameter (i.e param_1) but it also can be multiple parameters if you write a function that can read a certain formatted parameter (i.e param_1/param_2/param_3/). In the script just split this parameter at the /.

Tenth column = Is dependent on serial / I'm thinking of implementing some sort of serial queuing solutions (fast serial communication from different function can lead to congestion and data losses). This is not implemented yet. For safety set this value to yes (all lowercase) if this function needs the serial port. If you use this function to trigger an action on an other source than the serial use no (all lowercase).

A .csv file is a Comma Separated Values file (I believe only Google docs takes this serious from all the things I tried (Word, Pages)). It should look like this:

column 1, column 2, column 3, column 4, column 5, column etc

value 1, value 2, value 3, value 4, value 5, value etc

So it's easy to just write it in a plain text editor. Notice there is no comma at the end of each row!

This software can read Semicolon Separated Value files (;) but it's very, very buggy. Beter to use the true standard.


A list of all the standard Mac OS X voices. Just use the name (i.e Alex):

$ say -v ?

Agnes en_US # Isn't it nice to have a computer that will talk to you?

Albert en_US # I have a frog in my throat. No, I mean a real frog!

Alex en_US # Most people recognize me by my voice.

Alice it_IT # Salve, mi chiamo Alice e sono una voce italiana.

Alva sv_SE # Hej, jag heter Alva. Jag är en svensk röst.

Amelie fr_CA # Bonjour, je m’appelle Amelie. Je suis une voix canadienne.

Anna de_DE # Hallo, ich heiße Anna und ich bin eine deutsche Stimme.

Bad News en_US # The light you see at the end of the tunnel is the headlamp of a fast approaching train.

Bahh en_US # Do not pull the wool over my eyes.

Bells en_US # Time flies when you are having fun.

Boing en_US # Spring has sprung, fall has fell, winter's here and it's colder than usual.

Bruce en_US # I sure like being inside this fancy computer

Bubbles en_US # Pull the plug! I'm drowning!

Carmit he_IL # שלום. קוראים לי כרמית, ואני קול בשפה העברית.

Cellos en_US # Doo da doo da dum dee dee doodly doo dum dum dum doo da doo da doo da doo da doo da doo da doo

Claire nl_NL # Hallo, mijn naam is Claire. Ik ben een Nederlandse stem.

Damayanti id_ID # Halo, nama saya Damayanti. Saya berbahasa Indonesia.

Daniel en_GB # Hello, my name is Daniel. I am a British-English voice.

Deranged en_US # I need to go on a really long vacation.

Diego es_AR # Hola, me llamo Diego y soy una voz española.

Ellen nl_BE # Hallo, mijn naam is Ellen. Ik ben een Belgische stem.

Emily en_GB # Hello, my name is Emily. I am a British-English voice.

Fiona en-scotland # Hello, my name is Fiona. I am a Scottish-English voice.

Fred en_US # I sure like being inside this fancy computer

Good News en_US # Congratulations you just won the sweepstakes and you don't have to pay income tax again.

Hysterical en_US # Please stop tickling me!

Ioana ro_RO # Bună, mă cheamă Ioana . Sunt o voce românească.

Jill en_US # Hello, my name is Jill. I am an American-English voice.

Joana pt_PT # Olá, chamo-me Joana e dou voz ao português falado em Portugal.

Junior en_US # My favorite food is pizza.

Kanya th_TH # สวัสดีค่ะ ดิฉันชื่อKanya

Karen en_AU # Hello, my name is Karen. I am an Australian-English voice.

Kathy en_US # Isn't it nice to have a computer that will talk to you?

Kyoko ja_JP # こんにちは、私の名前はKyokoです。日本語の音声をお届けします。

Laura sk_SK # Ahoj. Volám sa Laura . Som hlas v slovenskom jazyku.

Lee en_AU # Hello, my name is Lee. I am an Australian-English voice.

Lekha hi_IN # नमस्कार, मेरा नाम लेखा है.Lekha मै हिंदी मे बोलने वाली आवाज़ हूँ.

Luciana pt_BR # Olá, o meu nome é Luciana e a minha voz corresponde ao português que é falado no Brasil

Mariska hu_HU # Üdvözlöm! Mariska vagyok. Én vagyok a magyar hang.

Mei-Jia zh_TW # 您好,我叫美佳。我說國語。

Melina el_GR # Γεια σας, ονομάζομαι Melina. Είμαι μια ελληνική φωνή.

Milena ru_RU # Здравствуйте, меня зовут Milena. Я – русский голос системы.

Moira en_IE # Hello, my name is Moira. I am an Irish-English voice.

Monica es_ES # Hola, me llamo Monica y soy una voz española.

Nora nb_NO # Hei, jeg heter Nora. Jeg er en norsk stemme.

Paulina es_MX # Hola, me llamo Paulina y soy una voz mexicana.

Pipe Organ en_US # We must rejoice in this morbid voice.

Princess en_US # When I grow up I'm going to be a scientist.

Ralph en_US # The sum of the squares of the legs of a right triangle is equal to the square of the hypotenuse.

Samantha en_US # Hello, my name is Samantha. I am an American-English voice.

Sangeeta en_IN # Hello, my name is Sangeeta. I am an Indian-English voice.

Sara da_DK # Hej, jeg hedder Sara. Jeg er en dansk stemme.

Satu fi_FI # Hei, minun nimeni on Satu. Olen suomalainen ääni.

Serena en_GB # Hello, my name is Serena. I am a British-English voice.

Sin-ji zh_HK # 您好,我叫 Sin-ji。我講廣東話。

Tarik ar_SA # مرحبًا اسمي Tarik. أنا عربي من السعودية.

Tessa en_ZA # Hello, my name is Tessa. I am a South African-English voice.

Thomas fr_FR # Bonjour, je m’appelle Thomas. Je suis une voix française.

Ting-Ting zh_CN # 您好,我叫Ting-Ting。我讲中文普通话。

Tom en_US # Hello, my name is Tom. I am an American-English voice.

Trinoids en_US # We cannot communicate with these carbon units.

Veena en_IN # Hello, my name is Veena. I am an Indian-English voice.

Vicki en_US # Isn't it nice to have a computer that will talk to you?

Victoria en_US # Isn't it nice to have a computer that will talk to you?

Whisper en_US # Pssssst, hey you, Yeah you, Who do ya think I'm talking to, the mouse?

Xander nl_NL # Hallo, mijn naam is Xander. Ik ben een Nederlandse stem.

Yelda tr_TR # Merhaba, benim adım Yelda. Ben Türkçe bir sesim.

Yuna ko_KR # 안녕하세요. 제 이름은 Yuna입니다. 저는 한국어 음성입니다.

Zarvox en_US # That looks like a peaceful planet.

Zosia pl_PL # Witaj. Mam na imię Zosia, jestem głosem kobiecym dla języka polskiego.

Zuzana cs_CZ # Dobrý den, jmenuji se Zuzana. Jsem český hlas.