Speech recognition

Hello NG,

a user reported a suggestion of recognising speech for an editor using
styled text control (scintilla control).

Are there any experiences of users or any possible interfaces to implement that?

http://sourceforge.net/forum/forum.php?thread_id=1753554&forum_id=283802

http://knowledgebase.nuance.com/view.asp?tnID=5104&sQuery=4247

Many thanks in advance!

···

--

Franz Steinhaeusler

Hi Franz,

a user reported a suggestion of recognising speech for an editor using
styled text control (scintilla control).

Are there any experiences of users or any possible interfaces to implement that?

http://sourceforge.net/forum/forum.php?thread_id=1753554&forum_id=283802

http://knowledgebase.nuance.com/view.asp?tnID=5104&sQuery=4247

Many thanks in advance!

I don't know if it is an issue or not, but Spy++ reports that
wx.StyledTextCtrl is not one of the classes reported in the link you
provided, i.e.:

Edit
RichEdit
RichEdit20A
RichEdit20W
RichEdit50W

It just says wx,StyledTextCtrl = wxWindowClassNR, which means almost
nothing. The only control I found in the wxPython demo is wx.TextCtrl
(obviously), which reports "Edit" or "RichEdit50W" depending on the
style you use for the wx.TextCtrl (i.e., wx.TE_RICH2).
I have tried also with RichTextCtrl, and Spy++ reports
wx.RichTextCtrl=wxWindowClass (see above). I am not that expert in
these things, but it looks like Scintilla does not offer this
functionality...

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/

···

On 6/11/07, Franz Steinhaeusler wrote:

Franz Steinhaeusler wrote:

Hello NG,

a user reported a suggestion of recognising speech for an editor using
styled text control (scintilla control).

Are there any experiences of users or any possible interfaces to implement that?

http://sourceforge.net/forum/forum.php?thread_id=1753554&forum_id=283802

http://knowledgebase.nuance.com/view.asp?tnID=5104&sQuery=4247

Many thanks in advance!

Hi Franz,
Maybe you better ask this on the scintilla list:
scintilla-interest@lyra.org

Stani

Hi Stani and Andrea,

thank you for your answers.

I already asked in
gmane.comp.lib.scintilla.devel list.

I'm also a not very confident, that such an interface
exist, but I will wait, maybe some other knows somewhat.

···

On Mon, 11 Jun 2007 15:45:43 +0200, Stani's Python Editor <spe.stani.be@gmail.com> wrote:

Franz Steinhaeusler wrote:

Hello NG,

a user reported a suggestion of recognising speech for an editor using
styled text control (scintilla control).

Are there any experiences of users or any possible interfaces to implement that?

http://sourceforge.net/forum/forum.php?thread_id=1753554&forum_id=283802

http://knowledgebase.nuance.com/view.asp?tnID=5104&sQuery=4247

Many thanks in advance!

Hi Franz,
Maybe you better ask this on the scintilla list:
scintilla-interest@lyra.org

Stani

--

Franz Steinhaeusler

As I understand the Scintilla architecture, this interface would be
provided by the platform layer, which for wxSTC is wx. I have not
tested for sure, but I *believe* that implementing wxAccessible for
wxSTC should work.

wxAccessible isn't exposed to wxPython, though, this work needs to be
done in the C++ layer.

···

On 6/11/07, Franz Steinhaeusler <franz.steinhaeusler@gmx.at> wrote:

On Mon, 11 Jun 2007 15:45:43 +0200, Stani's Python Editor <spe.stani.be@gmail.com> wrote:

>Franz Steinhaeusler wrote:
>> Hello NG,
>>
>> a user reported a suggestion of recognising speech for an editor using
>> styled text control (scintilla control).
>>
>> Are there any experiences of users or any possible interfaces to implement that?
>>
>> http://sourceforge.net/forum/forum.php?thread_id=1753554&forum_id=283802
>>
>> http://knowledgebase.nuance.com/view.asp?tnID=5104&sQuery=4247
>>
>> Many thanks in advance!
>>
>Hi Franz,
>Maybe you better ask this on the scintilla list:
>scintilla-interest@lyra.org
>
>Stani

Hi Stani and Andrea,

thank you for your answers.

I already asked in
gmane.comp.lib.scintilla.devel list.

I'm also a not very confident, that such an interface
exist, but I will wait, maybe some other knows somewhat.

--

Hi all,
I repost a message I send to the group compt.soft-sys.wxwindows few days ago, since I'm not sure I posted to the right group.

I have a problem using a toolbar in conjunction with aui when loading from
an XRC file. I solved the problem but I'm looking for a better solution.
This is what I have done:

In the XRC file I have a frame with a toolbar and a panel. After loading the
xrc file, I add the toolbar and the panel to the aui manager. But I get a
lot of problems in the toolbar redraw and moving the toobar leave an empty
toolbar space at the top of the window. I tried setting the flag
'dontattachtoframe' but this didn't solve the problem.
I solved in this way: in the xrc file I moved the toolbar from child of
frame to sibling of it. Then I loaded the xrc file and loaded frame and
toolbar separately. In this way the toolbar is working perfectly.

I copy an example in Pyhton that reproduce the problem (I work with Python
2.51 and wxPython 2.8.1.1):

class App(wx.App):
     def OnInit(self):
         self.res = xrc.XmlResource("./mio.xrc")
#my resource file
         self.frame = self.res.LoadFrame(None, 'MainFrame')
         self.panel = self.frame.FindWindowByName('Panel')
         self.toolbar = self.frame.FindWindowByName('ToolBar')
#toolbar as child of frame
         self.float_toolbar = self.res.LoadToolBar(self.frame,
'FloatToolBar') #toolbar as sibling of frame

         self._mgr = wx.aui.AuiManager()
         self._mgr.SetManagedWindow(self.frame)
         self._mgr.AddPane(self.panel,
wx.aui.AuiPaneInfo().Name("Panel").CenterPane())
         self._mgr.AddPane(self.toolbar,
wx.aui.AuiPaneInfo().Name("ToolBar").ToolbarPane())
         self._mgr.AddPane(self.float_toolbar,
wx.aui.AuiPaneInfo().Name("FloatToolBar").ToolbarPane())
         self._mgr.Update()

         self.frame.Show()
         self.SetTopWindow(self.frame)
         return True

....
extracted from my xrc file

<?xml version="1.0" encoding="cp1252"?>
<resource>
   <object class="wxFrame" name="MainFrame">
     <object class="wxToolBar" name="ToolBar">
       <object class="tool">
             ....some tools....
     </object>
     <object class="wxPanel" name="Panel">
     </object>
   <object class="wxToolBar" name="FloatToolBar">
     <object class="tool">
     ......some tools....
   </object>

I hope that the formatting is ok.
Commenting out a toolbar or the other it's easy to obtain the problem. Also
working with both toolbar shows that the child toolbar is not working
properly.

Where am I wrong? There's somethign that can I do to have the child toolbar
working? Perhaps I'm missing something, I'm just beginning to work with wx.
Thanks for any answer,
Enrico

Andrea Gavana wrote:

It just says wx,StyledTextCtrl = wxWindowClassNR, which means almost
nothing. The only control I found in the wxPython demo is wx.TextCtrl
(obviously), which reports "Edit" or "RichEdit50W" depending on the
style you use for the wx.TextCtrl (i.e., wx.TE_RICH2).
I have tried also with RichTextCtrl, and Spy++ reports
wx.RichTextCtrl=wxWindowClass (see above). I am not that expert in
these things, but it looks like Scintilla does not offer this
functionality...

As the person who asked about this functionality, I have a couple more questions. Further down in the Nuance application note, it says that if the window is an edit control but not recognized as such by NaturallySpeaking, you can "force" recognition and hopefully enable Select-and-Say. I need to know the class name and, if possible, which edit control of the support typed it behaves like. Glass is not terribly important because I can always experiment and have that altogether too familiar sinking sensation of "oh crap, not another one" if it doesn't work.

