Skip to content

Commit

Permalink
Merge branch 'featurize-transcription-modes' into query-params
Browse files Browse the repository at this point in the history
  • Loading branch information
jcdyer committed Jul 3, 2024
2 parents 52a8645 + a59f2e4 commit bb3a301
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ reqwest = { version = "0.11.22", default-features = false, features = ["json", "
serde = { version = "1", features = ["derive"] }
serde_json = "1"
thiserror = "1"
tokio = { version = "1", features = ["full"] }
tokio = { version = "1.13.0", features = ["full"] }
tokio-tungstenite = { version = "0.20.1", features = ["rustls-tls-webpki-roots"], optional = true }
tokio-util = { version = "0.7.1", features = ["codec", "io"] }
tungstenite = { version = "0.20.1", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ mod response;
/// Make transcriptions requests using [`Deepgram::transcription`].
#[derive(Debug, Clone)]
pub struct Deepgram {
#[cfg_attr(not(feature="live"), allow(unused))]
#[cfg_attr(not(feature = "live"), allow(unused))]
api_key: String,
client: reqwest::Client,
}
Expand Down
5 changes: 0 additions & 5 deletions src/transcription/prerecorded/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ pub struct Options {
#[derive(Debug, PartialEq, Eq, Clone, Hash)]
#[non_exhaustive]
pub enum Model {

/// Recommended for readability and Deepgram's lowest word error rates.
/// Recommended for most use cases.
///
Expand Down Expand Up @@ -470,7 +469,6 @@ impl OptionsBuilder {
})
}


/// Set the Model feature.
///
/// Not all models are supported for all languages. For a list of languages and their supported models, see
Expand Down Expand Up @@ -1422,7 +1420,6 @@ impl Serialize for SerializableOptions<'_> {
}
}


impl AsRef<str> for Model {
fn as_ref(&self) -> &str {
match self {
Expand Down Expand Up @@ -1471,7 +1468,6 @@ impl AsRef<str> for Model {

impl AsRef<str> for Language {
fn as_ref(&self) -> &str {

match self {
Self::bg => "bg",
Self::ca => "ca",
Expand Down Expand Up @@ -1668,7 +1664,6 @@ mod serialize_options_tests {
check_serialization(&options, "model=enhanced-finance%3Aextra_crispy%3Anova-2-conversationalai&version=1.2.3&language=en-US&punctuate=true&profanity_filter=true&redact=pci&redact=ssn&diarize=true&ner=true&multichannel=true&alternatives=4&numerals=true&search=Rust&search=Deepgram&replace=Aaron%3AErin&keywords=Ferris&keywords=Cargo%3A-1.5&utterances=true&utt_split=0.9&tag=Tag+1");
}


#[test]
fn model() {
check_serialization(&Options::builder().model(Model::Base).build(), "model=base");
Expand Down

0 comments on commit bb3a301

Please sign in to comment.