com.speech4j.speech
Class NativeObject

java.lang.Object
  |
  +--com.speech4j.speech.NativeObject
Direct Known Subclasses:
Audio, MMDevice, TTSBufNotifySink, TTSEnum, TTSMode, TTSNotifySink

public class NativeObject
extends java.lang.Object

Base class for MS SAPI objects

Version:
1.1
Author:
Pavel Vlasov

Constructor Summary
NativeObject()
           
 
Method Summary
static java.lang.String bytes2String(byte[] ba)
          Converts byte array to String.
static void cleanup()
          Destroys all "native" objects.
 int getObjID()
          Returns object ID - integer number.
static int processMessages()
          Processes all messages in the current thread's queue.
static void stopProcessingMessages()
          Stops processMessages loop.
static byte[] string2Bytes(java.lang.String s)
          Converts String to byte array
static void testSpeech()
          Tests speech functions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NativeObject

public NativeObject()
Method Detail

getObjID

public int getObjID()
Returns object ID - integer number. For debug use only.

Returns:
Object ID.

processMessages

public static int processMessages()
Processes all messages in the current thread's queue.

Returns:
Number of processed messages.

stopProcessingMessages

public static void stopProcessingMessages()
Stops processMessages loop.


testSpeech

public static void testSpeech()
Tests speech functions. Says "Hello, this is a very simple function speaking from Java."


cleanup

public static void cleanup()
Destroys all "native" objects. Can be used at the end of using API instead of calling individual destroy methods.


bytes2String

public static java.lang.String bytes2String(byte[] ba)
Converts byte array to String.

Parameters:
ba - Byte array.

string2Bytes

public static byte[] string2Bytes(java.lang.String s)
Converts String to byte array

Parameters:
s - String to convert.


Copyright © 2003 Pavel Vlasov. All Rights Reserved.