public static void StartRecording(bool htmlResponse) { //_audioCapture = new AudioCapture(16000, AudioChannel.Mono, AudioSampleType.S16Le); IsRecording = true; var ar = new AssistRequest { Config = new AssistConfig { AudioInConfig = new AudioInConfig { SampleRateHertz = 16000, Encoding = AudioInConfig.Types.Encoding.Linear16 }, ScreenOutConfig = new ScreenOutConfig { ScreenMode = htmlResponse ? ScreenOutConfig.Types.ScreenMode.Playing : ScreenOutConfig.Types.ScreenMode.Unspecified } } }; SapService.SendData(ar.ToByteArray()); _audioCapture.Prepare(); Record(); }
public void StartRecording() { if (isRecording) { Tizen.Log.Debug("AUDIORECORDER", "BAD!:RECORDING FLAG TRUE ON START RECORDING"); } audioCapture = new AudioCapture(16000, AudioChannel.Mono, AudioSampleType.S16Le); isRecording = true; source = new CancellationTokenSource(); token = source.Token; audioCapture.Prepare(); Record(); }