Author Topic: Faster TTS.Speech - Response Management  (Read 2178 times)

0 Members and 1 Guest are viewing this topic.

zen_SuR

  • Jr. Member
  • **
  • Posts: 15
  • Karma: 2
    • View Profile
Faster TTS.Speech - Response Management
« on: August 31, 2017, 09:04:01 PM »
Faster TTS.Speech - Response Management

Description:
Create a php-formular based on your commandtree. In this formular you can put in tts-strings that are used randomly when the command is called. On the fly. With 1 Click.


Setup/Update Online Formular:
======================================
- Put the attached folder "formupdate" in your vc-installfolder.
- copy attached xml into your command tree
- open the command called "setup". Put in the path to your webspace were you will store the php formular
- Press Save and Execute.
- upload the now generated contents of the folder "/formupdate/to_webspace" to your webspace
- set chmod for files to 777 in your ftp client
- go to your webspace and open input_formular.php.
- try my examplecommands and see if it works.

now for the commandstructure for it to work:
- write "public" as first word in the command description (this field). Only then command will show up in the form.
- set "vc.setEventTimer" with "1" for one second and set the eventname to "speak" as the first action.


what do you guys think of it? I use it to fastly fill up tts commandresponses to make vc feel way more immersive without even having to open the commandbuilder. I also let friends fill it out for me so i get surprise-answers from voxcommando.

zen_SuR

  • Jr. Member
  • **
  • Posts: 15
  • Karma: 2
    • View Profile
Re: Faster TTS.Speech - Response Management
« Reply #1 on: September 02, 2017, 03:00:56 PM »
i just found a little mistake


in createtxt command i need to put a blank space in the second field... so something has to write... just leaving it blank wont create the txtfile where the answers are stored.

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Faster TTS.Speech - Response Management
« Reply #2 on: September 03, 2017, 12:33:08 PM »
This is a super fun idea, thanks for posting it.

I took the liberty of filling out your web form a few times, and I think James did as well. :)

We did find an error in the construct_page command. The last action is trying to launch the local php file instead of the web page. We changed the command to:

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.3.8-->
<command id="368" name="construct_page" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>File.Read</cmdType>
    <params>
      <param>{Path.VC}\formupdate\varibales\input_php.txt</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.SetVar</cmdType>
    <params>
      <param>phpcode</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>File.Read</cmdType>
    <params>
      <param>{Path.VC}\formupdate\varibales\bla2.txt</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.SetVar</cmdType>
    <params>
      <param>formcode</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>file.read</cmdType>
    <params>
      <param>{Path.VC}\formupdate\varibales\input.php</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.Replace</cmdType>
    <params>
      <param>###phpcode###</param>
      <param>{var.phpcode}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.Replace</cmdType>
    <params>
      <param>###formcode###</param>
      <param>{var.formcode}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>File.Write</cmdType>
    <params>
      <param>{Path.VC}\formupdate\to_webspace\input_formular.php</param>
      <param>{LastResult}</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>File.Read</cmdType>
    <params>
      <param>{Path.VC}\formupdate\varibales\webspacepath.txt</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Launch.OpenURL</cmdType>
    <params>
      <param>{LastResult}\input_formular.php</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <event>construct_formpage</event>
</command>

1. It looks like, if we want to add other command fields to the php form, we then need to manually upload the php file to our web server each time. Is that correct? (I just wanted to mention it for anyone who wants to experiment on their own.)

2. I notice that you're using PY.ExecString > result = 'string' to set your {LastResult} variable. Is there a reason you're not using the Results.SetLastResult action?

3. On my server I ran into some 500 errors when setting the file permissions. For our users who're comfortable setting public permissions on their website in order to make this work, just a note that you might still need to debug a bit to find which permissions settings will work on your server.


I think this is a really cool idea for people who have a website. I personally am not that comfortable with the security aspect. That is always up to each person to decide what works for them, of course.

James and I were brainstorming about other possible implementations, possibly using Dropbox. We'll let you know if/when we come up with something. Sometimes it's interesting to compare how different people solve the same challenge.
« Last Edit: September 03, 2017, 12:36:51 PM by nime5ter »
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

zen_SuR

  • Jr. Member
  • **
  • Posts: 15
  • Karma: 2
    • View Profile
Re: Faster TTS.Speech - Response Management
« Reply #3 on: September 03, 2017, 04:27:50 PM »
Quote
I took the liberty of filling out your web form a few times, and I think James did as well. :)

yes he definetly did. james seems quite full of himself. rightfully so.
;-)

Quote
We did find an error in the construct_page command. The last action is trying to launch the local php file instead of the web page. We changed the command to:

this is quite intentional since i found no cool way to manage the upload-management. the system is in constant danger of overwriting already existing entries on the webspace. some kind of automation that checks the existing entries, appends them to the new txts would solve that. but do you know of any "slick" way to do an automatic ftp upload after creation? i need this system to be really public available since i harvest my friends for textblocks for quite some time now. its hillarious (about 120 different "context"-blocks by now as i call it. it feels like a rude and misguided AI i lost control over... your entries are now part of the collection btw and they fit quite well)

Quote
2. I notice that you're using PY.ExecString > result = 'string' to set your {LastResult} variable. Is there a reason you're not using the Results.SetLastResult action?

no, no particular reason.

Quote
3. On my server I ran into some 500 errors when setting the file permissions. For our users who're comfortable setting public permissions on their website in order to make this work, just a note that you might still need to debug a bit to find which permissions settings will work on your server.

i really would like to know so much more about this topic... i did 777 because i dont know better.

Quote
I think this is a really cool idea for people who have a website. I personally am not that comfortable with the security aspect. That is always up to each person to decide what works for them, of course.

do you have any idea of how to get rid of this concerns?

Quote
James and I were brainstorming about other possible implementations, possibly using Dropbox. We'll let you know if/when we come up with something. Sometimes it's interesting to compare how different people solve the same challenge.

it induces endless joy to hear that!!!
if we can work around dropbox i would highly appreciate it since their service kind of su.... nowadays. but whatever works i guess.


what i really also want to achive is to provide an interface to external users to also create "questions" that are automatically added on restart of voxcommande. the answers also need aditionial values to be set so they work optimally with the much bigger interfacesystem (personalitysimulator, tamagochi, whatever) for voxcommandoi am quite working on*.

there would be endless possibilities to create/grow different "AI experiences" (whatever this is...) for the people out there that completly escape the imagination of the user itself. or it would be just funny to see how people load different grown personalities of other users and stuff like that. a database of different "personalities" like "butler", "teacher", "crazy catlady", "girlfriend/boyfriend" think of a lot of siris without being so uptitght and 100% customisable in its behaviour with special commands attached to them). or let your girlfriend make a boring version that pretends to be her so she has the feeling of being part of the voxcommando-experience and suddenly finds it cute when you ignore her because of configuring....(yes, i know that was oddly specific)

*(heeeey..... actually.....it works really well already....  you didnt see it yet because right now there would be copyrightcomplications with a japanese hentai-simulator-manufactor - but i am working on that ;) ) you will meet "Dominique" soon enough in whatever form. if you liked this you will love that ;)

***EDITED my syntax on james.

« Last Edit: September 03, 2017, 07:53:43 PM by zen_SuR »

nime5ter

  • Administrator
  • Hero Member
  • *****
  • Posts: 2012
  • Karma: 61
    • View Profile
    • Getting Started with VoxCommando
Re: Faster TTS.Speech - Response Management
« Reply #4 on: September 03, 2017, 06:13:49 PM »
yes he definetly did. james seems quite full of himself.
;-)

:) Ha, I can tell you are not a native English speaker. That is quite an insulting thing to say, which I don't imagine was your intention. But the responses that you think were written by James were probably mine.

Quote
i really would like to know so much more about this topic... i did 777 because i dont know better.

The best option would be to search online for discussions of the security risks of 777 permissions. Whether it's a risk worth taking really depends on what you generally use your web server for, and where it is hosted.

It sounds like you have pretty ambitious plans. Good luck with your implementation and keep us informed of your progress.
TIPS: POST VC VERSION #. Explain what you want VC to do. Say what you've tried & what happened, or post a video demo. Attach VC log. Link to instructions followed.  Post your command (xml)

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7714
  • Karma: 116
    • View Profile
    • VoxCommando
Re: Faster TTS.Speech - Response Management
« Reply #5 on: September 04, 2017, 08:51:08 AM »
Somebody is full of something.  :biglaugh