From 419cc03133dd8ff427c47b5d6103dbccc3191d36 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Thu, 8 Sep 2022 22:08:20 +0200 Subject: [PATCH] awstranscriber: only set vocabulary filter when vocabulary is set AWS otherwise refuses to start the transcription. --- net/aws/src/aws_transcriber/imp.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/net/aws/src/aws_transcriber/imp.rs b/net/aws/src/aws_transcriber/imp.rs index 7ca7990e..aad4fc5f 100644 --- a/net/aws/src/aws_transcriber/imp.rs +++ b/net/aws/src/aws_transcriber/imp.rs @@ -945,19 +945,19 @@ impl Transcriber { if let Some(ref vocabulary_filter) = settings.vocabulary_filter { query_params .push_str(format!("&vocabulary-filter-name={}", vocabulary_filter).as_str()); - } - query_params.push_str( - format!( - "&vocabulary-filter-method={}", - match settings.vocabulary_filter_method { - AwsTranscriberVocabularyFilterMethod::Mask => "mask", - AwsTranscriberVocabularyFilterMethod::Remove => "remove", - AwsTranscriberVocabularyFilterMethod::Tag => "tag", - } - ) - .as_str(), - ); + query_params.push_str( + format!( + "&vocabulary-filter-method={}", + match settings.vocabulary_filter_method { + AwsTranscriberVocabularyFilterMethod::Mask => "mask", + AwsTranscriberVocabularyFilterMethod::Remove => "remove", + AwsTranscriberVocabularyFilterMethod::Tag => "tag", + } + ) + .as_str(), + ); + } if let Some(ref session_id) = settings.session_id { gst::debug!(CAT, obj: element, "Using session ID: {}", session_id);