AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Scrubbing input
 
 

G’morning Bruce, I hope all is well with you and the move went smoothly. Let me add that I (I think we all) are anxiously awaiting the release of ChatScript 3.0.

A quick question on input.
I am using the output of pocketshinx (speech to text) as input to ChatScript, presently through a pipe in the shell. The problem is the output from ps is 4 lines for one output, as follows:

READY….
Listening…
Recording is stopped, start recording with ad_start_rec
Stopped listening, please wait…
00000000#: RESPONSE

the first 4 lines are not needed (and I think the 3 is not always there), nor is the 9 digit counter and colon preceding RESPONSE.

So the question is, can Chatscript scrub all that junk before sending RESPONSE into the engine, or would I be better off doing that on the other end in your opinion? (Note, I have basically the same question in reverse over in the pocketsphinx forums).

regards, Richard

 

 
  [ # 1 ]

You have a choice.  If you want chatscript to do it, then you need your script to keep a global count of inputs seen. For the first 4, it simple declares FAIL(INPUT) so outputs nothing. On the last one, you reset your counter, and allow it to create an output.

 

 
  [ # 2 ]

Can Chatscript discard specific matches? I ask because, in further investigation of this, Pocketsphinx does not always output all four lines. Sometimes only three. So, can I (how would I) set those four specific lines as FAIL(INPUT) as opposed to doing a count?

regards, Richard

 

 
  [ # 3 ]

pattern match the inputs you want to discard, and when you have your match, fail input.

 

 
  login or register to react