# Speech Recognition Plugin - Sphinx-UE4

**URL:** <https://forums.unrealengine.com/t/speech-recognition-plugin-sphinx-ue4/50375>\
**Category:** Plugins\
**Tags:** unreal-engine\
**Created:** [December 18, 2015, 3:37pm UTC](https://forums.unrealengine.com/t/speech-recognition-plugin-sphinx-ue4/50375 "2015-12-18T15:37:30Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShaneC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ShaneC](https://forums.unrealengine.com/u/ShaneC)\
**Post date:** [December 18, 2015, 3:37pm UTC](https://forums.unrealengine.com/t/speech-recognition-plugin-sphinx-ue4/50375/1 "2015-12-18T15:37:30Z")

</div>

I have recently made some bug fixes, and added Chinese and French languages.

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

Let me know your thoughts.  
Thanks 😃

---

<div class="post-metadata">

**Author:** ![n00854180t](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@n00854180t](https://forums.unrealengine.com/u/n00854180t)\
**Post date:** [December 18, 2015, 5:49pm UTC](https://forums.unrealengine.com/t/speech-recognition-plugin-sphinx-ue4/50375/2 "2015-12-18T17:49:35Z")

</div>

@ - Awesome work man. I like that you can add words to the dictionary - that’s going to be instrumental for making a game-specific wordset. 😃

Not sure on the wiki issue.

Edit: Do you think you could give some pointers to where I should start in the plugin code for adding the phoneme recognition type as an option?

---

<div class="post-metadata">

**Author:** ![ShaneC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ShaneC](https://forums.unrealengine.com/u/ShaneC)\
**Post date:** [December 18, 2015, 9:39pm UTC](https://forums.unrealengine.com/t/speech-recognition-plugin-sphinx-ue4/50375/3 "2015-12-18T21:39:23Z")

</div>

Hi n00854180t,  
I have read that there are some issues with phoneme recognition.

> **[Phoneme Recognition (caveat emptor)](https://cmusphinx.github.io/wiki/phonemerecognition/)**
>
> CMUSphinx is an open source speech recognition system for mobile and server applications. Supported languages: C, C++, C#, Python, Ruby, Java, Javascript. Supported platforms: Unix, Windows, IOS, Android, hardware.

Never the less, I am adding in some ground-work into the code 🙂  
This will allow a mode to be selected when initializing.  
For the time being, this will be Dictionary Keyword, and Phoneme Recognition.  
The modes can certainly be expanded on at a later date.  
Cheers,  
Shane

---

<div class="post-metadata">

**Author:** ![n00854180t](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@n00854180t](https://forums.unrealengine.com/u/n00854180t)\
**Post date:** [December 18, 2015, 9:49pm UTC](https://forums.unrealengine.com/t/speech-recognition-plugin-sphinx-ue4/50375/4 "2015-12-18T21:49:25Z")

</div>

You the man!

If you need someone to test phoneme recognition I’d be happy to give it a try.

* * *

As an aside, is there currently a way to pass in a SoundWave or raw sound samples rather than using the microphone? I think phoneme recognition would be especially useful for lipsyncing voice over dialogue sounds.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_c8558ff7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c8558ff7](https://forums.unrealengine.com/u/anonymous_user_c8558ff7)\
**Post date:** [December 20, 2015, 4:54am UTC](https://forums.unrealengine.com/t/speech-recognition-plugin-sphinx-ue4/50375/5 "2015-12-20T04:54:09Z")

</div>

Woah! Question: Let’s say I wanna give an AI an order using this; how would it be appliable for it to recognize the command: “go” I specify it via blueprints?

---

<div class="post-metadata">

**Author:** ![AlAhmedElHamed](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/alahmedelhamed/32/1121564_2.png) [@AlAhmedElHamed](https://forums.unrealengine.com/u/AlAhmedElHamed)\
**Post date:** [December 20, 2015, 11:02am UTC](https://forums.unrealengine.com/t/speech-recognition-plugin-sphinx-ue4/50375/6 "2015-12-20T11:02:38Z")

</div>

so i’m intersted in this plugin, can you add added Arabic languages or it’s too early for that ?

---

<div class="post-metadata">

**Author:** ![ShaneC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ShaneC](https://forums.unrealengine.com/u/ShaneC)\
**Post date:** [December 21, 2015, 2:01am UTC](https://forums.unrealengine.com/t/speech-recognition-plugin-sphinx-ue4/50375/7 "2015-12-21T02:01:56Z")

</div>

n00854180t,  
Passing in a sound wave is certainly possible. i hadn’t gone down that path yet, as I didn’t really see a useful application (and I have limited time).  
You could certainly pass in a sound wave, and have it return a time-frame of when phoneme’s were spoken.

This brings me to my next point, the approximation (from my testing) is rather approximate (or all over the shop, from my testing).  
You could perhaps use this information with a phoneme dictionary list, and an advanced algorithm to match the detected/matched phoneme’s, and approximate the timing of the gaps.  
I am unsure how well this would work, to be perfectly honest.

Regarding the phoneme work, I have created a branch, and will check-in my work later in the week. I don’t really have the time to thoroughly test (it seems very random)  
But, this will show you how it CAN work, and should provide a starting place for your development or expansion.

,  
Did you look at the blueprint example?  
Simply change the Word Spoken function to perform a switch statement on the incoming text, and trigger whatever you like based on the phrase you added.  
**Note:** Simple phrases are more error prone (eg. false positives)… especially something as simple as “Go”

Andrew, there does exist an Arabic language model for Sphinx.  
I went down the path of investigation of Arabic (as another person had requested) but it seems Arabic is not supported by Unreal Engine 4.  
Have you tried pasting Arabic text into an FString. It simply comes up as a series of unknown characters.

 ![Arabic.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/7/8/9786cdeb3177fa14044c86efa5666f6e20262ddf.png)

I had thought of converting the Arabic dictionary file, into a Latin transliteration, but I have no idea how that could be done on a large scale.  
Ideas?

---

<div class="post-metadata">

**Author:** ![n00854180t](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@n00854180t](https://forums.unrealengine.com/u/n00854180t)\
**Post date:** [December 21, 2015, 9:10pm UTC](https://forums.unrealengine.com/t/speech-recognition-plugin-sphinx-ue4/50375/8 "2015-12-21T21:10:42Z")

</div>

@ - awesome man, you’re a life saver.

I’ll definitely be checking out the phoneme branch and seeing where I can take it. I’d love to be able to create an auto-lipsync tool for UE4 using it, but we’ll see if it’s accurate/good enough for that 🙂

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_c8558ff7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_c8558ff7](https://forums.unrealengine.com/u/anonymous_user_c8558ff7)\
**Post date:** [December 21, 2015, 10:38pm UTC](https://forums.unrealengine.com/t/speech-recognition-plugin-sphinx-ue4/50375/9 "2015-12-21T22:38:14Z")

</div>

Hey , I did check it, I just wasn’t so sure how well it could handle multiple transliterations. I’ll see if I can manage to create a simple AI, that obeys voice commands.

---

<div class="post-metadata">

**Author:** ![ShaneC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ShaneC](https://forums.unrealengine.com/u/ShaneC)\
**Post date:** [December 21, 2015, 11:48pm UTC](https://forums.unrealengine.com/t/speech-recognition-plugin-sphinx-ue4/50375/10 "2015-12-21T23:48:14Z")

</div>

Hey ,  
Hmm, multiple transliterations? I thought you wanted a particular voice phrase to trigger an in-game action?  
The transliteration comment was for Andrew, regarding a request for Arabic speech 🙂

Call Init with phrases you wish to recognise.

![1.PNG](https://d3kjluh73b9h9o.cloudfront.net/original/3X/b/e/be7884b51382ba8228baeaf01c00b551ad739a1d.png)

Then have a switch on the returned phrase, to trigger different logic based on the recognised phrase.

 ![2.PNG](https://d3kjluh73b9h9o.cloudfront.net/original/3X/2/d/2d8ed5be4f19f926a89ad3a3644a1a955896fe54.png)

You would probably also want other checks, so that only certain phrases perform certain actions at certain times, but that is really up to you.  
Cheers

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ae1dd25c](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ae1dd25c](https://forums.unrealengine.com/u/anonymous_user_ae1dd25c)\
**Post date:** [January 5, 2016, 1:24pm UTC](https://forums.unrealengine.com/t/speech-recognition-plugin-sphinx-ue4/50375/11 "2016-01-05T13:24:32Z")

</div>

Can I run your program in MacBook UE4?

---

<div class="post-metadata">

**Author:** ![ShaneC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ShaneC](https://forums.unrealengine.com/u/ShaneC)\
**Post date:** [January 6, 2016, 4:56am UTC](https://forums.unrealengine.com/t/speech-recognition-plugin-sphinx-ue4/50375/12 "2016-01-06T04:56:04Z")

</div>

Hi Artigen,  
At this time, the plugin does not work under Mac OS.  
I would be happy to port it to Mac OS, if you were willing to pay me for my time.  
Alternatively, the code is publicly available on GitHub.  
All the best,  
Shane

---

<div class="post-metadata">

**Author:** ![SaviorNT](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SaviorNT](https://forums.unrealengine.com/u/SaviorNT)\
**Post date:** [January 6, 2016, 7:05am UTC](https://forums.unrealengine.com/t/speech-recognition-plugin-sphinx-ue4/50375/13 "2016-01-06T07:05:15Z")

</div>

Has this been tested yet on 4.11?

And oh my… this is exactly the plugin I have been looking for since UE4 came out \o/

---

<div class="post-metadata">

**Author:** ![Muzaheed](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/muzaheed/32/778940_2.png) [@Muzaheed](https://forums.unrealengine.com/u/Muzaheed)\
**Post date:** [January 6, 2016, 8:47am UTC](https://forums.unrealengine.com/t/speech-recognition-plugin-sphinx-ue4/50375/14 "2016-01-06T08:47:27Z")

</div>

![ddddd.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/2/9/2997349b1fd045bf19c7a653b96bcec3cad04d29.png)

getting this error when i am trying to open it on 4.10  
i tried to build from source using vs2015.  
but still same

---

<div class="post-metadata">

**Author:** ![SaxonRah](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SaxonRah](https://forums.unrealengine.com/u/SaxonRah)\
**Post date:** [January 6, 2016, 9:17am UTC](https://forums.unrealengine.com/t/speech-recognition-plugin-sphinx-ue4/50375/15 "2016-01-06T09:17:22Z")

</div>

> [@Muzaheed;448477](#):
>
> ![ddddd.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/2/9/2997349b1fd045bf19c7a653b96bcec3cad04d29.png)&stc=1
> 
> getting this error when i am trying to open it on 4.10  
> i tried to build from source using vs2015.  
> but still same

They must have compiled with debugging and released that version and not the non debugging version. the d on the end signifys debugging.

---

<div class="post-metadata">

**Author:** ![ShaneC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ShaneC](https://forums.unrealengine.com/u/ShaneC)\
**Post date:** [January 6, 2016, 10:17am UTC](https://forums.unrealengine.com/t/speech-recognition-plugin-sphinx-ue4/50375/16 "2016-01-06T10:17:19Z")

</div>

ahh, that would be my bad. I`ll update the dll’s and let you know when I have done so.

---

<div class="post-metadata">

**Author:** ![ShaneC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ShaneC](https://forums.unrealengine.com/u/ShaneC)\
**Post date:** [January 6, 2016, 1:40pm UTC](https://forums.unrealengine.com/t/speech-recognition-plugin-sphinx-ue4/50375/17 "2016-01-06T13:40:59Z")

</div>

Okay, I have updated GitHub, and the Wiki.

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

**Note:** There’s an additional step to copy across the appropriate dll to match the version of unreal you are using.  
Please let me know if you encounter any issues.

---

<div class="post-metadata">

**Author:** ![AlAhmedElHamed](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/alahmedelhamed/32/1121564_2.png) [@AlAhmedElHamed](https://forums.unrealengine.com/u/AlAhmedElHamed)\
**Post date:** [January 7, 2016, 3:02pm UTC](https://forums.unrealengine.com/t/speech-recognition-plugin-sphinx-ue4/50375/18 "2016-01-07T15:02:21Z")

</div>

> [@;440931](#):
>
> Andrew, there does exist an Arabic language model for Sphinx.  
> I went down the path of investigation of Arabic (as another person had requested) but it seems Arabic is not supported by Unreal Engine 4.  
> Have you tried pasting Arabic text into an FString. It simply comes up as a series of unknown characters.
> 
> ![Arabic.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/7/8/9786cdeb3177fa14044c86efa5666f6e20262ddf.png)
> 
> I had thought of converting the Arabic dictionary file, into a Latin transliteration, but I have no idea how that could be done on a large scale.  
> Ideas?

sorry for the delay, about converting Arabic dictionary file into a Latin transliteration i don’t think this will work, tried it before in unity but who guess it could work in unreal 😃  
Also i got agood news 4.11 - 4.12 will support Arabic so it can be easy to compelete your work without converting any thing 😃

---

<div class="post-metadata">

**Author:** ![ShaneC](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ShaneC](https://forums.unrealengine.com/u/ShaneC)\
**Post date:** [January 8, 2016, 12:15am UTC](https://forums.unrealengine.com/t/speech-recognition-plugin-sphinx-ue4/50375/19 "2016-01-08T00:15:50Z")

</div>

Oh, that’s great news. 🙂 Thanks for letting me know.  
I`ll let the person who e-mailed me know that Arabic is being added in 4.11-4.12.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0a38404d](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0a38404d](https://forums.unrealengine.com/u/anonymous_user_0a38404d)\
**Post date:** [January 18, 2016, 8:27pm UTC](https://forums.unrealengine.com/t/speech-recognition-plugin-sphinx-ue4/50375/20 "2016-01-18T20:27:15Z")

</div>

Hi, i have a problem, when Run my project then I put “I” (for init Speech) my Microphone Input not work, Stop and Close project come back Work my microphone 😕

Have you ever happen it ?

[Next page](https://forums.unrealengine.com/t/speech-recognition-plugin-sphinx-ue4/50375.md?page=2)
