marytts / gradle-marytts-voicebuilding-plugin

A replacement for the legacy VoiceImportTools in MaryTTS
http://mary.dfki.de/
GNU General Public License v3.0
16 stars 12 forks source link

Errors with Praat 6 #48

Closed psibre closed 8 years ago

psibre commented 8 years ago

System calls to praat fail with Praat 6, as its command syntax has changed. But adding the newly required --run argument causes an error with Praat 5.

psibre commented 8 years ago

Sadly, the fix failed to solve the issue for the legacy plugin under linux with praat 6:

:legacy-plugin:test

Gradle suite > Gradle test > de.dfki.mary.voicebuilding.BuildLogicFunctionalTest.testLegacyPraatPitchmarker FAILED
    org.gradle.testkit.runner.UnexpectedBuildFailure: Unexpected build execution failure in /home/psibre/workspace/gradle-marytts-voicebuilding-plugin/legacy-plugin/build/testProject with arguments [legacyPraatPitchmarker]

    Output:
    :processDataResources UP-TO-DATE
    :lab UP-TO-DATE
    :templates UP-TO-DATE
    :text UP-TO-DATE
    :wav UP-TO-DATE
    :legacyInit UP-TO-DATE
    :legacyPraatPitchmarker

    Loading database layout:
    Reading config file /home/psibre/workspace/gradle-marytts-voicebuilding-plugin/legacy-plugin/build/testProject/build/database.config
    Loading basename list from wav files
    Found 24 files in basename list
    Loading features from file /home/psibre/workspace/gradle-marytts-voicebuilding-plugin/legacy-plugin/build/testProject/build/mary/features.txt
    Running PraatPitchmarker
    Computing pitchmarks for 24 utterances.
    Running Praat as: /home/psibre/praat6015/praat /home/psibre/workspace/gradle-marytts-voicebuilding-plugin/legacy-plugin/build/testProject/build/temp/script.praat /home/psibre/workspace/gradle-marytts-voicebuilding-plugin/legacy-plugin/build/testProject/build/basenames.lst /home/psibre/workspace/gradle-marytts-voicebuilding-plugin/legacy-plugin/build/testProject/build/wav/ /home/psibre/workspace/gradle-marytts-voicebuilding-plugin/legacy-plugin/build/testProject/build/pm/ 75 300

    (praat:17580): GLib-GObject-WARNING **: invalid (NULL) pointer instance

    (praat:17580): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

    (praat:17580): Gtk-WARNING **: Screen for GtkWindow not set; you must always set
    a screen for a GtkWindow before using the window

    (praat:17580): Gdk-CRITICAL **: IA__gdk_screen_get_default_colormap: assertion 'GDK_IS_SCREEN (screen)' failed

    (praat:17580): Gdk-CRITICAL **: IA__gdk_colormap_get_visual: assertion 'GDK_IS_COLORMAP (colormap)' failed

    (praat:17580): Gdk-CRITICAL **: IA__gdk_screen_get_default_colormap: assertion 'GDK_IS_SCREEN (screen)' failed

    (praat:17580): Gdk-CRITICAL **: IA__gdk_screen_get_root_window: assertion 'GDK_IS_SCREEN (screen)' failed

    (praat:17580): Gdk-CRITICAL **: IA__gdk_screen_get_root_window: assertion 'GDK_IS_SCREEN (screen)' failed

    (praat:17580): Gdk-CRITICAL **: IA__gdk_window_new: assertion 'GDK_IS_WINDOW (parent)' failed
    Exception in thread "main" java.lang.RuntimeException: PraatPitchmarker computation failed on file []!
    Command line was: [/home/psibre/praat6015/praat /home/psibre/workspace/gradle-marytts-voicebuilding-plugin/legacy-plugin/build/testProject/build/temp/script.praat /home/psibre/workspace/gradle-marytts-voicebuilding-plugin/legacy-plugin/build/testProject/build/basenames.lst /home/psibre/workspace/gradle-marytts-voicebuilding-plugin/legacy-plugin/build/testProject/build/wav/ /home/psibre/workspace/gradle-marytts-voicebuilding-plugin/legacy-plugin/build/testProject/build/pm/ 75 300].
        at marytts.util.io.General.launchProc(General.java:549)
        at marytts.tools.voiceimport.PraatPitchmarker.compute(PraatPitchmarker.java:294)
        at marytts.tools.voiceimport.DatabaseImportMain.main(DatabaseImportMain.java:428)
    :legacyPraatPitchmarker FAILED

    FAILURE: Build failed with an exception.
psibre commented 8 years ago

Meanwhile, for Praat 5, it seems that in certain environments, the Praat GUI pops up with a crash message, and the Gradle build blocks until the Praat GUI is manually dismissed. Need to fix this.

seblemaguer commented 8 years ago

I just check and yes it fails on my ubuntu even with praat 5 like you describe

psibre commented 8 years ago

@seblemaguer I'm working on a proper solution. Meanwhile, I've patched it for Praat 6 on Linux in a branch in my fork.

psibre commented 8 years ago

OK, since a proper solution that allows us to query and/or run praat 5 and 6 with the same syntax seems elusive, I'm hacking the version sniffer logic to kill the praat --version process after 100 ms. This way even if the GUI pops up and complains about invalid syntax and notifies of an impending crash, it goes away again almost instantly and does cause the build to hang.

psibre commented 8 years ago

OK, increasing the timeout a bit for the legacy plugin seems to have worked on Ubuntu 16.04 with Praat 6. It's not pretty, but let's hope for the best.