MaryTTS

MARY TTS -- -- 一个用纯java编写的开放源码、多语种文本到语音合成系统。「MARY TTS -- an open-source, multilingual text-to-speech synthesis system written in pure java」

Github星跟蹤圖

MaryTTS

这是多语言开源 MARY 文本到语音平台(MaryTTS)的源码库。MaryTTS 是一个用纯 Java 编写的客户端-服务器系统,因此它可以在许多平台上运行。

关于可下载使用的软件包,请看发布页面

关于从不同角度使用 MaryTTS 的文档,请看 wiki

旧的文档也可以在 http://mary.dfki.dehttps://mary.opendfki.de 找到。

这个 README 是 MaryTTS 源代码库的一部分。它包含了关于编译和开发 MaryTTS 源代码的信息。

该代码采用 Lesser General Public License LGPL 第 3 版 -- 请参见 LICENSE.md 了解详情。

运行 MaryTTS

运行 ./gradlew run(或在 Windows 上运行 gradlew.bat)来启动 MaryTTS 服务器。然后用你的网络浏览器访问它:http://localhost:59125

如果你想在不同的地址和端口上启动 MaryTTS,你可以使用以下选项。

./gradlew run -Dsocket.port=5920 -Dsocket.addr=0.0.0.0 --info

其中 5920 为新端口,0.0.0.0 为新地址。如果地址是 0.0.0.0,所有的接口都会被监听。

通过使用选项 -info,你可以将 gradle 和 MaryTTS 的记录器设置为 INFO 级别。通过使用 --debug,你可以将级别设置为 DEBUG。

也可以通过定义系统变量 log4j.logger.marytts,将 MaryTTS 的日志记录器级别设置为 INFO 或 DEBUG。

下载和安装声音

运行 ./gradlew runInstallerGui 来启动安装程序 GUI,下载并安装更多的声音。在使用新的声音之前,需要重新启动正在运行的 MaryTTS 服务器。

构建 MaryTTS

运行 ./gradlew build。这将编译和测试所有模块,并为每个模块创建 build/ 下的输出。

请注意,之前 MaryTTS v5.x 是用 Maven 构建的。请参考 5.x 分支。

打包 MaryTTS

运行 ./gradlew distZip 或 ./gradlew distTar 来构建 build/distributions 下的发行包。你也可以通过运行 ./gradlew installDist 将一个未打包的发行包直接 "安装"到 build/install 中。

该发行版包含运行独立的 MaryTTS 服务器实例或下载安装更多声音所需的所有文件。运行服务器或安装程序 GUI 的脚本可以在发行版的 bin/ 目录下找到。

在您自己的 Java 项目中使用 MaryTTS

在你自己的 Java 项目中使用 MaryTTS 的最简单的方法是在相关的 MaryTTS 构件上声明一个依赖关系,比如默认的美国英语 HSM 语音。

Maven

加到你的 pom.xml:

<repositories>
  <repository>
    <url>https://jcenter.bintray.com</url>
  </repository>
</repositories>

<dependencies>
  <dependency>
    <groupId>de.dfki.mary</groupId>
    <artifactId>voice-cmu-slt-hsmm</artifactId>
    <version>5.2</version>
  </dependency>
</dependencies>

Gradle

加到你的 build.gradle:

repositories {
  jcenter()
}
dependencies {
  compile group: 'de.dfki.mary', name: 'voice-cmu-slt-hsmm', version: '5.2'
}

语音合成

在这个资源库中提出了文本转 wav 的基本例子。

在其他编程语言中使用 MaryTTS

如果你想将 MaryTTS 用于其他编程语言(比如 python),你需要实现3个步骤。

  1. 编译 marytts
  2. 启动服务器
  3. 在服务器上查询合成

使用服务器合成语音

使用服务器合成语音,非常容易。你需要生成适当的 HTTP 查询,并处理相关的 HTTP 响应。举例说明:

额外文件

服务器即服务(Linux 专用)

这里提出一个如何将 marytts 服务器定义为服务的例子。

用户字典

你可以通过添加一个用户字典来扩展字典。如何做到这一点的文档在这里

贡献

向 MaryTTS 源码做出贡献的推荐工作流程是遵循 GitHub 模式。

将 MaryTTS 仓库分叉到自己在 GitHub 上的配置文件中,方法是浏览https://github.com/marytts/marytts,然后点击 "fork"(当然你需要一个 GitHub 账户)。

使用 git clone、commit 和 push 命令在自己的 marytts 仓库上进行修改;在这个过程中,确保定期 git pull 上游 master,以便与 master 仓库的最新发展保持同步。
当你认为一个可重用的贡献已经准备好了,在GitHub上打开一个 "pull request",以便于合并到主仓库中。

更多细节请参考 GitHub 文档

IDE 配置

Wiki 页面可以帮助你配置你的 IDE 来开发 MaryTTS。以下 IDE 已经过测试和记录。


(The first version translated by vz on 2020.10.07)

主要指標

概覽
名稱與所有者marytts/marytts
主編程語言Java
編程語言TeX (語言數: 9)
平台BSD, Cross-platform, Linux, Mac, Solaris, Windows
許可證Other
所有者活动
創建於2011-12-20 16:44:48
推送於2025-01-17 18:26:22
最后一次提交2025-01-17 19:26:22
發布數34
最新版本名稱v5.2.1 (發布於 2022-05-21 16:47:41)
第一版名稱v3.0.0 (發布於 )
用户参与
星數2.5k
關注者數133
派生數753
提交數4.4k
已啟用問題?
問題數828
打開的問題數110
拉請求數182
打開的拉請求數25
關閉的拉請求數80
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?

Build Status

MaryTTS

This is the source code repository for the multilingual open-source MARY text-to-speech platform (MaryTTS).
MaryTTS is a client-server system written in pure Java, so it runs on many platforms.

For a downloadable package ready for use, see the releases page.

For documentation on using MaryTTS from various angles, see the wiki.

Older documentation can also be found at http://mary.dfki.de and https://mary.opendfki.de.

This README is part of the the MaryTTS source code repository.
It contains information about compiling and developing the MaryTTS sources.

The code comes under the Lesser General Public License LGPL version 3 -- see LICENSE.md for details.

Running MaryTTS

Run ./gradlew run (or gradlew.bat run on Windows) to start a MaryTTS server.
Then access it at http://localhost:59125 using your web browser.

Downloading and installing voices

Run ./gradlew runInstallerGui to start an installer GUI to download and install more voices.
A running MaryTTS server needs to be restarted before the new voices can be used.

Building MaryTTS

Run ./gradlew build.
This will compile and test all modules, and create the output for each under build/.

Note that previously, MaryTTS v5.x was built with Maven. Please refer to the 5.x branch.

Packaging MaryTTS

Run ./gradlew distZip or ./gradlew distTar to build a distribution package under build/distributions.
You can also "install" an unpacked distribution directly into build/install by running ./gradlew installDist.

The distribution contains all the files required to run a standalone MaryTTS server instance, or to download and install more voices.
The scripts to run the server or installer GUI can be found inside the distribution in the bin/ directory.

Using MaryTTS in your own Java projects

The easiest way to use MaryTTS in your own Java projects is to declare a dependency on a relevant MaryTTS artifact, such as the default US English HSMM voice:

Maven

Add to your pom.xml:

<repositories>
  <repository>
    <url>https://jcenter.bintray.com</url>
  </repository>
</repositories>

<dependencies>
  <dependency>
    <groupId>de.dfki.mary</groupId>
    <artifactId>voice-cmu-slt-hsmm</artifactId>
    <version>5.2</version>
  </dependency>
</dependencies>

Gradle

Add to your build.gradle:

repositories {
  jcenter()
}

dependencies {
  compile group: 'de.dfki.mary', name: 'voice-cmu-slt-hsmm', version: '5.2'
}

Synthesizing speech

Text to wav basic examples are proposed in this repository

Using MaryTTS for other programming languages

If you want to use MaryTTS for other programming languages (like python for example), you need to achieve 3 steps

  1. compiling marytts
  2. starting the server
  3. query synthesis on the server

Synthesize speech using the server

Synthesizing speech, using the server, is pretty easy.
You need to generate proper HTTP queries and deal with the associated HTTP responses.
Examples are proposed :

Contributing

The recommended workflow for making contributions to the MaryTTS source code is to follow the GitHub model:

  1. fork the MaryTTS repository into your own profile on GitHub, by navigating to https://github.com/marytts/marytts and clicking "fork" (of course you need a GitHub account);

  2. use the git clone, commit, and push commands to make modifications on your own marytts repository;
    in this process, make sure to git pull upstream master regularly to stay in sync with latest developments on the master repo;

  3. when you think a reusable contribution is ready, open a "pull request" on GitHub to allow for easy merging into the master repository.

Have a look at the GitHub documentation for further details.

IDE configuration

Wiki pages are available to help you to configure your IDE to develop MaryTTS.
The following IDEs have been tested and documented: