Packagecom.aispeech.recorder
Classpublic class Recorder4LocalService
InheritanceRecorder4LocalService Inheritance RecorderBase Inheritance flash.events.EventDispatcher
Implements IRecorder

Singlton audio recorder/replayer used with Local service Dependencies: LocalServiceCoreRequester, HTTPConnection, Check RecorderBase for base method and properties TODO: support streaming



Public Properties
 PropertyDefined By
 InheriteddingPlayEnabled : Boolean
RecorderBase
 InheriteddingVolume : Number
Set ding volume
RecorderBase
 InheritedreplayVolume : Number
get replay volume
RecorderBase
 Inheritedstate : String
[read-only]
RecorderBase
Protected Properties
 PropertyDefined By
 Inherited_dingIndex : uint
RecorderBase
 Inherited_localWave : LocalWave
RecorderBase
 Inherited_recorderLog : RecorderLog
RecorderBase
 Inherited_recordId : String
RecorderBase
 Inherited_recordingTimerId : int
RecorderBase
 Inherited_recordLength : int
RecorderBase
 Inherited_requestId : String
RecorderBase
 Inherited_state : String = recorder.not.ready
RecorderBase
 Inherited_stopType : String
RecorderBase
Public Methods
 MethodDefined By
  
Recorder4LocalService(singleMade:SingleMade)
Singleton constructor
Recorder4LocalService
  
dispose():void
Recorder4LocalService
  
[static]
Recorder4LocalService
  
init(connection:IConnection, coreRequester:ICoreRequester):void
Init a recorder
Recorder4LocalService
 Inherited
playDing():void
RecorderBase
  
startRecord(recordLength:int = 2000):String
Start recording, pulish stream to the target server
Recorder4LocalService
 Inherited
startReplay(recordId:String):String
start replay using local wave
RecorderBase
  
stopRecord(stopType:String):String
Stop recording the audio
Recorder4LocalService
 Inherited
stopReplay():String
Stop replaying
RecorderBase
Protected Methods
 MethodDefined By
 Inherited
genRecordId():String
Generate record ID, using UUID
RecorderBase
 Inherited
getWaveLength(wave:ByteArray, sampleRate:int):Number
get wave length (ms)
RecorderBase
 Inherited
replay stop event handler
RecorderBase
Public Constants
 ConstantDefined By
 InheritedRECORD_LENGTH : int = 2000
[static]
RecorderBase
 InheritedSTOP_TYPE_AUTO : String = stop.auto
[static]
RecorderBase
 InheritedSTOP_TYPE_MANUAL : String = stop.manually
[static]
RecorderBase
Constructor Detail
Recorder4LocalService()Constructor
public function Recorder4LocalService(singleMade:SingleMade)

Singleton constructor

Parameters
singleMade:SingleMade
Method Detail
dispose()method
public function dispose():void

getInstance()method 
public static function getInstance():Recorder4LocalService

Returns
Recorder4LocalService
init()method 
public function init(connection:IConnection, coreRequester:ICoreRequester):void

Init a recorder

Parameters

connection:IConnection
 
coreRequester:ICoreRequester

startRecord()method 
public function startRecord(recordLength:int = 2000):String

Start recording, pulish stream to the target server

Parameters

recordLength:int (default = 2000) — in ms

Returns
String
stopRecord()method 
public function stopRecord(stopType:String):String

Stop recording the audio

Parameters

stopType:String — to the sender of the stop_recording command

Returns
String