Skip to content

Commit

Permalink
Merge pull request #52 from deepgram/formatting-features
Browse files Browse the repository at this point in the history
added formatting features
  • Loading branch information
briancbarrow authored Nov 14, 2022
2 parents f7efdc8 + 1259081 commit 777bbfc
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 0 deletions.
47 changes: 47 additions & 0 deletions Deepgram/Transcription/LiveTranscriptionOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,57 @@ public class LiveTranscriptionOptions

/// <summary>
/// Indicates whether to convert numbers from written format (e.g., one) to numerical format (e.g., 1).
/// Same as numbers. This option will be deprecated in the future.
/// </summary>
[JsonProperty("numerals")]
public Nullable<bool> Numerals { get; set; } = null;

/// <summary>
/// Indicates whether to convert numbers from written format (e.g., one) to numerical format (e.g., 1).
/// Same as numerals.
/// </summary>
[JsonProperty("numbers")]
public Nullable<bool> Numbers { get; set; } = null;

/// <summary>
/// Indicates whether to add spaces between spoken numbers
/// </summary>
[JsonProperty("numbers_spaces")]
public Nullable<bool> NumbersSpaces { get; set; } = null;

/// <summary>
/// Indicates whether to convert dates from written format(e.g., January first) to numerical format(e.g., 01/01).
/// </summary>
[JsonProperty("dates")]
public Nullable<bool> Dates { get; set; } = null;

/// <summary>
/// Indicates the format to use for dates.
/// Formatted string is specified using chrono strftime notation https://docs.rs/chrono/latest/chrono/format/strftime/index.html
/// </summary>
[JsonProperty("date_format")]
public string DateFormat { get; set; } = null;

/// <summary>
/// Indicates whether to convert times from written format(e.g., three oclock) to numerical format(e.g., 3:00).
/// </summary>
[JsonProperty("times")]
public Nullable<bool> Times { get; set; } = null;

/// <summary>
/// Option to format punctuated commands
/// Example: Before - “i went to the store period new paragraph then i went home”
/// After - “i went to the store. <\n> then i went home”
/// </summary>
[JsonProperty("dictation")]
public Nullable<bool> Dictation { get; set; } = null;

/// <summary>
/// Option to convert measurments to numerical format.
/// </summary>
[JsonProperty("measurements")]
public Nullable<bool> Measurements { get; set; } = null;

/// <summary>
/// Terms or phrases to search for in the submitted audio.
/// </summary>
Expand Down
47 changes: 47 additions & 0 deletions Deepgram/Transcription/PrerecordedTranscriptionOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,57 @@ public class PrerecordedTranscriptionOptions

/// <summary>
/// Indicates whether to convert numbers from written format (e.g., one) to numerical format (e.g., 1).
/// Same as numbers. This option will be deprecated in the future.
/// </summary>
[JsonProperty("numerals")]
public Nullable<bool> Numerals { get; set; } = null;

/// <summary>
/// Indicates whether to convert numbers from written format (e.g., one) to numerical format (e.g., 1).
/// Same as numerals.
/// </summary>
[JsonProperty("numbers")]
public Nullable<bool> Numbers { get; set; } = null;

/// <summary>
/// Indicates whether to add spaces between spoken numbers
/// </summary>
[JsonProperty("numbers_spaces")]
public Nullable<bool> NumbersSpaces { get; set; } = null;

/// <summary>
/// Indicates whether to convert dates from written format(e.g., January first) to numerical format(e.g., 01/01).
/// </summary>
[JsonProperty("dates")]
public Nullable<bool> Dates { get; set; } = null;

/// <summary>
/// Indicates the format to use for dates.
/// Formatted string is specified using chrono strftime notation https://docs.rs/chrono/latest/chrono/format/strftime/index.html
/// </summary>
[JsonProperty("date_format")]
public string DateFormat { get; set; } = null;

/// <summary>
/// Indicates whether to convert times from written format(e.g., three oclock) to numerical format(e.g., 3:00).
/// </summary>
[JsonProperty("times")]
public Nullable<bool> Times { get; set; } = null;

/// <summary>
/// Option to format punctuated commands
/// Example: Before - “i went to the store period new paragraph then i went home”
/// After - “i went to the store. <\n> then i went home”
/// </summary>
[JsonProperty("dictation")]
public Nullable<bool> Dictation { get; set; } = null;

/// <summary>
/// Option to convert measurments to numerical format.
/// </summary>
[JsonProperty("measurements")]
public Nullable<bool> Measurements { get; set; } = null;

/// <summary>
/// Terms or phrases to search for in the submitted audio.
/// </summary>
Expand Down

0 comments on commit 777bbfc

Please sign in to comment.