Provides actions that are used for language models in speech-to-text systems. This action identifies speakers.
| Parameter | Description |
|---|---|
| casOut | Specifies the output table to contain the speaker IDs. For more information about specifying the casOut parameter, see the common casouttable (Form 1) parameter (Appendix A: Common Parameters). |
| maxSpeakers | Specifies the maximum number of speakers to identify in the audio. Default: 200. Range: 1–200. |
| minSpeakers | Specifies the minimum number of speakers to identify in the audio. Default: 1. Range: 1–200. |
| model | Specifies the settings to apply to the model. The modelOptions value can be one or more of the following: - **attributes**: Specifies the table that contains weights attributes of the model. - **caslib**: Specifies the caslib for the input table. - **computedOnDemand**: When set to True, creates the computed variables when the table is loaded instead of when the action begins. Default: False. - **computedVars**: Specifies the names of the computed variables to create. You must specify an expression for each variable in the computedVarsProgram parameter. - **computedVarsProgram**: Specifies an expression for each computed variable that you include in the computedVars parameter. - **dataSourceOptions**: Specifies data source options. - **importOptions**: Specifies the settings for reading a table from a data source. - **name**: Specifies the name of the input table. - **singlePass**: When set to True, does not create a transient table on the server. Default: False. - **vars**: Specifies the variables to use in the action. - **where**: Specifies an expression for subsetting the input data. - **whereTable**: Specifies an input table that contains rows to use as a WHERE filter. - **gpu**: GPU processing. - **devices**: Specifies a list of GPU devices to be used. - **model**: Specifies the table that is the identification model. (Same subparameters as 'attributes') - **weights**: Specifies the table that contains weights of the model. (Same subparameters as 'attributes') |
| scope | Identifies speakers for either each row or the entire table. Default: ROW. |
| seed | Specifies a seed for random number generation. Default: 0. Minimum value: 0. |
| table | Specifies the table that contains the audio input. The castable value can be one or more of the following: - **caslib**: Specifies the caslib for the input table. - **computedOnDemand**: When set to True, creates the computed variables when the table is loaded instead of when the action begins. Default: False. - **computedVars**: Specifies the names of the computed variables to create. You must specify an expression for each variable in the computedVarsProgram parameter. - **computedVarsProgram**: Specifies an expression for each computed variable that you include in the computedVars parameter. - **dataSourceOptions**: Specifies data source options. - **importOptions**: Specifies the settings for reading a table from a data source. - **name**: Specifies the name of the input table. - **singlePass**: When set to True, does not create a transient table on the server. Default: False. - **vars**: Specifies the variables to use in the action. - **where**: Specifies an expression for subsetting the input data. - **whereTable**: Specifies an input table that contains rows to use as a WHERE filter. |
This action requires an input table with audio data and a pre-trained model for speaker identification. The following code demonstrates how to create a sample table and load a dummy model.
| 1 | /* Sample Code to create input data - Replace with actual data loading procedures */ |
| 2 | DATA casuser.audio_input; |
| 3 | LENGTH audio_col $200; |
| 4 | INPUT audio_col$; |
| 5 | CARDS; |
| 6 | audio_file_1.wav |
| 7 | audio_file_2.wav |
| 8 | audio_file_3.wav |
| 9 | ; |
| 10 | RUN; |
| 11 | |
| 12 | /* Dummy model table creation for demonstration */ |
| 13 | DATA casuser.speaker_model; |
| 14 | LENGTH model_data $100; |
| 15 | INPUT model_data$; |
| 16 | CARDS; |
| 17 | speaker_model_data_part1 |
| 18 | speaker_model_data_part2 |
| 19 | ; |
| 20 | RUN; |
This example identifies speakers in an input audio table named 'audio_input' using a pre-trained speaker identification 'model' and stores the results in 'speaker_ids_out'.
| 1 | PROC CAS; |
| 2 | langModel.IdentifySpeakers / |
| 3 | casOut={name='speaker_ids_out', replace=TRUE}, |
| 4 | TABLE={name='audio_input'}, |
| 5 | model={name='speaker_model'} |
| 6 | ; |
| 7 | QUIT; |
This example demonstrates identifying speakers with a minimum of 2 and maximum of 5 speakers, using a specific seed for reproducibility, and leveraging GPU devices for processing. The input is from 'my_audio_lib.my_audio_table' and the model is from 'my_model_lib.my_speaker_model'.
| 1 | PROC CAS; |
| 2 | langModel.IdentifySpeakers / |
| 3 | casOut={name='detailed_speaker_output', replace=TRUE}, |
| 4 | TABLE={name='my_audio_table', caslib='my_audio_lib'}, |
| 5 | model={ |
| 6 | name='my_speaker_model', |
| 7 | caslib='my_model_lib', |
| 8 | gpu={devices={0, 1}}} |
| 9 | , |
| 10 | minSpeakers=2, |
| 11 | maxSpeakers=5, |
| 12 | seed=12345 |
| 13 | ; |
| 14 | QUIT; |