From 483c4544a539dacfbd12b8ca2e9e12cefd1f6186 Mon Sep 17 00:00:00 2001 From: David Wilkie Date: Fri, 20 Oct 2023 14:46:23 +0700 Subject: [PATCH] WIP --- components/app/config/initializers/aws_stubs.rb | 5 +++-- components/app/spec/call_controllers/say_spec.rb | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/components/app/config/initializers/aws_stubs.rb b/components/app/config/initializers/aws_stubs.rb index d3f7b140d..4770fb77f 100644 --- a/components/app/config/initializers/aws_stubs.rb +++ b/components/app/config/initializers/aws_stubs.rb @@ -33,8 +33,9 @@ def to_h stub_responses: { describe_voices: { voices: [ - { gender: "Female", id: "Lotte", language_code: "nl-NL" }, - { gender: "Female", id: "Joanna", language_code: "en-US" } + { gender: "Female", id: "Joanna", language_code: "en-US", supported_engines: ["standard"] }, + { gender: "Female", id: "Lotte", language_code: "nl-NL", supported_engines: ["neural"] }, + { gender: "Female", id: "Vitoria", language_code: "pt-BR", supported_engines: %w[neural standard] } ] } } diff --git a/components/app/spec/call_controllers/say_spec.rb b/components/app/spec/call_controllers/say_spec.rb index 275bdd1b4..af8319457 100644 --- a/components/app/spec/call_controllers/say_spec.rb +++ b/components/app/spec/call_controllers/say_spec.rb @@ -98,14 +98,14 @@ stub_twiml_request(controller, response: <<~TWIML) - Hello World + Hello World TWIML controller.run expect(controller).to have_received(:say) do |ssml| - expect(fetch_ssml_attribute(ssml, :name)).to eq("Polly.Lotte") + expect(fetch_ssml_attribute(ssml, :name)).to eq("Polly.Lotte-Neural") expect(fetch_ssml_attribute(ssml, :lang)).to eq("nl-NL") end end @@ -163,7 +163,7 @@ controller.run expect(controller).to have_received(:say) do |ssml| - expect(fetch_ssml_attribute(ssml, :name)).to eq("Polly.Lotte") + expect(fetch_ssml_attribute(ssml, :name)).to eq("Polly.Lotte-Neural") expect(fetch_ssml_attribute(ssml, :lang)).to eq("nl-NL") end end