All Packages Class Hierarchy This Package Previous Next Index
Class iceberg.transcoder.TranscoderService
java.lang.Object
|
+----ninja.rmi.NinjaRemoteObject
|
+----ninja.ispace.iSpaceService
|
+----iceberg.transcoder.TranscoderService
- public class TranscoderService
- extends iSpaceService
- implements TranscoderServiceIF
Class that provides various transcodings of audio and text.
audio -> text summary
audio -> text outline
audio -> audio summary
audio -> skimmed audio
audio file -> key word text file
audio -> text
audio file -> text file
text -> audio
text file -> audio file
-
TranscoderService()
- constructor
-
audioAnalyzer(String, String, String)
-
-
audioSummary(byte[], int)
- make an Audio Summary from voicemail
-
destroy()
-
-
getNewFilename()
-
-
init(iSpaceServiceConfig)
- Initialization: cleanup
-
main(String[])
- main program that recognizes test.pcm audio file
to play file:
play -t .raw -r 22050 -w -s test.pcm
-
readFromStream(InputStream)
-
-
readFromStream(String)
- Reads a file into a byte array.
-
skimmedAudio(byte[])
- Method which generates skimmed audio from
speech audio
-
speechRecoCommand(String)
- Method which uses rule grammar (NLP) for spotting key phrases
in a speech audiofile
-
speechRecognizer(byte[])
- Method which transcodes speech to text
-
speechRecognizer(String)
- Method which uses dictation grammar for translating
speech to text
-
speechRecognizer(String, String)
- Method which uses dictation grammar for translating
speech to text
-
speechSynthesizer(byte[], int)
- Method which synthesizes text
-
speechSynthesizer(String)
- Method which synthesizes text
-
speechSynthesizer(String, String)
- Method which synthesizes text
-
textOutline(Outline, byte[])
- Method creates a text outline from audio.
-
textSummary(byte[])
- make a Text Summary from voicemail
this consists of two parts
a) Recognize name and phone number
b) Recognize key words using pitch detection
-
toGSM(String)
-
-
toRaw22(String)
-
-
toWave22(String)
-
-
writeToFile(byte[], String)
- Writes a byte array to a file.
TranscoderService
public TranscoderService() throws RemoteException
- constructor
init
protected void init(iSpaceServiceConfig config)
- Initialization: cleanup
- Overrides:
- init in class iSpaceService
destroy
protected void destroy()
- Overrides:
- destroy in class iSpaceService
readFromStream
protected byte[] readFromStream(String filename) throws RemoteException, IOException
- Reads a file into a byte array.
- Parameters:
- filename - the file to be read
- Returns:
- byte array of file contents
getNewFilename
protected String getNewFilename()
writeToFile
protected void writeToFile(byte theData[],
String filename) throws RemoteException, IOException
- Writes a byte array to a file.
- Parameters:
- theData - the byte array of data
- filename - the output filename
readFromStream
protected byte[] readFromStream(InputStream is) throws RemoteException, IOException
textOutline
public Outline textOutline(Outline transObj,
byte theAudio[]) throws RemoteException, IOException
- Method creates a text outline from audio.
- Parameters:
- transObj - is a special MediaManager mime type
- theAudio - is the byte array of speech (16 bit
22050Hz linear .wav)
if you don't have the MediaManager, just comment
this out.
- Returns:
- a iceberg.mediamanager.Outline object
speechRecognizer
public byte[] speechRecognizer(byte theAudio[]) throws RemoteException, IOException
- Method which transcodes speech to text
- Parameters:
- theAudio - is byte array of speech audio (.wav)
- Returns:
- a byte array of text
textSummary
public byte[] textSummary(byte theAudio[]) throws RemoteException, IOException
- make a Text Summary from voicemail
this consists of two parts
a) Recognize name and phone number
b) Recognize key words using pitch detection
- Parameters:
- byte - array of speech audio (16 bit
22050Hz linear .wav)
- Returns:
- byte array of text summary
audioSummary
public byte[] audioSummary(byte theAudio[],
int format) throws RemoteException, IOException
- make an Audio Summary from voicemail
- Parameters:
- byte - array of speech audio (.wav)
- int - output audio format
- Returns:
- byte array of summarized audio
skimmedAudio
public byte[] skimmedAudio(byte theAudio[]) throws RemoteException, IOException
- Method which generates skimmed audio from
speech audio
- Parameters:
- byte - array of speech audio (16 bit
22050Hz linear .wav)
- Returns:
- byte array of summarized audio
audioAnalyzer
protected String audioAnalyzer(String inputfile,
String operation,
String outdir) throws RemoteException
speechRecoCommand
public String speechRecoCommand(String inputfile) throws RemoteException
- Method which uses rule grammar (NLP) for spotting key phrases
in a speech audiofile
- Parameters:
- String - inputfile of speech audio
- Returns:
- String output filename of text .txt
speechRecognizer
public String speechRecognizer(String inputfile) throws RemoteException
- Method which uses dictation grammar for translating
speech to text
- Parameters:
- String - inputfile of speech audio
- Returns:
- String output filename of text .txt
speechRecognizer
public String speechRecognizer(String inputfile,
String outputfile) throws RemoteException
- Method which uses dictation grammar for translating
speech to text
- Parameters:
- String - inputfile of speech audio
- String - outputputfile of text
- Returns:
- String output filename of text .txt
toWave22
protected String toWave22(String infilename) throws IOException
toGSM
protected String toGSM(String infilename) throws IOException
toRaw22
protected String toRaw22(String infilename) throws IOException
speechSynthesizer
public byte[] speechSynthesizer(byte theText[],
int format) throws RemoteException, IOException
- Method which synthesizes text
- Parameters:
- byte - array of text
- int - format of audio output
- Returns:
- byte array of synthesized speech (16 bit
22050Hz .wav or GSM)
speechSynthesizer
public String speechSynthesizer(String inputfile) throws RemoteException
- Method which synthesizes text
- Parameters:
- String - inputfile of text
- Returns:
- String filename of synthesized speech
speechSynthesizer
public String speechSynthesizer(String inputfile,
String outputfile) throws RemoteException
- Method which synthesizes text
- Parameters:
- String - input filename of text
- String - output filename of audio
- Returns:
- String filename of synthesized speech
main
public static void main(String argv[])
- main program that recognizes test.pcm audio file
to play file:
play -t .raw -r 22050 -w -s test.pcm
All Packages Class Hierarchy This Package Previous Next Index