Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This post has been wikified, any user with enough reputation can edit it.
avatar image
0
Question by DaG_II · Sep 12, 2014 at 10:44 AM · c#dllspeech

SpeechLib.SpVoiceClass:GetVoices does crash my Unity executable

I created a project with Unity (version 4.5.3f3). I only wrote a simple script as follow:

 using UnityEngine;
     using System.Collections;
     using SpeechLib;
  
     public class SpeechTest : MonoBehaviour
     {
         private SpVoice voice;
  
         void Start()
         {
             voice = new SpVoice();
             ISpeechObjectTokens voices = voice.GetVoices();
         }
  
         // Update is called once per frame
         void Update()
         {
             if (Input.anyKeyDown)
             {
                 voice.Speak("Hello, world!", SpeechVoiceSpeakFlags.SVSFlagsAsync);
             }
         }
     }

Here you can download the test project for Unity: https://dl.dropboxusercontent.com/u/12184013/TextToSpeech.zip

When I try to play (in Unity editor), the game runs without problems. Instead, when I build and run the game, I receive a message error:

The game crashed. The crash report folder named "2014-09-12_013622" next to game executable. It would be great if you'd send it to the developer of the game!

The zipped folder "2014-09-12_013622" is attached to this post.

When i comment this line

     ISpeechObjectTokens voices = voice.GetVoices();

the game doesn't crash after I rebuilt it.

I need to call GetVoices method, because I want to set a new voice in the "SpVoice voice" object.

Thanks in advance to everybody!

2014-09-12_013622.zip (31.6 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by DaG_II · Sep 14, 2014 at 10:59 AM

Here is the solution: http://forum.unity3d.com/threads/speechlib-spvoiceclass-getvoices-does-crash-my-unity-executable.268011/#post-1772720

In a nutshell the library [Unity Install Directory]\Editor\Data\Mono\lib\mono\2.0\CustomMarshalers.dll should be included in the Unity project (adding it as a asset).

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

Why do I get this error when I export my code to android phone? 0 Answers

When I build my game it gives me this error 'Assets/Builds/Build_0.01_Data/Managed/Assembly-CSharp.dll' shouldn't be queried by IsAssemblyCompatible, missing IsInternalOrCompiledAssembly check ? 2 Answers

Can you run unmanaged plugins from unity plus? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges