Dear specialists,
I have The serious issue. I have done my best to copy files from folders from GIthub tree of Czech language model. But unfortunately, I Am helpless to find The required model.conf file. I can not simply mix this file from English model with this Czech model. I have contacted The author of Czech model database on Github, but if author will not respond. How can i generate The file with The correct values? Or is it impossible?

Or it is not The rule, that every language model must contain this file?

Here is link to The corresponding Github tree again.

https://github.com/rhasspy/cs_kaldi-rhasspy
I Am very sad, because if author will not provide this file and if file can not be generated, model will be unusable and there is no next model trained on The Internet.
 

Biswajit

Active Member
Licensed User
Longtime User
I dont think the kaldi voice model will work with vosk. I will check.
 
 

gezueb

Active Member
Licensed User
Longtime User
Dialog: I would like to program a dialog with questions from device and answer by user. The device uses the Text to Speech (TTS library) for the questions. When the device speaks, the VOSK speech recognition must be paused because otherwise the voice output of the device is wrongly recognized as an answer of the user. There are several functions to disable recognition available, pause(false or true) , stop and cancel, but I am a bit confused how to use them to stop and restart recognition in a timely sequence. A further problem is that the TextToSpeech library TTS creates no event when the text is actually completely spoken (queue empty). I had to use sleep (something) so far. Thanks for advice!
 

Biswajit

Active Member
Licensed User
Longtime User
It's simple just check if TTS is still speaking or not. Check the below example.
B4X:
Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("Layout")
    tts.Initialize("tts")
    t.Initialize("timer",100)
End Sub

Sub Button1_Click
    tts.Speak("your text",True)
    t.Enabled = True
End Sub

Sub timer_Tick
    If Not(tts.As(JavaObject).RunMethod("isSpeaking",Null)) Then
        t.Enabled = False
        'tts done now you can run speech recognition
    End If
End Sub
 

gezueb

Active Member
Licensed User
Longtime User
Thank you for the example, Biswajit, i will try to integrate this.
 

Biswajit

Active Member
Licensed User
Longtime User

gezueb

Active Member
Licensed User
Longtime User
I would just like to add: the example uses async methods to copy and unzip files. While this is certainly ok, it requires to handle the completion of all async functions properly in a resumable sub with wait fors. I find it much safer to use the blocking versions. The loading of the model can then be coded in a normal sub - not in a resumable one - which makes the code flow independant of the devices performance.
 
Dear elite programmers,
Does somebody of us think, that it could be possible to prepare The usable voice model package, which support Czech language? Because Czech voice model do not work when I have tried to use one which have been made by The someone on Github. Unfortunately nobody on Github has helped Me.
Who of us would have some time and A good will to look at this problem?
The library which uses voice model and have been created by The this thread creator is outstanding and excellent. I can not write a bad word about this project. Because if model is compatible, it work like A charm. But I Am sad, that Czech model is not compatible.
Any good advice or package would be very very welcomed.
 

Biswajit

Active Member
Licensed User
Longtime User
Extracting voice model? This not good. How to do without it? Use the unzipped "model" folder?
If you embed the unzipped folder into your app it will increase the app size.
 

Biswajit

Active Member
Licensed User
Longtime User
If you need a voice model that is unavailable on the internet you have to train your own model.

Check this page, https://alphacephei.com/vosk/models
Scroll down and check "Training your own model" section.
 

mobilemedved

New Member
Sorry all. I am use this example some time and i have remark. When I press START button:

Private Sub StartBtn_Click
partialResultBox.Text = ""
resultBox.Text = ""
STT.prepareMicrophone("")
End Sub

Programm go this. Ok!

Sub STT_ReadyToListen
Log("ready")
STT.stop
If STT.startListening(-1) Then
StartBtn.Enabled = False
StopBtn.Enabled = True
Log("Started...")
partialResultBox.Text = "Talk to me!" 'This my add message for user
Else
Log("Failed to Start...")
MsgboxAsync("Failed to Start","")
End If
End Sub

I see "Talk to me!" and I start to speak, but the program does not perceive my speech A few seconds pass, and speech begins to be recognized. How do I know when I can talk?
And improperly configured microphone sensitivity settings can lead to unwanted background noise or a buzzing sound when putting your microphone to use. Somebody can make automatic adjustment of microphone sensitivity?
 

Biswajit

Active Member
Licensed User
Longtime User
When the program is ready for voice recognition it will raise the ReadyToListen event.
 

netsistemas

Active Member
Licensed User
Longtime User
how change recognition voice to spanish?
(¿Como cambio para que reconozca voz española?)
 

netsistemas

Active Member
Licensed User
Longtime User
thank. Doit .

- Uninstall apk (for delete folder model into device)
- Download voice model spanish from https://alphacephei.com/vosk/models
- Renamed filename downlaod to modelesp.zip AND Folded inside zip to model
- Include file donloaded to apk (modelesp.zip)
- Change GLOBAL var to: model_zip_name As String = "modelesp.zip"
 

petr4ppc

Well-Known Member
Licensed User
Longtime User
Dear friends

if I am trying this library with Android 11, everything is OK. If I am trying this LIB and same example with Android 4.4.2 I get:
What can I do, please? It is possible to secure this error?

Best regards
p4ppc
 
Last edited:

Adamdam

Active Member
Licensed User
Longtime User
Greetings,
Can I feed Youtube URL as input file instead of wav file ?? if yes how ?
to make off-line speech-to-text.
Best regards
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…