onbon.bx06.file
Class VoiceBxFile

java.lang.Object
  extended by onbon.bx06.file.VoiceBxFile
All Implemented Interfaces:
BxFile

public final class VoiceBxFile
extends Object
implements BxFile

语音文件。

Author:
ONBON

Nested Class Summary
static class VoiceBxFile.CharsetType
          语音数据编码格式。
 
Nested classes/interfaces inherited from interface onbon.bx06.file.BxFile
BxFile.Binary
 
Constructor Summary
VoiceBxFile(int no)
          建构子。
VoiceBxFile(String fileName)
          建构子。
 
Method Summary
 BxFile.Binary generate()
          产生文件的位元组资讯。
 String getContent()
          取得语音数据。
 VoiceBxFile.CharsetType getContentCharset()
          取得语音数据编码格式。
 String getFileName()
          取得文件名称。
 onbon.bx06.message.common.FileType getFileType()
          取得文件类型。
 int getNumDeal()
          取得保留参数:数字处理方式。
 int getPerson()
          取得发音人。
 int getReplayDelay()
          取得两次播放语音的时间间隔,单位为 10ms。
 int getReplayTimes()
          取得重播次数,-1 表示播放无限次。
 int getSpeed()
          取得语速。
 int getSymbolStyle()
          取得保留参数:阿拉伯数字、度量单位、特殊符号等合成方式。
 int getVolume()
          取得音量。
 int getWordStyle()
          取得保留参数:字詞发音方式。
 boolean isExtraInfo()
          取得是否有保留参数。
 boolean isStoreInFlash()
          设定是否需要存储到FLASH。
 void setContent(String content)
          设定语音数据。
 void setContentCharset(VoiceBxFile.CharsetType contentCharset)
          设定语音数据编码格式。
 void setExtraInfo(boolean extraInfo)
          设定保留参数。
 void setNumDeal(int numDeal)
          设定保留参数:数字处理方式。
0:自动判断。
1:数字作号码处理。
2:数字作数值处理。。
 void setPerson(int person)
          设定发音人。
 void setReplayDelay(int replayDelay)
          设定两次播放语音的时间间隔,单位为 10ms。
 void setReplayTimes(int replayTimes)
          设定重播次数, -1 表示播放无限次。
 void setSpeed(int speed)
          设定语速。
 void setStoreInFlash(boolean storeInFlash)
          设定是否需要存储到FLASH。
 void setSymbolStyle(int symbolStyle)
          设定保留参数:阿拉伯数字、度量单位、特殊符号等合成方式。
0:自动判断语种。
1:阿拉伯数字、度量单位、特殊符号等合成为中文。
2:阿拉伯数字、度量单位、特殊符号等合成为英文。
 void setVolume(int volume)
          设定音量。
 void setWordStyle(int wordStyle)
          设定保留参数:字詞发音方式。
0:自动判断发音方式。
1:字母发音方式。
2:单词发音方式。。
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VoiceBxFile

public VoiceBxFile(int no)
建构子。

Parameters:
no - 语音编号组,0-999。

VoiceBxFile

public VoiceBxFile(String fileName)
建构子。

Parameters:
fileName - 语音名称。长度为四,第一码为 V,后三码为数字,例如 V042。
Method Detail

isStoreInFlash

public boolean isStoreInFlash()
设定是否需要存储到FLASH。

Returns:
是否需要存储到FLASH。

setStoreInFlash

public void setStoreInFlash(boolean storeInFlash)
设定是否需要存储到FLASH。

Parameters:
storeInFlash -

getPerson

public int getPerson()
取得发音人。

Returns:
发音人。

setPerson

public void setPerson(int person)
设定发音人。

Parameters:
person - 发音人,0 ~ 5。

getVolume

public int getVolume()
取得音量。

Returns:
音量。

setVolume

public void setVolume(int volume)
设定音量。

Parameters:
volume - 音量,0 ~ 10。

getSpeed

public int getSpeed()
取得语速。

Returns:
语速。

setSpeed

public void setSpeed(int speed)
设定语速。

Parameters:
speed - 语速,0 ~ 10。

getReplayTimes

public int getReplayTimes()
取得重播次数,-1 表示播放无限次。

Returns:
重播次数。

setReplayTimes

public void setReplayTimes(int replayTimes)
设定重播次数, -1 表示播放无限次。

Parameters:
replayTimes - 重播时间间隔。

getReplayDelay

public int getReplayDelay()
取得两次播放语音的时间间隔,单位为 10ms。

Returns:
两次播放语音的时间间隔。

setReplayDelay

public void setReplayDelay(int replayDelay)
设定两次播放语音的时间间隔,单位为 10ms。

Parameters:
replayDelay - 重播时间间隔。

isExtraInfo

public boolean isExtraInfo()
取得是否有保留参数。

Returns:
是否有保留参数。

setExtraInfo

public void setExtraInfo(boolean extraInfo)
设定保留参数。

Parameters:
extraInfo - 保留参数。

getNumDeal

public int getNumDeal()
取得保留参数:数字处理方式。

Returns:
数字处理方式。

setNumDeal

public void setNumDeal(int numDeal)
设定保留参数:数字处理方式。
0:自动判断。
1:数字作号码处理。
2:数字作数值处理。。

Parameters:
numDeal -

getSymbolStyle

public int getSymbolStyle()
取得保留参数:阿拉伯数字、度量单位、特殊符号等合成方式。

Returns:
阿拉伯数字、度量单位、特殊符号等合成方式。

setSymbolStyle

public void setSymbolStyle(int symbolStyle)
设定保留参数:阿拉伯数字、度量单位、特殊符号等合成方式。
0:自动判断语种。
1:阿拉伯数字、度量单位、特殊符号等合成为中文。
2:阿拉伯数字、度量单位、特殊符号等合成为英文。

Parameters:
symbolStyle -

getWordStyle

public int getWordStyle()
取得保留参数:字詞发音方式。

Returns:
字詞发音方式。

setWordStyle

public void setWordStyle(int wordStyle)
设定保留参数:字詞发音方式。
0:自动判断发音方式。
1:字母发音方式。
2:单词发音方式。。

Parameters:
wordStyle - 字詞发音方式。

getContentCharset

public VoiceBxFile.CharsetType getContentCharset()
取得语音数据编码格式。

Returns:
语音数据编码格式。

setContentCharset

public void setContentCharset(VoiceBxFile.CharsetType contentCharset)
设定语音数据编码格式。

Parameters:
contentCharset - 语音数据编码格式。

getContent

public String getContent()
取得语音数据。

Returns:
语音数据。

setContent

public void setContent(String content)
设定语音数据。

Parameters:
content - 语音数据。

getFileName

public String getFileName()
Description copied from interface: BxFile
取得文件名称。

Specified by:
getFileName in interface BxFile
Returns:
文件名称。

getFileType

public onbon.bx06.message.common.FileType getFileType()
Description copied from interface: BxFile
取得文件类型。

Specified by:
getFileType in interface BxFile
Returns:
文件类型。

generate

public BxFile.Binary generate()
                       throws Bx6GException
Description copied from interface: BxFile
产生文件的位元组资讯。

Specified by:
generate in interface BxFile
Returns:
位元组资讯。
Throws:
Bx6GException - 产生位元组资讯时发生错误。


Copyright © 2020 onbon. All rights reserved.