Germany
Asked — Edited

ARC Programmierer Aus Deutschland Programmer From Germany

Hallo, da mein english eine Katastrophe ist bin ich auf der suche nach einem EZ-Robot Bastler aus Deutschland zum austauschen. Hat jemand Interesse?

Hello there, because my English is a disaster I am to replace hobbyists from Germany looking for an EZ-Robot. Is someone interested?

Greetings Sven


ARC Pro

Upgrade to ARC Pro

Experience early access to the latest features and updates. You'll have everything that is needed to unleash your robot's potential.

Germany
#33  

Hello DJ, Yes, there are variables, but what should I do so the robot says this Variable?

SayWait ("$date") is working SayWait ("$month") is working SayWait ("$year") is working SayWait ("$day") is working SayWait ("$dayName") not working SayWait ("$hour") is working SayWait ("$minute") is working SayWait ("$second") is working SayWait ("$monthName") not working

Alle Variablen mit (Name) funktionieren nicht.

Here another Test:

Start
1: ControlCommand("Speech Recognition", PauseOn)
2: $W = $DayName
3: SayWait("Heute ist" + "$W")
Done (00:00:03.3601919)

The Robot dont say the Day (Freitag).

In Variable Watcher I see that it is set correctly.

Do you know what I mean?

#34  

@lizpoir You will need to remove the quotes around the $W variable:


SayWait("Heute ist" + "$W")
  #Should be:
SayWait("Heute ist" + $W)

Testing it in various voices, I find none of them can seem to pronounce Friday correctly. Anna comes closest but adds something to the end of the word. I'm not sure how it is in German. Maybe it is pronounced correctly then. I mention this in case you find it does not pronounce it correctly in German either. It is a fault in the voice algorithm and not in the script itself.

EDIT I found the cause of the pronunciation problem. There needs to be a space at the end of the first part:


SayWait("Heute ist " + $W)
#   Space Added __|

It was treating it as all one word before (istFreitag).

EDIT AGAIN I forgot to mention that, if you remove the quotes around the original variables, such as $DayName, it will also work without having to use the $W variable. Such as:


SayWait("Heute ist " + $DayName)  #Correct
SayWait("Heute ist " + "$DayName") #Wrong 

Basically, the rule is, never put quotes around a variable when using it in a script.

Germany
#35  

@WBS00001 Thanks for the help now it works always. To me it was not about the debate but it just did not work, the robot did not say anything. This is my script works great:


ControlCommand("Speech Recognition", PauseOn)
$v = $monthName
$w = $DayName
$response = getrandomunique(0,3)
if($response =0)

$z=1
SayWait("Heute ist" + $w + "der" + $day + "te" + $v + $year) 
$z=0

elseif($response =1)

$z=1 
SayWait("Es ist noch immer" + $w + "der" + $day + "te" + $v + $year)
$z=0

elseif($response = 2)

$z=1 
SayWait("Wie oft fragst Du mich denn noch, heute ist" + $w + "der" + $day + "te" + $v + $year)
$z=0

endif

You have noted that even without an additional variable works, unfortunately this is not the case with me:


SayWait("Heute ist " + $DayName)

Dont work, but this work:


$w = $DayName
SayWait("Heute ist" + $w) 

It's sometimes not that easy. Thanks to you and greetings from Germany.

Sven

PRO
Synthiam
#36  

You can save a lot of code and typing by using the variable on the same line. Also, add a space between the words. Ifyoudonotaddspacesitdoesn'tmakesense. Language requires spaces.

This is not good:


say("day is" + $dayname)

This is good:


say("day is " + $dayname)

*Note how there is a space at end of "day is "

You're doing good!

PS, there is are many example projects in the EXAMPLES folder of ARC. One in particular that could be useful for this conversation is called VARIABLES.EZB. I would recommend viewing that example project. It demonstrates how to use variables, spaces, etc...

#37  

@lizpoir I'm very glad to hear you have it working. Still, it's strange that adding the space after 'ist' did not work for you. It may be just an odd language difference.

Would you run a test to satisfy my curiosity? Please try adding a period after ist, like this:


SayWait("Heute ist.  " + $DayName)

to see what happens. Thanks.

Germany
#38  

@WBS00001 with 2 periods after (ist) works also.

I thank you all for the help, that was exactly my fault, the space was missing. Great, thank you!

ControlCommand("Speech Recognition", PauseOn)

$response = getrandomunique(0,3)
if($response =0)

$z=1
SayWait("Heute ist " + $DayName + "der" + $day + "te" + $MonthName + $year) 
$z=0

elseif($response =1)

$z=1 
SayWait("Es ist noch immer " + $DayName + "der" + $day + "te" + $MonthName + $year)
$z=0

elseif($response = 2)

$z=1 
SayWait("Wie oft fragst Du mich denn noch, heute ist " + $DayName + "der" + $day + "te" + $MonthName + $year)
$z=0

endif

It works great!

Yes I try a lot and most also have a lot of problems just getting to be active because of the language in the forum. Please forgive me this also many questions that should not be basically. I try to learn everything.

They are very helpful thanks a lot. I have now also equal a new problem to which I have just uploaded a video. I'm going to build a new small robot, this I use multi-rotation servos and does not work properly. Explore the video:

https://youtu.be/wwaaWDcvSrg

It is probably not the servos because I have tested 6 such servos.

#39  

Ok, good. I must have misunderstood your previous post. I thought you were saying that it still did not work properly even when you added a space after the ist.

One more point. There should be spaces before and after der and te also. This makes them separate words. Also a space between the varaibles $MonthName and $year. It seems to work out ok now because the speech generator automatically breaks up the speech sent to it if it sees a number at the end of a word. This is what you are actually sending to the 'SayWait' command now: Heute ist freitagder30teJanuar2016

This is what you really want to send: Heute ist freitag der 30 te Januar 2016

Adding those spaces will do that.

In this particular case it will sound much the same either way, however, that will not always be the case.

Unfortunately, I've never worked with the continuous rotation servos so I have no advice for your on that but I'm sure someone will.

Germany
#40  

@WBS00001 Please excuse my late reply, I have a lot of business to do at the moment. Thank you for your renewed instructions. I will implement them in the next few days and hope that someone will help me with the servo problem.