Author Topic: Rosie Bot  (Read 4862 times)

0 Members and 1 Guest are viewing this topic.

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Rosie Bot
« on: February 24, 2022, 01:58:52 pm »
Hi all. I decided to play around with the Microsoft Windows text-to-speech stuff some more by making a simple chat bot that I named Rosie. There's a few questions that Rosie answers and I also decided to add a .txt file for the user to be able to make their own bot by adding as many questions and answers as they wish. To do that, simply type: add, or addon, or add question and it will go to that mode. It's not perfect of course and I haven't tested it fully, like if someone adds a question that it already has (either in the botaddon file or internally in the bot) but I'm guessing it would just answer with both answers, possibly speaking both at the same time. If that happens, or any other botaddon.txt problem, just open up the .txt file with Notepad and carefully erase the --- line above it, the question, and the answer. I will put all of this in the comments section of the code at the start so programmers know. But have fun with it, that's why I made it. :) Also tell me what you think. Thanks.

The 2 files are zipped in Rosie Bot.zip and placed in the attachments of this post. Put these 2 files in the same folder.

Edit: Attachment deleted, please see the replies below to get the newest one.
« Last Edit: February 24, 2022, 08:53:18 pm by SierraKen »

Offline SpriggsySpriggs

  • Forum Resident
  • Posts: 1145
  • Larger than life
    • View Profile
    • GitHub
Re: Rosie Bot
« Reply #1 on: February 24, 2022, 02:01:11 pm »
Speaking of text to speech, I wonder if you can access the new natural voices in Windows 11 through the command line. The new voices sound really good
Shuwatch!

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Rosie Bot
« Reply #2 on: February 24, 2022, 02:42:21 pm »
@SierraKen  have you ever experienced a chat with ELIZA?

Rosie: "Sorry I do not understand."

ELIZA never says sorry. But if you say it, Eliza has a choice of these r=responses to that k=key word:
Quote
r:Please don't apologize!
r:Apologies are not necessary.
r:What feelings do you have when you apologize?
r:Don't be so defensive!
k:sorry
* Player with ELIZA script.zip (Filesize: 3.86 KB, Downloads: 212)
« Last Edit: February 24, 2022, 02:55:22 pm by bplus »

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: Rosie Bot
« Reply #3 on: February 24, 2022, 02:52:25 pm »
ROFL that's a funny bot. I've never used it before. I'm sure many people have made chat bots, probably even on this forum, but I wanted to add text to speech for a new dimension in chatting. :) Of course mine can't carry on conversations like Eliza can, it only does a few questions and answers them. I might add more to it sometime soon. Thanks for showing me.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Rosie Bot
« Reply #4 on: February 24, 2022, 03:12:26 pm »
Yeah Ron took the Player code and added a script for Racheal and gave it/her a voice, much like Rosie's:
* Player with Ron's Rachel Script and voice.zip (Filesize: 10.06 KB, Downloads: 207)

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: Rosie Bot
« Reply #5 on: February 24, 2022, 06:56:43 pm »
That's really cool, has lots of potential, thanks B+.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Rosie Bot
« Reply #6 on: February 24, 2022, 07:36:30 pm »
Yeah the player spots a keyword like sorry or no or you and has several responses loaded to reply to that keyword plus the code parses what you said around the keyword so that reply looks natural using some of your own words in it.

Then it has generic responses if it doesn't find a key word eg "Please elaborate on that." wait, Eliza never says please. LOL

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: Rosie Bot
« Reply #7 on: February 24, 2022, 07:41:57 pm »
Right now I am almost finished changing the bot by removing all of the internal questions (besides the first one and the quit, etc. ones) and putting them all on the botaddon.txt file. That way it can scan them every time someone wants to add one to the file with the bot to see if it's already there first.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Rosie Bot
« Reply #8 on: February 24, 2022, 08:00:18 pm »
Gotta say, I think you are giving yourself allot of work. It's hard to match a question worded perfectly.

Perhaps single word commands for Rosie to do like do calculations, tell time and date, lookup phone numbers, take notes, make lists, lookup other things, play music, show pictures... be like a secretary or PA.

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: Rosie Bot
« Reply #9 on: February 24, 2022, 08:11:41 pm »
Yeah I might make something like that someday. But right now this is just Rosie, my first bot. :) I'm adding more to the txt file right now manually. :)

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Rosie Bot
« Reply #10 on: February 24, 2022, 08:43:53 pm »
I hope you didn't base it on Rosie O'Donnell. If you did, I will have to get back to programming and create the Donald bot, which will be the biggest most linguistically proficient bot ever made, and will kick Rosie's ASCII back to the empty screen.

Pete :D
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: Rosie Bot
« Reply #11 on: February 24, 2022, 08:50:10 pm »
No Pete I did not. In fact I added some questions regarding politics and it answers with: "I do not do politics."
I added some more questions and the time and date to it, thanks to B+'s idea. Pretty much all of the questions (except the first one, date, time, and quit) are on the botaddons.txt file. Feel free to open the file with Notepad and check them out. If you add any manually, make sure and add the: --- above each question (but not the answer). It's easier to add questions and answers from within the bot by typing: add
I also added a way for it to detect any +,-,*, or / in the question with a reply saying: I do not do math.
Also with B+'s idea, I removed a lot of the "Sorry" replies.

Here is the zip file of the 2 files. I will delete the original one above. Thanks for checking it out and feel free to add anything you wish.


* Rosie Bot.zip (Filesize: 2.65 KB, Downloads: 218)

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Rosie Bot
« Reply #12 on: February 24, 2022, 08:55:14 pm »
Thanks for the rapid reply. So far, all I coded was the RGB values for orange, and of course now I have to pull what little of the bot I got started on out of the tanning booth.

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/