TTS语音音频合成开发接口

功能说明:
该DLL是通过调用Windows语音合成引擎(SPEECH SYNTHESIS ENGINE)进行语言合成,将文本处理后通过扬声器用近似于人的声音“读”出来,通常还可以通过改变对语音引擎的设置改变“说话” 的速度,声音频率;另外还支持播放音频文件(.wav,.mp3等),文字音频文件混读,目前我们开发的DLL支持C#、Delphi、VB、Python、JAVA语音进行调用,让您轻松实现会说话的程序。


使用说明:
1)ttsPlayer.dll为java程序专用,ttsVoicer.dll为标准接口可供C#、Delphi、VB、Python等程序调用;我们还为您制作了多个程序开发语言调用的DEMO。
2)java程序时需将ttsPlayer.dll拷贝到你的java项目的bin目录下,在您的程序(VoiceTextPlayer.java)里调用该接口,例子如下:

//VoiceTextPlayer.java
//ttsDemo.jar为JAVA版本的Demo

package com.suprui.action;

public class VoiceTextPlayer {
//调用动态链接库
static{
System.loadLibrary("ttsPlayer");
System.gc();
}
public native int ReadText(String PalyStr,int TypeID); //PalyStr-文字,TypeID-0=英文,1=中文
public native int PlayFile(String FileName);//FileName-音频文件的路径及名称
public static void main(String[] args) {
VoiceTextPlayer hw = new VoiceTextPlayer();
int x=hw.ReadText("欢迎您使用我们的语音接口!",1);
if(x==1){
System.out.println("OK");
}
else{
System.out.println("NO");
}
int y=hw.PlayFile("ding.wav");
if(y==1){
System.out.println("OK");
}
else{
System.out.println("NO");
}
}
}

3)其他程序调用时,使用ttsVoicer.dll拷贝至程序运行的目录下,下面是C#程序调用该接口,例子如下:

//Program.cs
//ttsDemo.exe为C#版本的Demo

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace VoiceTextPlayer
{
class Program
{
[DllImport("ttsVoicer.dll", EntryPoint = "ReadText")]
static extern int ReadText(string PalyStr, int TypeID); //PalyStr-文字,TypeID-0=英文,1=中文
[DllImport("ttsVoicer.dll", EntryPoint = "PlayFile")]
static extern int PlayFile(string FileName);//FileName-音频文件的路径及名称

static void Main(string[] args)
{
int x= ReadText("欢迎您使用我们的语音接口!", 1);
if (x == 1)
{
Console.WriteLine("OK");
}
else {
Console.WriteLine("NO");
}
int y = PlayFile("ding.wav");
if (y == 1)
{
Console.WriteLine("OK");
}
else
{
Console.WriteLine("NO");
}
Console.ReadLine();
}
}
}

联系信息:
1)如您需要使用我们的接口程序,请与我们联系,QQ:983550041 Tel:025-66654879 MP:13655167760;
2) 如需购买我们的正式版接口,请使用Suprui CMCS.exe工具可获取机器码;
3)该程序版权归南京超锐信息技术有限公司所有,转载请保留该文件。
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值