|
|
@ -11,7 +11,6 @@ import io.flutter.plugin.common.MethodChannel |
|
|
import io.flutter.plugin.common.MethodChannel.MethodCallHandler |
|
|
import io.flutter.plugin.common.MethodChannel.MethodCallHandler |
|
|
import io.flutter.plugin.common.MethodChannel.Result |
|
|
import io.flutter.plugin.common.MethodChannel.Result |
|
|
import io.flutter.plugin.common.EventChannel |
|
|
import io.flutter.plugin.common.EventChannel |
|
|
import com.microsoft.cognitiveservices.speech.audio.* |
|
|
|
|
|
import com.deep_voice.speech.tts.TtsEvent |
|
|
import com.deep_voice.speech.tts.TtsEvent |
|
|
import com.deep_voice.speech.tts.TtsEventListener |
|
|
import com.deep_voice.speech.tts.TtsEventListener |
|
|
import com.deep_voice.speech.tts.TtsEventType |
|
|
import com.deep_voice.speech.tts.TtsEventType |
|
|
@ -366,6 +365,7 @@ class AzureSpeechPlugin : BleService.Callback, FlutterPlugin { |
|
|
result.error("ENABLERECORD_ERROR", e.message, null) |
|
|
result.error("ENABLERECORD_ERROR", e.message, null) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
"moveFile" -> { |
|
|
"moveFile" -> { |
|
|
val sourcePath = call.argument<String>("sourcePath") ?: "" |
|
|
val sourcePath = call.argument<String>("sourcePath") ?: "" |
|
|
val destPath = call.argument<String>("destPath") ?: "" |
|
|
val destPath = call.argument<String>("destPath") ?: "" |
|
|
@ -378,6 +378,7 @@ class AzureSpeechPlugin : BleService.Callback, FlutterPlugin { |
|
|
result.error("ENABLERECORD_ERROR", e.message, null) |
|
|
result.error("ENABLERECORD_ERROR", e.message, null) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
"enableRecord" -> { |
|
|
"enableRecord" -> { |
|
|
val filePath = call.argument<String>("filePath") ?: "" |
|
|
val filePath = call.argument<String>("filePath") ?: "" |
|
|
try { |
|
|
try { |
|
|
@ -389,10 +390,12 @@ class AzureSpeechPlugin : BleService.Callback, FlutterPlugin { |
|
|
result.error("ENABLERECORD_ERROR", e.message, null) |
|
|
result.error("ENABLERECORD_ERROR", e.message, null) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
"pauseRecord" -> { |
|
|
"pauseRecord" -> { |
|
|
azureAsrHelper.pauseRecord() |
|
|
azureAsrHelper.pauseRecord() |
|
|
result.success(true) |
|
|
result.success(true) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
"stopRecord" -> { |
|
|
"stopRecord" -> { |
|
|
val isSave = call.argument<Boolean>("isSave") ?: false |
|
|
val isSave = call.argument<Boolean>("isSave") ?: false |
|
|
try { |
|
|
try { |
|
|
|