C# Класс Bloom.Edit.AudioRecording

This is a clean back-end service that provides recording to files via some http requests from the server. It also delivers real time microphone peak level numbers over a WebSocket. The client can be found at audioRecording.ts.
Наследование: IDisposable
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
PathToCurrentAudioSegment string
PathToTemporaryWav string

Private Properties

Свойство Тип Описание
CleanUpAfterPressTooShort void
CreateRecorder void
GetPathToSegment string
HandleCheckForSegment void
HandleDeleteSegment void
HandleEnableListenButton void
HandleEndRecord void
OnStartRecordingTimer_Elapsed void
Recorder_Stopped void
ReportNoMicrophone void
SetPeakLevel void
TestForTooShortAndSendFailIfSo bool

Открытые методы

Метод Описание
AudioRecording ( BookSelection bookSelection, BloomWebSocketServer bloomWebSocketServer ) : SIL.Media.Naudio
BeginMonitoring ( ) : void

Used to initiate sending the PeakLevelChanged notifications. Currently this typically happens when the Recorder instance is created, which is usually when the talking book tool asks for the AudioDevicesJson. This is not very intuitive, but it's the most easily detectable event that indicates that the talking book tool is actually active.

Dispose ( ) : void
HandleAudioDevices ( ApiRequest request ) : void

Returns a json string like {"devices":["microphone", "Logitech Headset"], "productName":"Logitech Headset", "genericName":"Headset"}, except that in practice currrently the generic and product names are the same and not as helpful as the above. Devices is a list of product names (of available recording devices), the productName and genericName refer to the current selection (or will be null, if no current device).

HandleCurrentRecordingDevice ( ApiRequest request ) : void
HandleStartRecording ( ApiRequest request ) : void
RegisterWithServer ( EnhancedImageServer server ) : void

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Приватные методы

Метод Описание
CleanUpAfterPressTooShort ( ) : void
CreateRecorder ( ) : void
GetPathToSegment ( string segmentId ) : string
HandleCheckForSegment ( ApiRequest request ) : void
HandleDeleteSegment ( ApiRequest request ) : void

Delete a file (typically a recording, as requested by the Clear button in the talking book tool)

HandleEnableListenButton ( ApiRequest request ) : void
HandleEndRecord ( ApiRequest request ) : void
OnStartRecordingTimer_Elapsed ( object sender, EventArgs e ) : void
Recorder_Stopped ( IAudioRecorder arg1, ErrorEventArgs arg2 ) : void
ReportNoMicrophone ( ) : void
SetPeakLevel ( SIL.Media.Naudio.PeakLevelEventArgs args ) : void
TestForTooShortAndSendFailIfSo ( ApiRequest request ) : bool

Описание методов

AudioRecording() публичный Метод

public AudioRecording ( BookSelection bookSelection, BloomWebSocketServer bloomWebSocketServer ) : SIL.Media.Naudio
bookSelection Bloom.Book.BookSelection
bloomWebSocketServer Bloom.Api.BloomWebSocketServer
Результат SIL.Media.Naudio

BeginMonitoring() публичный Метод

Used to initiate sending the PeakLevelChanged notifications. Currently this typically happens when the Recorder instance is created, which is usually when the talking book tool asks for the AudioDevicesJson. This is not very intuitive, but it's the most easily detectable event that indicates that the talking book tool is actually active.
public BeginMonitoring ( ) : void
Результат void

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

protected Dispose ( bool disposing ) : void
disposing bool
Результат void

HandleAudioDevices() публичный Метод

Returns a json string like {"devices":["microphone", "Logitech Headset"], "productName":"Logitech Headset", "genericName":"Headset"}, except that in practice currrently the generic and product names are the same and not as helpful as the above. Devices is a list of product names (of available recording devices), the productName and genericName refer to the current selection (or will be null, if no current device).
public HandleAudioDevices ( ApiRequest request ) : void
request Bloom.Api.ApiRequest
Результат void

HandleCurrentRecordingDevice() публичный Метод

public HandleCurrentRecordingDevice ( ApiRequest request ) : void
request Bloom.Api.ApiRequest
Результат void

HandleStartRecording() публичный Метод

public HandleStartRecording ( ApiRequest request ) : void
request Bloom.Api.ApiRequest
Результат void

RegisterWithServer() публичный Метод

public RegisterWithServer ( EnhancedImageServer server ) : void
server Bloom.Api.EnhancedImageServer
Результат void

Описание свойств

PathToCurrentAudioSegment публичное свойство

public string PathToCurrentAudioSegment
Результат string

PathToTemporaryWav публичное свойство

The file we want to record to
public string PathToTemporaryWav
Результат string