is that information available?

Glad to see you're subscribed here also. I will repeat most of the
information from my previous private mail here.

I've written the very bare bones of a wxAccessible implementation for
wxSTC and it seems to work - the Accessibility explorer (part of the
MS Active Accessibility SDK) identifies this as a text control, and it
retrieves the value.

VS 2003 implements it's text control in a similar way, except there
are children for each line, and then children of each line for each
character in the text. I assume this is to allow for interaction with
things like folding and selection, which I'm not going to implement
yet.

Can you tell me if Visual Studio works with the select and say
functionality you want? The VS 2005 Express edition (free download)
should be implemented in a similar way, please try that if you don't
have a full copy of VS.

Do you know C++, and are you capable of compiling wx and wxPython from
scratch to help test these features? If not, can you check a binary I
provide and see if it works?

The technical note from Nuance is about modifying their app to attempt
to force an uncooperative app to work. I couldn't find any information
for a developer to ensure that their app can cooperate, if you have
any contacts at Nuance that information would be helpful.

wxTextCtrl (both with and without wxTE_RICH) should work with select
and say, from what you're describing. Can you try them and confirm
that they work?

···

On 6/11/07, Eric S. Johansson <esj@harvee.org> wrote:

Andrea Gavana wrote:

> It just says wx,StyledTextCtrl = wxWindowClassNR, which means almost
> nothing. The only control I found in the wxPython demo is wx.TextCtrl
> (obviously), which reports "Edit" or "RichEdit50W" depending on the
> style you use for the wx.TextCtrl (i.e., wx.TE_RICH2).
> I have tried also with RichTextCtrl, and Spy++ reports
> wx.RichTextCtrl=wxWindowClass (see above). I am not that expert in
> these things, but it looks like Scintilla does not offer this
> functionality...

As the person who asked about this functionality, I have a couple more
questions. Further down in the Nuance application note, it says that if the
window is an edit control but not recognized as such by NaturallySpeaking, you
can "force" recognition and hopefully enable Select-and-Say. I need to know the
class name and, if possible, which edit control of the support typed it behaves
like. Glass is not terribly important because I can always experiment and have
that altogether too familiar sinking sensation of "oh crap, not another one" if
it doesn't work.

is that information available?

Chris Mellon wrote:

Glad to see you're subscribed here also. I will repeat most of the
information from my previous private mail here.

output a request onto the voice coder list to see if some folks can help.

I've written the very bare bones of a wxAccessible implementation for
wxSTC and it seems to work - the Accessibility explorer (part of the
MS Active Accessibility SDK) identifies this as a text control, and it
retrieves the value.

I turned off active accessibility because I was having performance problems prior to 9.5 naturally speaking. I'm wondering if I turn it back on if it might enable automatic connection or the very least, make it easier to force a connection

VS 2003 implements it's text control in a similar way, except there
are children for each line, and then children of each line for each
character in the text. I assume this is to allow for interaction with
things like folding and selection, which I'm not going to implement
yet.

Can you tell me if Visual Studio works with the select and say
functionality you want? The VS 2005 Express edition (free download)
should be implemented in a similar way, please try that if you don't
have a full copy of VS.

Like I said before, I really don't know but I can post a brief note on the voice coder list to find out the status

Do you know C++, and are you capable of compiling wx and wxPython from
scratch to help test these features? If not, can you check a binary I
provide and see if it works?

Sure. I'd be glad to play with the binary but modifying C++ source is out of the question because all of the punctuation and bumpy Names are extremely painful to type not to mention error prone to speak. I only have a couple thousand keystrokes in my hands per day and I need to save them for keyboard driven navigation.

The technical note from Nuance is about modifying their app to attempt
to force an uncooperative app to work. I couldn't find any information
for a developer to ensure that their app can cooperate, if you have
any contacts at Nuance that information would be helpful.

wxTextCtrl (both with and without wxTE_RICH) should work with select
and say, from what you're describing. Can you try them and confirm
that they work?

I'll be glad to try. We should talk off list about this unless people want to hear the chatter. For what it's worth, nuance is not very cooperative. I've lost contact with one resource although I may try to reach thim through other channels. as for getting information from nuance, it's well-nigh impossible. Back in the days of Dragon Systems, we had one or two people who were fantastic folks who helped us out. With nuance, the wall is up and there may be some cracks appearing in it and I can only hope it will open in a good way.

Andrea Gavana wrote:

It just says wx,StyledTextCtrl = wxWindowClassNR, which means almost
nothing.

This just means that it is a generic window, fully implemented in wx, and not a native widget.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Chris Mellon wrote:

As I understand the Scintilla architecture, this interface would be
provided by the platform layer, which for wxSTC is wx. I have not
tested for sure, but I *believe* that implementing wxAccessible for
wxSTC should work.

wxAccessible isn't exposed to wxPython, though, this work needs to be
done in the C++ layer.

It would need to be done in C++ anyway since wxSTC is a C++ class.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

ricercar@infinito.it wrote:

Hi all,
I repost a message I send to the group compt.soft-sys.wxwindows few days ago, since I'm not sure I posted to the right group.

I have a problem using a toolbar in conjunction with aui when loading from
an XRC file. I solved the problem but I'm looking for a better solution.
This is what I have done:

In the XRC file I have a frame with a toolbar and a panel. After loading the
xrc file, I add the toolbar and the panel to the aui manager. But I get a
lot of problems in the toolbar redraw and moving the toobar leave an empty
toolbar space at the top of the window. I tried setting the flag
'dontattachtoframe' but this didn't solve the problem.
I solved in this way: in the xrc file I moved the toolbar from child of
frame to sibling of it. Then I loaded the xrc file and loaded frame and
toolbar separately. In this way the toolbar is working perfectly.

This is exactly what I would have suggested to do.

An alternative is to call the frame's SetToolBar(None) so the frame doesn't try to manage the toolbar itself, but personally I think that creating the toolbar separately is probably the best.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

The accessibility stuff is dynamic and you set the accessibility
object on a per-instance basis. I think (although I'm not totally
sure) that wrapping wxAccessible the same way we wrap other pure
virtual objects should Just Work.

···

On 6/11/07, Robin Dunn <robin@alldunn.com> wrote:

Chris Mellon wrote:

> As I understand the Scintilla architecture, this interface would be
> provided by the platform layer, which for wxSTC is wx. I have not
> tested for sure, but I *believe* that implementing wxAccessible for
> wxSTC should work.
>
> wxAccessible isn't exposed to wxPython, though, this work needs to be
> done in the C++ layer.

It would need to be done in C++ anyway since wxSTC is a C++ class.

Hi,

I just tried to test your sample on 2.8.4.0, and it seems to work, using
both toolbars simultaneously with 'dontattachtoframe' flag set. I have
2.8.1.1 around also (wxGTK only), there there are some issues with
docking toolbars with buttons sometimes not aligned correctly, but still
I see no warnings. Strange..

Roman

···

On Mon, 2007-06-11 at 16:37 +0200, ricercar@infinito.it wrote:

Hi all,
I repost a message I send to the group compt.soft-sys.wxwindows few
days ago, since I'm not sure I posted to the right group.

I have a problem using a toolbar in conjunction with aui when loading from
an XRC file. I solved the problem but I'm looking for a better solution.
This is what I have done:

In the XRC file I have a frame with a toolbar and a panel. After loading the
xrc file, I add the toolbar and the panel to the aui manager. But I get a
lot of problems in the toolbar redraw and moving the toobar leave an empty
toolbar space at the top of the window. I tried setting the flag
'dontattachtoframe' but this didn't solve the problem.
I solved in this way: in the xrc file I moved the toolbar from child of
frame to sibling of it. Then I loaded the xrc file and loaded frame and
toolbar separately. In this way the toolbar is working perfectly.

I copy an example in Pyhton that reproduce the problem (I work with Python
2.51 and wxPython 2.8.1.1):

class App(wx.App):
     def OnInit(self):
         self.res = xrc.XmlResource("./mio.xrc")
#my resource file
         self.frame = self.res.LoadFrame(None, 'MainFrame')
         self.panel = self.frame.FindWindowByName('Panel')
         self.toolbar = self.frame.FindWindowByName('ToolBar')
#toolbar as child of frame
         self.float_toolbar = self.res.LoadToolBar(self.frame,
'FloatToolBar') #toolbar as sibling of frame

         self._mgr = wx.aui.AuiManager()
         self._mgr.SetManagedWindow(self.frame)
         self._mgr.AddPane(self.panel,
wx.aui.AuiPaneInfo().Name("Panel").CenterPane())
         self._mgr.AddPane(self.toolbar,
wx.aui.AuiPaneInfo().Name("ToolBar").ToolbarPane())
         self._mgr.AddPane(self.float_toolbar,
wx.aui.AuiPaneInfo().Name("FloatToolBar").ToolbarPane())
         self._mgr.Update()

         self.frame.Show()
         self.SetTopWindow(self.frame)
         return True

....
extracted from my xrc file

<?xml version="1.0" encoding="cp1252"?>
<resource>
   <object class="wxFrame" name="MainFrame">
     <object class="wxToolBar" name="ToolBar">
       <object class="tool">
             ....some tools....
     </object>
     <object class="wxPanel" name="Panel">
     </object>
   <object class="wxToolBar" name="FloatToolBar">
     <object class="tool">
     ......some tools....
   </object>

I hope that the formatting is ok.
Commenting out a toolbar or the other it's easy to obtain the problem. Also
working with both toolbar shows that the child toolbar is not working
properly.

Where am I wrong? There's somethign that can I do to have the child toolbar
working? Perhaps I'm missing something, I'm just beginning to work with wx.
Thanks for any answer,
Enrico

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Thanks for your attention. I forgot to mention that I'm using Windows 2000, yes not the last :slight_smile:
Anyway I upgraded to 2.8.4.0 and the problems remain. I will follow Robin Dunn suggestion and load frame and toolbar separately.
Thanks to you and Robin,
Enrico

···

At 21.04 11/06/2007 +0200, you wrote:

Hi,

I just tried to test your sample on 2.8.4.0, and it seems to work, using
both toolbars simultaneously with 'dontattachtoframe' flag set. I have
2.8.1.1 around also (wxGTK only), there there are some issues with
docking toolbars with buttons sometimes not aligned correctly, but still
I see no warnings. Strange..

Roman

Chris Mellon wrote:

···

On 6/11/07, Robin Dunn <robin@alldunn.com> wrote:

Chris Mellon wrote:

> As I understand the Scintilla architecture, this interface would be
> provided by the platform layer, which for wxSTC is wx. I have not
> tested for sure, but I *believe* that implementing wxAccessible for
> wxSTC should work.
>
> wxAccessible isn't exposed to wxPython, though, this work needs to be
> done in the C++ layer.

It would need to be done in C++ anyway since wxSTC is a C++ class.

The accessibility stuff is dynamic and you set the accessibility
object on a per-instance basis. I think (although I'm not totally
sure) that wrapping wxAccessible the same way we wrap other pure
virtual objects should Just Work.

Ah, ok. I just assumed that it needed a tighter integration than that. Thanks.

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Robin Dunn wrote:

Ah, ok. I just assumed that it needed a tighter integration than that. Thanks.

well actually, if it might be. For example menu items and such are easily handled with standard Microsoft accessibility type of functionality. Text area integration is somewhat more difficult because, as far as I understand, the text area needs to notify or indicate change back to the mediator between it and NaturallySpeaking. The reason for this is when someone types into a window, NaturallySpeaking will not know a thing about it if it is operating an open loop mode. (I.e. straight dictation into application). By closing the loop, NaturallySpeaking can match what it hears against what is in the buffer and do the right thing. To be honest, I don't fully understand this and I need to spend a few lunches with a friend in the business so I can describe things better