[Suggestion] Play Audio While Text is Generating
As the title says. I've looked the code, however, and I don't see there's an easy "On_Text_Generating" flag tho...
Nevermind I found it. There's an obvious 'Talking' flag.
oh yes, that is done here: https://github.com/naeruru/mimiuchi/blob/main/src/modules/speech/WebSpeech.ts#L89
what kind of sound would it play? some sort of ding that plays when it starts generating text?
That can be an option, but what I actually want is that it loops an audio file while talking flag is true. I've done the code locally. It's gonna be just for my personal use tho. Not gonna share it to anyone so don't worry.
Wait I misunderstood. I want it to work on the electron app so I need it the audio method to be called when the posted json from websocket is parsed. I haven't found that part of the code yet..
it is currently in an obnoxious spot. I was in the middle of restructuring stuff: https://github.com/naeruru/mimiuchi/blob/main/src/components/Footer.vue#L204
the callback is called once the electron app receives text from the websocket using receive-text-event
you could also just use on_submit(...) in speech.ts which is where that callback eventually leads to. and check foris_electron().
also logStore.loading_result is used to tell the app that a result is currently being processed. It is set in on_submit()
Thanks! That helps a lot! Could you please also tell me where I can disable censoring if you don't mind?
sadly censoring is done where the speech is being processed (Google when using chrome) and is totally out of my control. I’d have to apply some sort of heuristic on what is returned. A similar app (that’s sadly shutting down), had an option that had something to solve this (https://webcaptioner.com/captioner/settings/general) but I think it wasn’t perfect since it just guesses.
ultimately I want to give more options for speech to text which would circumvent this, but that’s the dilemma until then
That's fine! Thank you so much! I've got my code working!
Oh I probably shouldn't close it as it's an inconclusive suggestion lol. So I just made the app play animalese audio while i'm speaking. Do you think if that's an good idea to add in the app? I should say this earlier but your app is great! Thanks for the effort of making this!
oh animalese cute^^ yeah I think that’d be a nice addition. feel free to PR if you want. as long as the sound file is free use.
~~It will also need an option in the settings to toggle it on and off though (default off). settings are managed in states folder using pinia.~~ wait nvm, I think we should just put it in the TTS voices as a new “service.” — but then at that point I think it should be able to be turned on for either web or electron independently. If you don’t wanna do that I can always try to amend the PR when you send it when I get some time to
I just hardcoded it to suite my use lol. But yea it's my pleasure to give the app an additional feature!