Skip to content

Commit 879e2f0

Browse files
committed
words methods
1 parent 7261137 commit 879e2f0

File tree

2 files changed

+351
-4
lines changed

2 files changed

+351
-4
lines changed

Scripts/Services/SpeechToText/DataModels.cs

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,18 +589,20 @@ public class Corpus
589589
/// <summary>
590590
/// This data class contains information about multiple custom words.
591591
/// </summary>
592+
[fsObject]
592593
public class WordsList
593594
{
594595
/// <summary>
595596
/// Information about each word in the custom model's words resource. The array is empty if the custom model has no words.
596597
/// </summary>
597-
public WordsData words { get; set; }
598+
public WordData words { get; set; }
598599
}
599600

600601
/// <summary>
601602
/// This data class contains information about the custom word data.
602603
/// </summary>
603-
public class WordsData
604+
[fsObject]
605+
public class WordData
604606
{
605607
/// <summary>
606608
/// A custom word from the custom model. The spelling of the word is used to train the model.
@@ -623,5 +625,56 @@ public class WordsData
623625
/// </summary>
624626
public string error { get; set; }
625627
}
628+
629+
/// <summary>
630+
/// The type of words to be listed from the custom language model's words resource: all (the default) shows all words. user shows only custom words that were added or modified by the user. corpora shows only OOV that were extracted from corpora.
631+
/// </summary>
632+
public class WordType
633+
{
634+
/// <summary>
635+
/// All words.
636+
/// </summary>
637+
public const string ALL = "all";
638+
/// <summary>
639+
/// User words.
640+
/// </summary>
641+
public const string USER = "user";
642+
/// <summary>
643+
/// Corpora words.
644+
/// </summary>
645+
public const string CORPORA = "corpora";
646+
}
647+
648+
/// <summary>
649+
/// Words object for adding words to a customization.
650+
/// </summary>
651+
[fsObject]
652+
public class Words
653+
{
654+
/// <summary>
655+
/// The words to add to a customization.
656+
/// </summary>
657+
public Word[] words { get; set; }
658+
}
659+
660+
/// <summary>
661+
/// A word to add to a customization.
662+
/// </summary>
663+
[fsObject]
664+
public class Word
665+
{
666+
/// <summary>
667+
/// The word.
668+
/// </summary>
669+
public string word { get; set; }
670+
/// <summary>
671+
/// What the word sounds like.
672+
/// </summary>
673+
public string sounds_like { get; set; }
674+
/// <summary>
675+
/// How the word is displayed.
676+
/// </summary>
677+
public string display_as { get; set; }
678+
}
626679
#endregion
627680
}

0 commit comments

Comments
 (0)