Members | Sign In
Legacy MOVI User Community Forum (readonly) > MOVI Question & Answers
avatar

Pause between spoken sentances

posted Feb 18, 2017 21:16:00 by IanPatterson
Hi,

I've noticed theres a default pause between the sentences that are spoken by the recognizer.say() method (when coded in Arduino) that seems to be around 1 second. Is there any way of changing this so that the sentences are spoken without this pause? Why is it there - surely if a pause was needed it could be controlled by the delay() method in Arduino?

Regards,

Ian

page   1
8 replies
avatar
GeraldFriedland said Feb 20, 2017 21:11:52
One entire second sounds quite long. Which version of the library and firmware are you using? In v1.10 of the firmware and library we worked on making this pause shorter.

In anyways, recognizer.say() does more than just executing the speech synthesizer: It also needs to pause the recognition for a bit so the sentence said is not part of what is being recognized. There is fiddling with timing which sometimes takes a couple tens of a second.

Gerald
[Last edited Feb 20, 2017 21:12:06]
avatar
IanPatterson said Feb 22, 2017 20:28:11
Hi Gerald, Thanks for the reply.

To answer your question, yes, I am using v1.10 of the firmware.

I am not using the speech recognition function in the particular piece of code I'm testing, just a series of recognizer.say() commands.

I thought it would be cool to have MOVI sing a song, which should have been possible using a combination of the new functions in release 1.10 regarding pitch, speed etc.

As I understand it, one sets these parameters before each recognizer.say() command, and the following sentence is spoken according to the parameters.

A song would be possible by splitting sentences into groups of words, each group at a particular pitch, and saying these sentences one after the other.

However, this pause (yes, it really is 1 second!) makes it sound like MOVI smoked a lot of cannabis before attempting to sing the song.

Any ideas on how to solve this?

Regards

Ian



avatar
GeraldFriedland said Feb 23, 2017 04:54:14
Ian,

This is a hard one!

So you switch pitch, run a say command, switch pitch again, run another say command?

You are right, what MOVI does is probably too slow. The only idea that I have is to use a board with hardware serial port and then us faster bandwidth for the serial communication. But I am not sure if this is bottleneck.

Do you have a code snippet for me to play around with?

Gerald
avatar
IanPatterson said Feb 27, 2017 06:56:17
Hi Gerald,

Thanks for taking the time to look at this.

Yes, your description above is what I'm trying to do.
However the pauses appear between sentences regardless of changing pitch between them. I've pasted an example below, first a snippet from a friend's poem, then a broken down sentence so you can see the affect the pauses have in this context.

#include <MOVIShield.h>



#include "MOVIShield.h" // Include MOVI library, needs to be *before* the next #include

#ifdef ARDUINO_ARCH_AVR
#include <SoftwareSerial.h> // This is nice and flexible but only supported on AVR architecture, other boards need to use Serial1
#endif

MOVI recognizer(true); // Get a MOVI object, true enables serial monitor interface, rx and tx can be passed as parameters for alternate communication pins on AVR architecture

void setup()
{



recognizer.init(); // Initialize MOVI (waits for it to boot)

}

void loop() // run over and over
{
recognizer.say("I will now not recite a powme");

recognizer.say("She liked Frank, they connected");
delay(500);

recognizer.say("despite his expressionless face. Behind the wound-up limbs and tremor");
recognizer.say("a gentle man, shone out from the mask he wore");

recognizer.say("When she visited, they wood share a cuppa");

recognizer.say("chat about this and that");

recognizer.say("do the medication shuffle");
recognizer.say("a two-step dance they both knew well.");

recognizer.say("She had heard, about stem cell research");
//******************************

recognizer.say("It");

recognizer.say("would");

recognizer.say("be");
recognizer.say("great");

recognizer.say("to");
recognizer.say("say");

recognizer.say("this");

recognizer.say("without");
recognizer.say("pauses!");

}
avatar
IanPatterson said Feb 27, 2017 18:55:32
Ps the above code is a snippet from a bigger chunk. I set up a software serial port at 9600 baud rate in the bigger piece, and I'm using an Arduino Uno.
avatar
IanPatterson said Mar 04, 2017 09:23:07
Hi Gerald,


Have you had a chance to have any thoughts re the above?

Regards

Ian
avatar
GeraldFriedland said Mar 06, 2017 04:27:54
Ian,

I just checked. There is literally a 0.5s delay hard-coded into the firmware after every SAY command. To be frank: I am not sure why it's there other than: We never thought of MOVI singing.

I'll put in a feature request so it will be investigated for the next firmware release.

Sorry, that's all I can do at this point.

Gerald

P.S.: Filed here: https://github.com/audeme/MOVIArduinoAPI/issues/21
[Last edited Mar 06, 2017 04:29:36]
avatar
IanPatterson said Mar 06, 2017 06:43:43
Hi Gerald,

Thanks for this - I really appreciate the fact you've looked into it and raised the feature request. If the issue gets fixed, I'll send you a video of my robot singing :-)

Regards

Ian
Login below to reply: