Open ehabtawfikelbwab opened 9 months ago
not working :( english working good
i'm using this audio file : http://sndup.net/spg2
and i'm using this code to transform .wav (audioClip) to short[]
` public static short[] AudioClipToShortArray(AudioClip audioClip) { // Check if the AudioClip is null if (audioClip == null) { Debug.LogError("AudioClip is null."); return null; }
// Calculate the number of samples in the AudioClip
int numSamples = audioClip.samples * audioClip.channels;
// Create a float array to hold the audio data
float[] audioData = new float[numSamples];
// Get the audio data from the AudioClip and store it in the float array
audioClip.GetData(audioData, 0);
// Create a short array to hold the converted audio data
short[] shortData = new short[numSamples];
// Convert the float data to short data
for (int i = 0; i < numSamples; i++)
{
shortData[i] = (short)(audioData[i] * short.MaxValue);
}
return shortData;
}`
i'm using this code to send Audio Data to recognizer:
` if (_recognizer.AcceptWaveform(Full_data, Full_data.Length))
{
var result = _recognizer.Result();
_threadedResultQueue.Enqueue(result);
print(result);
}
else
{
print("Failed");
}`
when Initializing the english model and doing AudioClip to short[] and run it by the previous code
the result is: "Ehab" and that very correct also i did use another custom words and working fine
when Initializing the arabic model and doing the same steps it not working at all
its print "Failed" that mean the Waveform not Accepted also i did try different words and the same result the result should be "ايهاب"
i'm using keyPharse feature and the arabic keyPharse list contain "ايهاب" and english keyPharse list contain "ehab"
@nshmyrev are you there sir
Hi There,
I'm using vosk sdk for unity and working fine just for english
i have different users with different custom words i did use KeyPhrase feature on english and it working great. but when i use it on arabic model it did not working
can you help me please to make KeyPhrase feature on arabic ?
i did try both of two arabic models and it not working https://alphacephei.com/vosk/models