Coder Social home page Coder Social logo

androidmarytts / androidmarytts Goto Github PK

View Code? Open in Web Editor NEW
169.0 18.0 52.0 40.03 MB

Android MARY TTS - an open-source, offline HMM-Based text-to-speech synthesis system based on MaryTTS

Home Page: http://mary.dfki.de

Java 81.49% HTML 2.44% Scheme 15.66% XSLT 0.32% JavaScript 0.09%
tts hmm marytts text-to-speech offline voice java android android-arsenal

androidmarytts's Introduction

AndroidMaryTTS

AndroidMaryTTS is an open source Android offline text to speech application, built on top of MaryTTS. Can use own HMM-based voice in any android application with using this lib. Just need only generated HMM-voice file. Just create your own hmm-based voice model with using MaryTTS and share with us. In final listen yourself as tts speaker with using our lib. Already tested this lib with the version of android lollipop.

#How to use:

  1. Add below script to build.gradle(app) file :
  android {
  	    defaultConfig {
        		multiDexEnabled true
        		packagingOptions {
        		    exclude 'META-INF/LICENSE.txt'
        		    exclude 'META-INF/NOTICE.txt'
        		    exclude 'META-INF/LICENSE'
        		    exclude 'META-INF/NOTICE'
        		    exclude 'META-INF/DEPENDENCIES'
  	     	      }
  	    }
  }
  1. Also, other one to build.gradle (module) where tts will use :
	dependencies {
	    compile 'com.marytts.android:marylib:1.0.1'
	}
  1. Load code marytts-android voise and language models on startup your project. It takes a few seconds. But in future will be so fast :
	MaryLink.load(Context context); 
  1. Last one to speak or stop what you write :
 	MaryLink.getInstance().startTTS(text);
	
	MaryLink.getInstance().stopTTS();

Plan

Will do significant refactoring and modifications the core code MaryTTS

  1. Create new android app and add Marytts core code as module ๐Ÿ‘
  2. Change or refactor marytts source files to support android OS ๐Ÿ‘
  3. Publishing Gradle AndroidMaryTTS library to jCenter and maven repository ๐Ÿ‘
  4. Adding other languages
  5. Marytts Android client demo ๐Ÿ‘
  6. Creating TTS engine using AndroidMaryTTS
  7. Optimising AndroidMaryTTS module and make more user friendly module

Contribute

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

androidmarytts's People

Contributors

amirashad avatar farizaghayev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

androidmarytts's Issues

MIgrating CmuSltHsmmvoice built in MaryTTS 4.3.0 to voices built in AndroidMaryTTS

I have the working model of voice CmuSltHsmm that was built using MaryTTS 4.3.0. I want to import that voice model to AndroidMaryTTS.

I noticed there are some changes in .pdf files and in HTSCARTReader.java .
Actually when I tried for Cmu-slt-hsmm, I noticed there are some changes in .pdf files and in HTSCARTReader.java.

So I ended up doing some changes in HTSCARTReader.java.
After these changes mary engine started up ok, but I am getting wrong Audio.

Is there any way to migrate voice model that was built using MaryTTS 4.3.0 to voice compatible to AndroidMaryTTS?

Adding French Voice And Language

I am working with mary TTS and facing an issue while trying to add new Voice or The language

Cannot instantiate model 'duration' of type 'hmm' from 'null' 2 Cannot instantiate voice 'cmu-slt-hsmm' Cannot instantiate model 'duration' of type 'hmm' from 'null' Problem starting module marytts.modules.Synthesis@20434f6

`name = catherine_fr_hmm
fr-voice.version = 4.3.0

voice.version = 4.3.0

provides =
fr-voice
hmm-voice

requires.marybase.version = 4.3.0
requires.fr.version = 4.3.0
requires.fr.download = http://mary.dfki.de/download/mary-install-4.x.x.jar
requires.hmm.version = 4.3.0

####################################################################
####################### Module settings ###########################
####################################################################

hmm.voices.list =
catherine_fr_hmm

voice.catherine_fr_hmm.wants.to.be.default = 0

voice.catherine_fr_hmm.gender = female
voice.catherine_fr_hmm.locale = en_US
voice.catherine_fr_hmm.domain = general
voice.catherine_fr_hmm.samplingRate = 16000

voice.catherine_fr_hmm.alpha = 0.42
voice.catherine_fr_hmm.gamma = 0
voice.catherine_fr_hmm.logGain = false

voice.catherine_fr_hmm.beta = 0.0

voice.catherine_fr_hmm.Ftd = jar:/marytts/voice/female_french/tree-dur.inf
voice.catherine_fr_hmm.Ftf = jar:/marytts/voice/female_french/tree-lf0.inf
voice.catherine_fr_hmm.Ftm = jar:/marytts/voice/female_french/tree-mgc.inf
voice.catherine_fr_hmm.Fts = jar:/marytts/voice/female_french/tree-str.inf

voice.catherine_fr_hmm.Fmd = jar:/marytts/voice/female_french/dur.pdf
voice.catherine_fr_hmm.Fmf = jar:/marytts/voice/female_french/lf0.pdf
voice.catherine_fr_hmm.Fmm = jar:/marytts/voice/female_french/mgc.pdf
voice.catherine_fr_hmm.Fms = jar:/marytts/voice/female_french/str.pdf

voice.catherine_fr_hmm.useGV = true
voice.catherine_fr_hmm.maxMgcGvIter = 200
voice.catherine_fr_hmm.maxLf0GvIter = 200
voice.catherine_fr_hmm.Fgvf = jar:/marytts/voice/female_french/gv-lf0-littend.pdf
voice.catherine_fr_hmm.Fgvm = jar:/marytts/voice/female_french/gv-mgc-littend.pdf
voice.catherine_fr_hmm.Fgvs = jar:/marytts/voice/female_french/gv-str-littend.pdf

voice.catherine_fr_hmm.FeaFile = jar:/marytts/voice/female_french/utt_2513.pfeats

voice.catherine_fr_hmm.trickyPhonesFile = jar:/marytts/voice/female_french/trickyPhones.txt

voice.catherine_fr_hmm.useMixExc = true

voice.catherine_fr_hmm.Fif = jar:/marytts/voice/female_french/mix_excitation_filters.txt

voice.catherine_fr_hmm.in = 5

voice.catherine_fr_hmm.useAcousticModels = true

voice.catherine_fr_hmm.acousticModels = duration F0

voice.catherine_fr_hmm.duration.model = hmm
voice.catherine_fr_hmm.duration.attribute = d

voice.catherine_fr_hmm.F0.model = hmm
voice.catherine_fr_hmm.F0.data =jar:/marytts/voice/female_french/voice.config
voice.catherine_fr_hmm.F0.attribute = f0`

Adding new language support by importing model from MaryTTS

We have a MaryTTS server for a regional language running fine on desktop.
We would like to extend AndroidMaryTTS to support that language. We tried replacing the model files in assets directory of the Android Project (marylib/src/main/assets/marytts/voice/CmuSltHsmm). We are getting this error

11-21 15:06:18.216 1830-2060/marytts.android D/test: Cannot instantiate model 'duration' of type 'hmm' from 'null'
11-21 15:06:18.219 1830-2060/marytts.android D/test: 2 Cannot instantiate voice 'cmu-slt-hsmm' Cannot instantiate model 'duration' of type 'hmm' from 'null'
11-21 15:06:18.219 1830-2060/marytts.android D/test: java.lang.Exception: Problem starting module marytts.modules.Synthesis@995928f
11-21 15:06:18.219 1830-2060/marytts.android D/test: marytts.exceptions.MaryConfigurationException: Cannot start MARY server

Kindly let us know whether it will work or not.

Error on Android Studio 2022

Hello! I upgrade gradle to 7.02 and I found problem with start Instance:

D/test: Cannot instantiate object from 'marytts.features.FeatureProcessorManager(en_US)': marytts.features.FeatureProcessorManager
D/test: java.lang.Exception: Cannot instantiate feature processor manager 'marytts.features.FeatureProcessorManager(en_US)'

Missing gradle depenencies

Adding AndroidMaryTTS to build.gradle(app) causes gradle sync to break :

implementation 'com.marytts.android:marylib:1.0.1'

causes :

Error:Failed to resolve: commons-logging:commons-logging:1.1.1

Error reading from input stream

Dear Team,
Getting below error . Kindly help
com.google.android.apps.gsa.shared.speech.b.g: Error reading from input stream
at com.google.android.apps.gsa.staticplugins.microdetection.d.k.a(SourceFile:91)
at com.google.android.apps.gsa.staticplugins.microdetection.d.l.run(Unknown Source:14)
at com.google.android.libraries.gsa.runner.a.a.b(SourceFile:32)
at com.google.android.libraries.gsa.runner.a.c.call(Unknown Source:4)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at com.google.android.apps.gsa.shared.util.concurrent.b.g.run(Unknown Source:4)
at com.google.android.apps.gsa.shared.util.concurrent.b.au.run(SourceFile:4)
at com.google.android.apps.gsa.shared.util.concurrent.b.au.run(SourceFile:4)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
at com.google.android.apps.gsa.shared.util.concurrent.b.i.run(SourceFile:6)

Cannot start MARY server

i got this error

i use android studio

07-13 09:26:11.504 14153-14233/marytts.android D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: false
07-13 09:26:45.937 14153-14232/marytts.android E/art: at marytts.server.Mary.startModules(Mary.java:162)
07-13 09:26:45.937 14153-14232/marytts.android E/art: at marytts.server.Mary.startup(Mary.java:300)
07-13 09:26:45.937 14153-14232/marytts.android E/art: at marytts.server.Mary.startup(Mary.java:220)
07-13 09:26:46.188 14153-14232/marytts.android D/test: marytts.exceptions.MaryConfigurationException: Cannot start MARY server
07-13 09:26:46.208 14153-14163/marytts.android W/System.err: at org.apache.harmony.dalvik.ddmc.DdmServer.dispatch(DdmServer.java:171)

architecture question

Hello,

why have the marytts source code inside the repository ? Did you have modify something inside it ? If yes, we should proceed a little bit differently.

Changing voice

Is it possible to change and tune the voices? I can't figure it out how.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.