Creating a wikipedia skill : match any regexp?

I’m trying to build a wikipedia skill for my rhasspy assistant.
I would like to say something like “wikipedia $(some long search query)” but i don’t know how to match the long search query which can be anything.

[Wikipedia]
Wikipedia [.*] {searchQuery} (where .* can be any python/javascript regex)

I know i can switch rhasspy to an open transcription mode but wouldn’t i loose all my other intents commands ?

Is there a simple way to do something llike this ?

By the way, thanks again for this huge and highly qualitative job that is rhasspy !

1 Like

It depends on your definition of simple :grinning:

If you haven’t seen it already I’d encourage you to look at this thread:

There are a few “solutions” discussed, ranging from using Google TTS to process part of the audio, to having a second environment set up as open transcription so you have the best of both worlds.

1 Like

It seems you found your “simple” way, but I have not. Can you explain?

As Enc3ph4l0n said there is no “easy” solution to this one. However in the mentioned post there is one suggestion that I intend to try : use a second installation of rhasspy in open translation mode with a specific wakeword (wikipedia in my case) to handle this intent. I setted the solution flag as my question was answered even if the answer was negative. For the moment and as a workaround i use pregenerated slots for artists / cities / painters … that I want to query in wikipedia.

Great !
I would definitely be interested in a Wikipedia skill. But without the creation of slots beforehand.

I did not fully understand what would be required: a second installation of Rhasspy???

i’m afraid that the route of open transcription mode may imply a second installation of rhasspy.

As described in the rhasspy documentation :

“If you just want to use Rhasspy for general speech to text, you can set speech_to_text.kaldi.open_transcription to true in your profile.” (Given that you use kaldi or pocket sphinx for tts)

However, i found another option in the rhasspy doc that may be worth investigating further :

“A middle ground between open transcription and custom voice commands is language model mixing . During training, Rhasspy can mix a (large) pre-built language model with the custom-generated one. You specify a mixture weight (0-1), which controls how much of an influence the large language model has; a mixture weight of 0 makes Rhasspy sensitive only to your voice commands, which is the default.”