Category archives: Snaking

Discussions of programming, particularly of programming Python

RSS feed of Snaking

Aw, come-on QtDBus, just work already

[Update] I got it working by going down to the "connection" level and registering the callback there. The code below is updated with the working version... as of now I've got some basic "voice coding" possible, but lots more to do to make it practical and useful.

Plowing ahead with integrating Listener into Eric (my ...

Continue reading

Interpretation of Dictation

Sometimes as you're developing a project it's easy to lose site of the end goal. I've spent so long on giving Listener context setup, code-to-speech converters, etc. that the actual point of the whole thing (i.e. letting you dictate text into an editor) hasn't actually been built. Today I started on that a bit more. ...

Continue reading

Using GStreamer AppSink from Python

So I decided to play a bit with how to get raw audio samples from gstreamer pipelines. This is normally done (in C or whatever) with an `appsink` element in your gstreamer pipeline. You hook up the pipeline, watch for the buffer, and then you can map it into a Numpy buffer (or whatever you ...

Continue reading

Python-dbus needs some non-trivial examples

So I got tired of paying work this afternoon and decided I would work on getting a dbus service started for Listener. The idea here is that there will be a DBus service which does all the context management, microphone setup, playback, etc and client software (such as the main GUI and apps that want ...

Continue reading

Seem to need hidden-markov-models for text extraction...

So in order to "seed" listener with text-as-it-would-be-spoken for coding, I've built up a tokenizer that will parse through a file and attempt to produce a model of what would have been said to dictate that text. The idea being that we want to generate a few hundred megabytes of sample statements that can then ...

Continue reading

Project-to-language model almost working

So at this point Listener can generate a language model from a (Python) project and the dictation results from that are reasonable, but by no means perfect, still, you can dictate text as long as you stick to the words and statements already used in the project.  There are some obvious reworks now showing up: ...

Continue reading

Automatic Language Model Creation Started

Since the point of Listener is to allow for coding, the language model needs to reflect how one would dictate code. Further, to get reasonable accuracy I'm hoping to tightly focus the language models so that your language model for project X reflects the identifiers (and operators, etc) you are using in that project. To ...

Continue reading

Create your own virtual keyboard with Python

So at some point I need the voice dictation client to be able to do basic interactions with applications on the desktop (think typing text and the like). So how do I go about doing that? I want to be compatible with Wayland when it shows up, but still work on X (since that's where ...

Continue reading

Listener is Crawling Forward

I spent the day working on Listener. The bulk of the work was just cleanup, getting TODO items set up, fixing the setup script, etc. The actual task of voice dictation didn't get moved very far (I got a trivial "correct that") event working, but it doesn't actually make anything happen.

I also started ...

Continue reading

GStreamer Level Plugin Monitoring

So you have an audio stream where you'd like to get a human-friendly readout of the current audio level. You add a level component, but how do you actually get the level messages it generates?

            bus.add_signal_watch()
            bus.connect( 'message', self.on_level )

It really seems that you *should* be able to use element.connect(), but there doesn't seem ...

Continue reading