📄 playermodel.java
字号:
/*******************************************************************************
* 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -