On Fri, 2013-11-08 at 14:22 +0200, Sivosuo, Matti-Pekka wrote:
> Hi,
> 
> There's unfortunately no documentation existing about this topic but
> Krisztian can surely help you in understanding how commands can be
> defined.
> 
> -Matti-Pekka
> 
> On 7.11.2013 15:28, Counihan, Tom wrote:
> 
> > Thanks Geoffroy,
> > 
> >  
> > 
> > In part it does. But is there more?
> > 
> > It looks to me to be a management interface of management of a
> > ‘backend’.

Yes, that is the speech-recognition backend API. IOW, that is the
interface through which the Sphinx (and hopefully soon also a Nuance)
backend registers itself to SRS/Winthorpe core.

> > 
> > What’s missing for me is how to populate an action model – i.e.
> > commands with actions.
> > 
> >  
> > 
> > Maybe I’m misinterpreting something here?

You are interested in the client interface. That is the interface which
applications (SRS/Winthorpe clients) can use to do things like

  - register themselves and declare their command set
  - request activation/deactivation of their commands
  - query available TTS voices
  - request TTS
  - receive SR activation/deactivation and command notifications
  - receive TTS progress notifications

Here is the core client interface:
https://review.tizen.org/git/?p=profile/ivi/speech-recognition.git;a=blob;f=src/daemon/client.h;h=93ae7a02b2a0eba524d0154a47ffa8c9eb4fceea;hb=00ba0070ef6a1c256f5739a331631a6c29e4f47b

It is basically a publish/subscribe (request/callback) interface that
any plugin can access. There are various plugins then which provide
IPC-specific bindings to this interface to make it available to entities
outside of SRS/Winthorpe (external clients). Essentially these expose
the client interface over their choice of IPC mechanism.

Currently there are bindings for D-Bus and Tizen WRT. The D-Bus bindings
are rather complete, the command-line test client uses this. The Tizen
WRT bindings are more of a limited demo version that allowed us to
quickly voice-enable some demo apps. Brian is working on a full version
of this which will eventually implement (a sufficiently large subset
with any necessary extensions of) the Google Web Speech Draft JavaScript
API using SRS/Winthorpe as a backend. I have been working on plain
socket bindings to enable applications to use SRS/Winthorpe services
without any dependency on D-Bus.

If an application provides a versatile enough interface for controlling
its functionality externally there is also the choice of writing an
application- (or protocol-) specific plugin which registers itself and
the desired application command set using directly the core client
interface and then remote-controls the application according to the SR
notification callbacks it receives. The MPRIS2 plugin, which provides
rudimentary speech control for MPRIS2-compliant media players, is a good
example of this. 

> > Tom.

  Cheers,
    kli

PS.
Note that currently in the default setup you cannot use arbitrary words
in your command definitions (unless you update the command dictionary
accordingly). Well, technically you can but it will not work as expected
because our demo command dictionary has a limited set of words. Ideally
we should generate the dictionary based on the active (or the full
registered) command set but this has not been implemented yet.

> >  
> > 
> > From: VanCutsem, Geoffroy 
> > Sent: Thursday, November 07, 2013 1:15 PM
> > To: Counihan, Tom; [email protected]
> > Subject: RE: VR plugin API definition
> > 
> > 
> >  
> > 
> > Hi Tom,
> > 
> >  
> > 
> > Is this what you’re looking for?
> > 
> >  
> > 
> > (from
> > https://review.tizen.org/git/?p=profile/ivi/speech-recognition.git;a=blob;f=src/daemon/recognizer.h;h=fbd94ba9069237bcc2b595edf2c03042990e5e75;hb=refs/heads/tizen)
> > 
> >  
> > 
> > /*
> > 
> >   51  * API to a speech recognition backend.
> > 
> >   52  */
> > 
> >   53 typedef struct {
> > 
> >   54     /** Activate speech recognition. */
> > 
> >   55     int (*activate)(void *user_data);
> > 
> >   56     /** Deactivate speech recognition. */
> > 
> >   57     void (*deactivate)(void *user_data);
> > 
> >   58     /** Flush part or whole of the audio buffer. */
> > 
> >   59
> >     int (*flush)(uint32_t start, uint32_t end, void *user_data);
> > 
> >   60
> >     /** Schedule a rescan of the given portion of the audio buffer. */
> > 
> >   61
> >     int (*rescan)(uint32_t start, uint32_t end, void *user_data);
> > 
> >   62     /** Get a copy of the audio samples in the buffer. */
> > 
> >   63
> >     srs_audiobuf_t *(*sampledup)(uint32_t start, uint32_t end, void 
> > *user_data);
> > 
> >   64     /** Check if the given language model exists/is usable. */
> > 
> >   65     int (*check_decoder)(const char *decoder, void *user_data);
> > 
> >   66     /** Set language model to be used. */
> > 
> >   67
> >     int (*select_decoder)(const char *decoder, void *user_data);
> > 
> >   68     /** Get the used language model. */
> > 
> >   69     const char *(*active_decoder)(void *user_data);
> > 
> >   70 } srs_srec_api_t;
> > 
> >  
> > 
> >  
> > 
> > Thanks,
> > 
> > Geoffroy
> > 
> >  
> > 
> > From: [email protected]
> > [mailto:[email protected]] On Behalf Of Counihan, Tom
> > Sent: Thursday, November 07, 2013 12:32 PM
> > To: [email protected]
> > Subject: VR plugin API definition
> > 
> > 
> >  
> > 
> > Hi Folks,
> > 
> >  
> > 
> > Could someone be so kind as to direct me to the API definition for
> > voice recognition plugin infrastructure?
> > 
> > 
> > Warm Regards
> > 
> > Tom
> > 
> >  
> > 
> >  
> > 
> > INTEL
> > 
> > Automotive Solutions Division (ASD)
> > 
> >  
> > 
> > Intel Shannon,
> > 
> > Dromore House,
> > 
> > East Park,
> > 
> > Shannon,
> > 
> > Co. Clare,
> > 
> > Ireland
> > 
> >  
> > 
> > Tel : +353 61 477718
> > 
> >  
> > 
> > --------------------------------------------------------------
> > Intel Shannon Limited
> > Registered in Ireland
> > Registered Office: Collinstown Industrial Park, Leixlip, County
> > Kildare
> > Registered Number: 308263
> > Business address: Dromore House, East Park, Shannon, Co. Clare
> > 
> > This e-mail and any attachments may contain confidential material
> > for the sole use of the intended recipient(s). Any review or
> > distribution by others is strictly prohibited. If you are not the
> > intended recipient, please contact the sender and delete all copies.
> > 
> > 
> > --------------------------------------------------------------
> > Intel Shannon Limited
> > Registered in Ireland
> > Registered Office: Collinstown Industrial Park, Leixlip, County
> > Kildare
> > Registered Number: 308263
> > Business address: Dromore House, East Park, Shannon, Co. Clare
> > 
> > This e-mail and any attachments may contain confidential material
> > for the sole use of the intended recipient(s). Any review or
> > distribution by others is strictly prohibited. If you are not the
> > intended recipient, please contact the sender and delete all copies.
> > 
> > 
> > 
> > _______________________________________________
> > IVI mailing list
> > [email protected]
> > https://lists.tizen.org/listinfo/ivi
> 

---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
_______________________________________________
IVI mailing list
[email protected]
https://lists.tizen.org/listinfo/ivi

Reply via email to