Skip to content

一个基于讯飞 Web Api 文本转语音并播放语音的小工具(A Small Tool for Converting Text to Speech and Playing Speech Based on Xunfei Web Api)

License

Notifications You must be signed in to change notification settings

happystraw/text-player

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text Player

A Small Tool for Converting Text to Speech and Playing Speech Based on Xunfei Web Api 讯飞在线语音合成(Xunfei online tts web api).

Platforms

  • Linux
  • Windows/macOS(Untested)

Installing

go install -v github.com/happystraw/text-player@latest

Getting Started

Configuration

  • Register a Xunfei online tts web api application. If you already have one, ignore this step.

  • Set the APPID , APIKey and APISecret of Xunfei online tts web api to default configuration for Text Player.

    text-player config --appid 'your appid' --apikey 'your apikey' --apisecret 'your apisecret'

Run in command line

text-player play "富强、民主、文明、和谐、自由、平等、公正、法治、爱国、敬业、诚信、友善"

Run in server

# default listen at localhost:8888
text-player serve

Test

# POST  HTTP/1.1
# Host: localhost:8888
#
# Content-Disposition: form-data; name="msg"
#
# Hello, China
# ------WebKitFormBoundary7MA4YWxkTrZu0gW--
curl -d "msg=Hello, China" localhost:8888

Usages

  • Use "text-player --help" for more information about this application.

License

Text Player is released under the Apache 2.0 license. See LICENSE

About

一个基于讯飞 Web Api 文本转语音并播放语音的小工具(A Small Tool for Converting Text to Speech and Playing Speech Based on Xunfei Web Api)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages