Kaljurand / K6nele

An Android app that offers speech-to-text user interfaces to other apps
http://kaljurand.github.io/K6nele/
Apache License 2.0
267 stars 83 forks source link

Modify transcription by user-specified regular expression #29

Closed Kaljurand closed 7 years ago

Kaljurand commented 9 years ago

Original issue 25 created by Kaljurand on 2012-08-25T20:30:03.000Z:

In the Apps list context menu, add "Assign regexp" and "Remove regexp". "Assign regexp" would allow the user to specify a regular expression that modifies the transcription(s) that the server returns.

Use case: TuneIn Radio. TuneIn Radio supports voice search (in car mode, with device language set to English) but expects the returned transcription to start with "listen to". So, Kõnele cannot be used with TuneIn. The solution would be to automatically modify the transcription e.g. by:

s/^/listen to /

or

s/^mängi /listen to /

Allowing the user to say "tallinn põleb" (i.e. simply the search query) or "mängi Arvo Pärt" (search query with an Estonian prefix).

Use case: removing brackets e.g. from arithmetical expressions: s/[)(]//g

Some modifications would require actually a chain of regexp transformations instead of just a single regexp.

Kaljurand commented 8 years ago

This was partly implemented in https://github.com/Kaljurand/K6nele/releases/tag/v1.4.06

Kaljurand commented 7 years ago

Fixed in a more general way by cefba7c58fbb2e8c89928038dc45052df3a65891