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

Could not compile build file '/home/elka/gradle-marytts-voicebuilding-plugin/build.gradle'. #126

Closed elnursamedzade closed 4 years ago

elnursamedzade commented 4 years ago

Hello there. Please enlighten me. Which build.gradle file do you mean by "Add this at the top of yourbuild.gradle file: " in the Readme document?

plugins {
    id 'de.dfki.mary.voicebuilding-legacy' version '5.4'
}

I add the code to the gradle-marytts-voicebuilding-plugin / build.gradle file, but I get the following error:

elka@DESKTOP-LCA50BE:~$ cd gradle-marytts-voicebuilding-plugin
elka@DESKTOP-LCA50BE:~/gradle-marytts-voicebuilding-plugin$ ./gradlew build
Starting a Gradle Daemon, 2 incompatible and 1 stopped Daemons could not be reused, use --status for details

FAILURE: Build failed with an exception.

* Where:
Build file '/home/elka/gradle-marytts-voicebuilding-plugin/build.gradle' line: 2

* What went wrong:
Could not compile build file '/home/elka/gradle-marytts-voicebuilding-plugin/build.gradle'.
> startup failed:
  build file '/home/elka/gradle-marytts-voicebuilding-plugin/build.gradle': 2: unexpected char: 0xA0 @ line 2, column 1.
         id 'de.dfki.mary.voicebuilding-legacy' version '5.4'
     ^

  1 error

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 15s
elka@DESKTOP-LCA50BE:~/gradle-marytts-voicebuilding-plugin$

What am I doing wrong? I don't know what to do because I have never worked with Gradle. Please don't be mad at me. Here is my build.gradle file:

plugins {
    id 'de.dfki.mary.voicebuilding-legacy' version '5.4'
    id 'groovy'
    id 'java-gradle-plugin'
    id 'maven-publish'
    id 'com.gradle.plugin-publish' version '0.11.0'
}

marytts {
    voice {
        name = 'my_voice'
        gender = 'female'
        language = 'en'
        region = 'US'
        domain = 'general'
        type = 'unit selection'
        description = 'A female English unit selection voice'
        samplingRate = 16000
        license {
            name = 'Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International'
            shortName = 'CC BY-NC-SA 4.0'
            url = 'http://creativecommons.org/licenses/by-nc-sa/4.0/'
        }
    }
}

group 'de.dfki.mary'
version '5.5-SNAPSHOT'
description 'A replacement (incubating) for the legacy VoiceImportTools in MaryTTS'

sourceCompatibility = '1.8'

gradlePlugin {
    plugins {
        base {
            id = 'de.dfki.mary.voicebuilding-base'
            implementationClass = 'de.dfki.mary.voicebuilding.VoicebuildingBasePlugin'
        }
        data {
            id = 'de.dfki.mary.voicebuilding-data'
            implementationClass = 'de.dfki.mary.voicebuilding.VoicebuildingDataPlugin'
        }
        festvox {
            id = 'de.dfki.mary.voicebuilding-festvox'
            implementationClass = 'de.dfki.mary.voicebuilding.VoicebuildingFestvoxPlugin'
        }
        legacy {
            id = 'de.dfki.mary.voicebuilding-legacy'
            implementationClass = 'de.dfki.mary.voicebuilding.VoicebuildingLegacyPlugin'
        }
    }
}

pluginBundle {
    website = 'http://mary.dfki.de'
    vcsUrl = 'https://github.com/marytts/gradle-marytts-voicebuilding-plugin'
    description = 'A replacement for the legacy VoiceImportTools in MaryTTS'
    tags = ['TTS', 'speech synthesis', 'voicebuilding']
    plugins {
        base {
            id = 'de.dfki.mary.voicebuilding-base'
            displayName = 'Voicebuilding Base Plugin'
        }
        data {
            id = 'de.dfki.mary.voicebuilding-data'
            displayName = 'Voicebuilding Data Plugin'
        }
        festvox {
            id = 'de.dfki.mary.voicebuilding-festvox'
            displayName = 'Voicebuilding FestVox Plugin'
        }
        legacy {
            id = 'de.dfki.mary.voicebuilding-legacy'
            displayName = 'Voicebuilding Legacy Plugin'
        }
    }
}

repositories {
    jcenter()
}

dependencies {
    implementation localGroovy()
    implementation group: 'de.dfki.mary', name: 'marytts-builder', version: maryttsVersion, {
        exclude group: '*', module: 'groovy-all'
        exclude group: '*', module: 'mwdumper'
        exclude group: '*', module: 'sgt'
    }
    implementation group: 'org.m2ci.msp', name: 'gradle-praat-wrapper-plugin', version: '0.6'
    implementation group: 'org.m2ci.msp', name: 'jtgt', version: '0.6.1'
    testImplementation group: 'org.testng', name: 'testng', version: '7.0.0'
    testImplementation group: 'xmlunit', name: 'xmlunit', version: '1.6'
}

processResources {
    doLast {
        file("$destinationDir/maryttsVersion.txt").text = maryttsVersion
    }
}

test {
    useTestNG {
        parallel = 'classes'
    }
    testLogging {
        events 'started', 'passed', 'failed', 'skipped'
        exceptionFormat = 'full'
        info {
            showStandardStreams = true
        }
    }
    failFast = true
    doFirst {
        // path to shared testkit gradle home
        systemProperty 'testProjectDir', temporaryDir
        // dynamic marytts version
        systemProperty 'maryVersion', maryttsVersion
    }
}

task sourceJar(type: Jar) {
    from sourceSets.main.allJava
}

publishing {
    publications {
        mavenJava(MavenPublication) {
            from components.java
            artifact sourceJar {
                classifier 'sources'
            }
        }
    }
    repositories {
        maven {
            url version.endsWith('-SNAPSHOT') ? 'https://oss.jfrog.org/artifactory/oss-snapshot-local' : 'https://api.bintray.com/maven/marytts/marytts/gradle-marytts-voicebuilding-plugin'
            credentials {
                username = findProperty('bintrayUser')
                password = findProperty('bintrayApiKey')
            }
        }
    }
}
seblemaguer commented 4 years ago

Could you please properly format your issue next time? In case of, you have the documentation here: https://guides.github.com/features/mastering-markdown/

The error message states that you have an invalid character (0xA0) which is an unbreakable space (https://www.fileformat.info/info/unicode/char/00a0/index.htm).