strudel icon indicating copy to clipboard operation
strudel copied to clipboard

add shabda shortcut

Open felixroos opened this issue 2 years ago • 3 comments

instead of await samples('https://shabda.ndre.gr/bass:4,hihat:4,rimshot:2.json?strudel=1'):

await samples('shabda:bass:4,hihat:4,rimshot:2')

or maybe even

await shabda('bass:4', 'hihat:4', 'rimshot:2')

also find a format for voice

felixroos avatar Feb 03 '23 18:02 felixroos

Here are some ideas for speech (with no params shabda defaults to en-GB female voice):

await samples('shabda/speak:strudel,rocks')

and with language param:

await samples('shabda/speak/fr-FR:strudel,pour_tous')

finally with gender:

await samples('shabda/speak/fr-FR/m:strudel,pour_tous')

It's a bit more difficult for the dedicated function. In order to differenciate between words and params I would rather do:

await shabda('chocolate:3,pudding:2')

and (with optional language and gender params)

await shabdaSpeak('strudel,pour_tous', 'fr-FR', 'm')

What do you think? Let me know if you want me to try to implement some of them.

ilesinge avatar Feb 04 '23 08:02 ilesinge

What do you think? Let me know if you want me to try to implement some of them.

I like the approach with samples more because it's less mystified. it's also analogous to the github: shortcut. /speak for voice looks good. or maybe name it speech as shabda does in its url? PR welcome!

felixroos avatar Feb 08 '23 21:02 felixroos

My first PR on strudel :) Let me know if it fits your idea and code style.

ilesinge avatar Oct 14 '23 14:10 ilesinge