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

How can I add new language Jar as dependency? #117

Closed muntasir2000 closed 4 years ago

muntasir2000 commented 4 years ago

I am building a voice for Bangla language. I have prepared marytts-lang-bn jar file, which works for all input types eg. TOKENS, ALLOPHONES, PHONEMES etc.

I have aligned my dataset with gradle-marytts-kaldi-mfa-plugin and got the TextGrid files as output. Now when I apply gradle-marytts-voicebuilding-plugin, set locale as 'bn', and try to add marytts-lang-bn.jar as a dependency for the voicebuilding plugin, it fails with following error - Could not find method files() for arguments [lib/marytts-lang-bn-5.2.jar] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

I changed all occurrence to this dependency in the plugin project -

 project.afterEvaluate {
            project.dependencies {
                // runtimeOnly "de.dfki.mary:marytts-lang-$project.marytts.voice.language:$project.marytts.version", {
                //     exclude group: '*', module: 'groovy-all'
                // }
                runtimeOnly file('lib/marytts-lang-bn-5.2.jar')
            }
        }

If it's relevent, I have added the plugin source in the buildSrc directory and applied to my project.

psibre commented 4 years ago

Could not find method files() for arguments [lib/marytts-lang-bn-5.2.jar] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

In build.gradle, everything in the DSL is in the namespace of the Gradle Project. So it's easy to get used to just writing file('my/path'). However, when writing code in the plugin class, you need to prefix that with the correct namespace, i.e., you have to write project.file(), not just file().

muntasir2000 commented 4 years ago

Oh, my bad. Thanks for your prompt reply.