Dlls files do not work on Android or iOS if it is an unmanaged DLL file without the API specified in Windows. If it is a Windows API or a managed dll, then it will not work on Android or iOS.
You have two options: buy a plugin or make your own. If you focus only on Android and iOS, go to this Easy TTS, which costs $ 5.
If you want to do it yourself, this process is very similar to my speech text. The only difference is the classes used. Making one yourself is easy. The only drawback is that it takes a lot of time for each platform.
Android
TextToSpeech class.
IOS
AVSpeechSynthesizer class
MacOS
NSSpeechSynthesizer class
Window
class ISpVoice
There are many examples of how to use them on the Internet. You must make a plugin for the Android class using Java, Objective-C for the iOS classes and MacOs. C ++ for the Windows class.
To put them together, you need to use the Unity directive.
class TextToSpeech { #if UNITY_ANDROID Use TextToSpeech class #endif #if UNITY_IOS Use AVSpeechSynthesizer class #endif #if UNITY_STANDALONE_OSX || UNITY_EDITOR_OSX Use NSSpeechSynthesizer class #endif #if UNITY_STANDALONE_WIN || UNITY_EDITOR_WIN Use ISpVoice class #endif }
source share