Class TranscriptionWebSocketService
Inheritance
TranscriptionWebSocketService
Assembly: Glitch9.AIDevKit.Provider.AmazonAws.dll
Syntax
public class TranscriptionWebSocketService : IDisposable
Constructors
|
Edit this page
View Source
TranscriptionWebSocketService()
Declaration
public TranscriptionWebSocketService()
Methods
|
Edit this page
View Source
AddListener(IWebSocketListener<TranscriptionServerEvent>)
Declaration
public void AddListener(IWebSocketListener<TranscriptionServerEvent> listener)
Parameters
|
Edit this page
View Source
AddStateListener(IWebSocketStateListener)
Declaration
public void AddStateListener(IWebSocketStateListener stateListener)
Parameters
|
Edit this page
View Source
Declaration
public UniTask ConfigureAsync(ConfigurationEvent config, CancellationToken cancellationToken = default)
Parameters
Returns
|
Edit this page
View Source
CreateConnectionAsync(Locale?, string, CancellationToken)
Declaration
public UniTask<IWebSocket> CreateConnectionAsync(Locale? locale = null, string region = null, CancellationToken cancellationToken = default)
Parameters
Returns
|
Edit this page
View Source
Dispose()
Declaration
|
Edit this page
View Source
Initialize(Locale, SampleRate, string, bool)
Declaration
public void Initialize(Locale locale, SampleRate sampleRate = SampleRate.Hz16000, string region = null, bool force = false)
Parameters
|
Edit this page
View Source
Declaration
public UniTask PushInputAudioBufferAsync(float[] audioBuffer, CancellationToken ct = default)
Parameters
Returns
|
Edit this page
View Source
ReconnectAsync(CancellationToken)
Declaration
public UniTask<IWebSocket> ReconnectAsync(CancellationToken cancellationToken = default)
Parameters
Returns
|
Edit this page
View Source
RemoveListener(IWebSocketListener<TranscriptionServerEvent>)
Declaration
public void RemoveListener(IWebSocketListener<TranscriptionServerEvent> listener)
Parameters
|
Edit this page
View Source
RemoveStateListener(IWebSocketStateListener)
Declaration
public void RemoveStateListener(IWebSocketStateListener stateListener)
Parameters
|
Edit this page
View Source
SetAwsRegion(string, bool)
Declaration
public void SetAwsRegion(string region, bool updateImmediately = false)
Parameters
| Type |
Name |
Description |
| string |
region |
|
| bool |
updateImmediately |
|
|
Edit this page
View Source
SetContentIdentificationType(string, bool)
Set content identification type. Example: "PII".
Declaration
public void SetContentIdentificationType(string type, bool updateImmediately = false)
Parameters
| Type |
Name |
Description |
| string |
type |
|
| bool |
updateImmediately |
|
|
Edit this page
View Source
SetContentRedactionType(string, bool)
Set content redaction type. Example: "PII".
Declaration
public void SetContentRedactionType(string type, bool updateImmediately = false)
Parameters
| Type |
Name |
Description |
| string |
type |
|
| bool |
updateImmediately |
|
|
Edit this page
View Source
SetEnableChannelIdentification(bool, bool)
Declaration
public void SetEnableChannelIdentification(bool enabled, bool updateImmediately = false)
Parameters
| Type |
Name |
Description |
| bool |
enabled |
|
| bool |
updateImmediately |
|
|
Edit this page
View Source
SetEnablePartialResultsStabilization(bool, bool)
Declaration
public void SetEnablePartialResultsStabilization(bool enabled, bool updateImmediately = false)
Parameters
| Type |
Name |
Description |
| bool |
enabled |
|
| bool |
updateImmediately |
|
|
Edit this page
View Source
SetIdentifyLanguage(bool, bool)
Declaration
public void SetIdentifyLanguage(bool enabled, bool updateImmediately = false)
Parameters
| Type |
Name |
Description |
| bool |
enabled |
|
| bool |
updateImmediately |
|
|
Edit this page
View Source
SetIdentifyMultipleLanguages(bool, bool)
Declaration
public void SetIdentifyMultipleLanguages(bool enabled, bool updateImmediately = false)
Parameters
| Type |
Name |
Description |
| bool |
enabled |
|
| bool |
updateImmediately |
|
|
Edit this page
View Source
Declaration
public void SetInputAudioLocale(Locale locale, bool updateImmediately = false)
Parameters
| Type |
Name |
Description |
| Locale |
locale |
|
| bool |
updateImmediately |
|
|
Edit this page
View Source
Declaration
public void SetInputAudioSampleRate(SampleRate sampleRate, bool updateImmediately = false)
Parameters
|
Edit this page
View Source
Declaration
public void SetInputAudioSampleRate(int sampleRate, bool updateImmediately = false)
Parameters
| Type |
Name |
Description |
| int |
sampleRate |
|
| bool |
updateImmediately |
|
|
Edit this page
View Source
SetLanguageModelName(string, bool)
Declaration
public void SetLanguageModelName(string modelName, bool updateImmediately = false)
Parameters
| Type |
Name |
Description |
| string |
modelName |
|
| bool |
updateImmediately |
|
|
Edit this page
View Source
SetLanguageOptions(IEnumerable<string>, bool)
Declaration
public void SetLanguageOptions(IEnumerable<string> languageOptions, bool updateImmediately = false)
Parameters
|
Edit this page
View Source
SetLanguageOptions(string, bool)
Set language options as a comma-separated string (for header),
or use the IEnumerable overload to build it.
Example: "en-US,es-US,fr-CA".
Declaration
public void SetLanguageOptions(string languageOptions, bool updateImmediately = false)
Parameters
| Type |
Name |
Description |
| string |
languageOptions |
|
| bool |
updateImmediately |
|
|
Edit this page
View Source
SetNumberOfChannels(int, bool)
Declaration
public void SetNumberOfChannels(int channels, bool updateImmediately = false)
Parameters
| Type |
Name |
Description |
| int |
channels |
|
| bool |
updateImmediately |
|
|
Edit this page
View Source
SetPartialResultsStability(string, bool)
Set partial results stability. Possible values (per AWS docs):
"low", "medium", "high".
Declaration
public void SetPartialResultsStability(string stability, bool updateImmediately = false)
Parameters
| Type |
Name |
Description |
| string |
stability |
|
| bool |
updateImmediately |
|
|
Edit this page
View Source
SetPiiEntityTypes(string, bool)
Set PII entity types as a comma-separated string or single token.
Example: "BANK_ACCOUNT_NUMBER,EMAIL".
Declaration
public void SetPiiEntityTypes(string entityTypes, bool updateImmediately = false)
Parameters
| Type |
Name |
Description |
| string |
entityTypes |
|
| bool |
updateImmediately |
|
|
Edit this page
View Source
SetPreferredLanguage(string, bool)
Declaration
public void SetPreferredLanguage(string language, bool updateImmediately = false)
Parameters
| Type |
Name |
Description |
| string |
language |
|
| bool |
updateImmediately |
|
|
Edit this page
View Source
SetSessionId(string, bool)
Declaration
public void SetSessionId(string sessionId, bool updateImmediately = false)
Parameters
| Type |
Name |
Description |
| string |
sessionId |
|
| bool |
updateImmediately |
|
|
Edit this page
View Source
SetShowSpeakerLabel(bool, bool)
Declaration
public void SetShowSpeakerLabel(bool enabled, bool updateImmediately = false)
Parameters
| Type |
Name |
Description |
| bool |
enabled |
|
| bool |
updateImmediately |
|
|
Edit this page
View Source
SetVocabularyFilter(string, string, bool)
Declaration
public void SetVocabularyFilter(string filterName, string method = null, bool updateImmediately = false)
Parameters
|
Edit this page
View Source
SetVocabularyFilterMethod(string, bool)
Declaration
public void SetVocabularyFilterMethod(string method, bool updateImmediately = false)
Parameters
| Type |
Name |
Description |
| string |
method |
|
| bool |
updateImmediately |
|
|
Edit this page
View Source
SetVocabularyFilterNames(IEnumerable<string>, bool)
Declaration
public void SetVocabularyFilterNames(IEnumerable<string> names, bool updateImmediately = false)
Parameters
|
Edit this page
View Source
SetVocabularyFilterNames(string, bool)
Declaration
public void SetVocabularyFilterNames(string namesCsv, bool updateImmediately = false)
Parameters
| Type |
Name |
Description |
| string |
namesCsv |
|
| bool |
updateImmediately |
|
|
Edit this page
View Source
SetVocabularyName(string, bool)
Declaration
public void SetVocabularyName(string vocabularyName, bool updateImmediately = false)
Parameters
| Type |
Name |
Description |
| string |
vocabularyName |
|
| bool |
updateImmediately |
|
|
Edit this page
View Source
SetVocabularyNames(IEnumerable<string>, bool)
Declaration
public void SetVocabularyNames(IEnumerable<string> names, bool updateImmediately = false)
Parameters
|
Edit this page
View Source
SetVocabularyNames(string, bool)
Declaration
public void SetVocabularyNames(string namesCsv, bool updateImmediately = false)
Parameters
| Type |
Name |
Description |
| string |
namesCsv |
|
| bool |
updateImmediately |
|
Implements
Extension Methods