playermodel.java
来自「一个非常有意思,并且带图像的语音项目,能读出相应的英文,并有口型」· Java 代码 · 共 78 行
JAVA
78 行
/*******************************************************************************
* Copyright (c) 2004 Berthold Daum. All rights reserved. This program and the
* accompanying materials are made available under the terms of the Common
* Public License v1.0 which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors: Berthold Daum
******************************************************************************/
package com.bdaum.dukeSpeaks;
public interface PlayerModel {
/**
* Returns the volume.
*
* @return the volume, or -1 if unknown, or an error occurred
*/
public float getVolume();
/**
* Sets the volume.
*
* @param volume set the volume of the synthesizer
*/
public void setVolume(float volume);
/**
* Returns the speaking rate.
*
* @return the speaking rate, or -1 if unknown or an error occurred
*/
public float getSpeakingRate();
/**
* Sets the speaking rate in the number of words per minute.
*
* @param wordsPerMin the speaking rate
*/
public void setSpeakingRate(float wordsPerMin);
/**
* Returns the baseline pitch for the current synthesis voice.
*
* @return the baseline pitch for the current synthesis voice
*/
public float getPitch();
/**
* Sets the baseline pitch for the current synthesis voice.
*
* @param pitch the baseline pitch
*/
public void setPitch(float pitch);
/**
* Returns the pitch range for the current synthesis voice.
*
* @return the pitch range for the current synthesis voice
*/
public float getRange();
/**
* Sets the pitch range for the current synthesis voice.
*
* @param range the pitch range
*/
public void setRange(float range);
/**
* Performs text-to-speech on the given text.
*
* @param text the text to perform TTS
*/
public void play(String text);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?