Code Monkey home page Code Monkey logo

dnetspeech's Introduction

dnetspeech

这是一个使用 .NET 和 Microsoft Cognitive Services Speech SDK 构建的语音合成服务。

安装

  1. 克隆此仓库到本地。
  2. 在项目的根目录下创建一个 .env 文件,用于存储环境变量。

环境变量

.env 文件中,需要设置以下两个环境变量:

  • SPEECH_KEY:您的 Microsoft Cognitive Services Speech 服务的订阅密钥。
  • SPEECH_REGION:您的 Microsoft Cognitive Services Speech 服务的区域。

例如:

SPEECH_KEY=your_speech_key 
SPEECH_REGION=your_speech_region

运行

在项目的根目录下,使用以下命令启动服务:

dotnet restore
dotnet run

服务启动后,您可以访问 http://localhost:5032/test.html 来测试语音合成功能。

源码位于 ./wwwroot/test.html

API

GET /api/speak:将文本转化为语音。需要在请求参数中提供 text 参数。 GET /api/speak/health:检查服务的健康状态。

dnetspeech's People

Contributors

radezheng avatar

Watchers

 avatar

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.