Search Unity

[RELEASED] Easy Voice - Text to Speech Editor Extension

Discussion in 'Assets and Asset Store' started by afonseca, Sep 30, 2014.

  1. cjackcandy

    cjackcandy

    Joined:
    Sep 8, 2013
    Posts:
    23
    For anyone else who might run into either the truncated Easy Voice Editor window or the voice list is shorter than what you expected, I was able to resolve both issues. For the truncated window, I modified the EasyVoiceEditorWindow.cs script by changing first line of the OnGUI() function from: int pixelScale = (int)(EditorGUIUtility.pixelsPerPoint); to: int pixelScale = (int)Mathf.Ceil(EditorGUIUtility.pixelsPerPoint); I noticed when stepping through the debugger that the float value for EditorGUIUtility.pixelsPerPoint, being cast to an INT was rounding down the float value. When I wrapped this in the Mathf.Ceil function, the resulting casted INT is rounded up. This isn't ideal and somewhat of a hack, but I found it worked well for me. I am now able to see the editor buttons. Regarding the missing TTS voices, it turned out to be a Windows 10 issue that was resolved by following the WOW6432Node instructions from this post: https://stackoverflow.com/questions/40406719/windows-10-tts-voices-not-showing-up Turns out that Easy Voice uses the voices listed under
    HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Speech\Voices\Tokens\
     
  2. afonseca

    afonseca

    Joined:
    Feb 28, 2012
    Posts:
    80
    @cjackcandy Thank you for posting and sharing the workaround for the truncated window. As you found, there is an issue with using certain Windows resolution scale settings (different from the high dpi bug fixed earlier). I'm glad you were able to customize to fit your specific display.

    With respect to the voices available, yes, Easy Voice only detects what Windows makes accessible via the SAPI API so thank you for sharing that workaround as well.
     
  3. swanickj

    swanickj

    Joined:
    May 15, 2019
    Posts:
    28
    Can anyone confirm before I buy that this asset still works in unity version 2020.3.18+? I haven't seen anyone complaining but there also hasn't been an update or a comment in this thread in a while
     
  4. afonseca

    afonseca

    Joined:
    Feb 28, 2012
    Posts:
    80
    @swanickj Yes, it is supported and has been tested working with Unity 2020 LTS.
     
    swanickj likes this.
  5. swanickj

    swanickj

    Joined:
    May 15, 2019
    Posts:
    28
    awesome, thank you! just purchased. Another question - is it possible to use Easy Voice from an editor script? I have a bunch of "narration" assets in my current project that pair subtitles and audio files, among other things. It would be awesome to make a utility that could generate a TTS audioclip for each of them.
     
  6. afonseca

    afonseca

    Joined:
    Feb 28, 2012
    Posts:
    80
    @swanickj while it's not designed to be controlled from elsewhere, it could certainly be customized for your needs. The full source code is included with the asset and while I can't offer support for such custom work, I think you'll find it pretty flexible.
     
    swanickj likes this.
  7. swanickj

    swanickj

    Joined:
    May 15, 2019
    Posts:
    28
    Thanks for making the source code available! I was able to modify the editor to process the "narration" asset type I've been using in my projects, which has helped tremendously. The TTS works great, and having a persistent store of all my managed narrations is extremely useful. Great asset :)


    PS - no worries at all if this isn't something you can help with, but when i replaced the audio text string with an objectReference field for my narrations, I noticed that I wasn't able to drag assets into those object fields unless i had clicked on and focused that particular objectReference field. I'm assuming this is due to the code that supports dragging&reordering lines, consuming the drag-drop event. If that rings a bell, would be able to point me to where i could disable this safely, or choose not to consume the event under certain conditions?

    i understand that's pretty specific so again, no worries if you can't address this :)