search

Can tts be used in linux?

Mar 09, 2023 pm 07:14 PM
linux

Can. In Linux, you can use the Ekho software to implement the TTS (text-to-speech) function; you only need to download and install the Ekho software, and you can use the ekho command to convert text to speech, with the syntax "ekho "text"". Ekho is a free, open source Chinese speech synthesis software that supports Linux, Windows and Android platforms.

Can tts be used in linux?

The operating environment of this tutorial: linux7.3 system, Ekho 8.6, Dell G3 computer.

Linux system implements TTS (text to speech) function

1. Requirement background

In the process of user interaction software development, voice prompt requirements are often encountered. Voice prompts are a relatively direct way of interaction and can effectively improve user experience. Currently, the more common solutions include Baidu Voice Platform and iFlytek Voice Platform. These platforms generally call online services through APIs. The advantage is that the converted voice is relatively accurate, pronounced by real people, and there are a variety of voice package options. The disadvantage is that it relies on the Internet, cannot be used when the network is disconnected, requires a fee, and has a limit on the number of uses. Of course, you can choose offline SDK development for these platforms. Different platforms provide different SDK platforms. There is currently no support for the embedded arm platform. Of course, if the voice prompts are relatively few and relatively fixed, it is also a simple and fast solution to record the voice first and play the voice file directly when using it.

For the embedded arm platform, the Linux system is used. When there is no network and the voice prompt is uncertain, the TTS engine can only be used to solve the problem. After many searches, I finally found an open source Chinese TTS software Ekho (Yuyin) that is more suitable.

#2. Introduction to Ekho

Ekho (Yuyin) is a free, open source Chinese speech synthesis software. It currently supports Cantonese, Mandarin (Mandarin), Guangdong Taishan dialect, Zhao'an Hakka, Tibetan, Yayan (the lingua franca of ancient China) and Korean (under trial), and English is implemented indirectly through eSpeak or Festival. Ekho supports Linux, Windows and Android platforms.

Ekho download address: http://www.eguidedog.net/cn/ekho_cn.php

3. Ekho installation

3.1 Download Ekho

Can tts be used in linux?

##3.2 Installation Ekho

First install the third-party dependency files. Note that the latest version of ekho relies on the espeak-ng library instead of espeak, which has stopped maintenance.

sudo apt-get install espeak-ng  libespeak-ng-dev  libsndfile1-dev libpulse-dev libncurses5-dev libestools-dev festival-dev libvorbis-dev libmp3lame-dev libdotconf-dev texinfo pulseaudio libpulse-ocaml-dev

3.3 Compile and install
tar xJvf ekho-xxx.tar.xz
cd ekho-xxx
./configure
make  -j4
sudo make install

Note: Please replace xxx with the specific file path.

4. Test the Ekho effect

##Directly generate voice playback

ekho  "你好呀"
If the sound can not be played normally, there may be a problem with the system's sound card settings, please check. Another reason may be that the pulseaudio service has not been started.

pulseaudio -start

Execute ekho "Hello!" again, and you will hear a mechanical voice.

Generate voice files

ekho "你好。请继续保持努力!" -o holdon.wav
Finally set the pulseaudio service to automatically start at boot. This step is set as needed

pulseaudio --start --log-target=syslog

in /etc/rc.local Add

pulseaudio --start --log-target=syslog

to the file to set it to start automatically every time you turn on the computer. Related recommendations: "

Linux Video Tutorial

"

The above is the detailed content of Can tts be used in linux?. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Linux Maintenance Mode: Understanding the PurposeLinux Maintenance Mode: Understanding the PurposeApr 28, 2025 am 12:01 AM

Maintenance mode is used for system maintenance and repair, allowing administrators to work in a simplified environment. 1. System Repair: Repair corrupt file system and boot loader. 2. Password reset: reset the root user password. 3. Package management: Install, update or delete software packages. By modifying the GRUB configuration or entering maintenance mode with specific keys, you can safely exit after performing maintenance tasks.

Linux Operations: Networking and Network ConfigurationLinux Operations: Networking and Network ConfigurationApr 27, 2025 am 12:09 AM

Linux network configuration can be completed through the following steps: 1. Configure the network interface, use the ip command to temporarily set or edit the configuration file persistence settings. 2. Set up a static IP, suitable for devices that require a fixed IP. 3. Manage the firewall and use the iptables or firewalld tools to control network traffic.

Maintenance Mode in Linux: A System Administrator's GuideMaintenance Mode in Linux: A System Administrator's GuideApr 26, 2025 am 12:20 AM

Maintenance mode plays a key role in Linux system management, helping to repair, upgrade and configuration changes. 1. Enter maintenance mode. You can select it through the GRUB menu or use the command "sudosystemctlisolaterscue.target". 2. In maintenance mode, you can perform file system repair and system update operations. 3. Advanced usage includes tasks such as resetting the root password. 4. Common errors such as not being able to enter maintenance mode or mount the file system, can be fixed by checking the GRUB configuration and using the fsck command.

Maintenance Mode in Linux: When and Why to Use ItMaintenance Mode in Linux: When and Why to Use ItApr 25, 2025 am 12:15 AM

The timing and reasons for using Linux maintenance mode: 1) When the system starts up, 2) When performing major system updates or upgrades, 3) When performing file system maintenance. Maintenance mode provides a safe and controlled environment, ensuring operational safety and efficiency, reducing impact on users, and enhancing system security.

Linux: Essential Commands and OperationsLinux: Essential Commands and OperationsApr 24, 2025 am 12:20 AM

Indispensable commands in Linux include: 1.ls: list directory contents; 2.cd: change working directory; 3.mkdir: create a new directory; 4.rm: delete file or directory; 5.cp: copy file or directory; 6.mv: move or rename file or directory. These commands help users manage files and systems efficiently by interacting with the kernel.

Linux Operations: Managing Files, Directories, and PermissionsLinux Operations: Managing Files, Directories, and PermissionsApr 23, 2025 am 12:19 AM

In Linux, file and directory management uses ls, cd, mkdir, rm, cp, mv commands, and permission management uses chmod, chown, and chgrp commands. 1. File and directory management commands such as ls-l list detailed information, mkdir-p recursively create directories. 2. Permission management commands such as chmod755file set file permissions, chownuserfile changes file owner, and chgrpgroupfile changes file group. These commands are based on file system structure and user and group systems, and operate and control through system calls and metadata.

What is Maintenance Mode in Linux? ExplainedWhat is Maintenance Mode in Linux? ExplainedApr 22, 2025 am 12:06 AM

MaintenanceModeinLinuxisaspecialbootenvironmentforcriticalsystemmaintenancetasks.Itallowsadministratorstoperformtaskslikeresettingpasswords,repairingfilesystems,andrecoveringfrombootfailuresinaminimalenvironment.ToenterMaintenanceMode,interrupttheboo

Linux: A Deep Dive into Its Fundamental PartsLinux: A Deep Dive into Its Fundamental PartsApr 21, 2025 am 12:03 AM

The core components of Linux include kernel, file system, shell, user and kernel space, device drivers, and performance optimization and best practices. 1) The kernel is the core of the system, managing hardware, memory and processes. 2) The file system organizes data and supports multiple types such as ext4, Btrfs and XFS. 3) Shell is the command center for users to interact with the system and supports scripting. 4) Separate user space from kernel space to ensure system stability. 5) The device driver connects the hardware to the operating system. 6) Performance optimization includes tuning system configuration and following best practices.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!