AWS API获得Alexa语音 [英] AWS API to get Alexa voice

查看:142
本文介绍了AWS API获得Alexa语音的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道是否有一个AWS API或类似的东西可以让我发送文本(或SSML),并取回Alexa的声音。

至关重要的是,我想要Alexa的语音中的输出



到目前为止,我探讨的选项是:




  • AWS Polly

    这是我的第一通电话,听起来很有希望,并且易于交互;但是可用的声音不包括Alexa的声音(我认为Alexa的GB声音是'Abbey')

    如果我不需要使用Alexa的声音,我可能会使用这个想法

  • 一个简单的Alexa技能lambda和API网关

    我的想法是基于一个简单的Alexa lambda,其意图是具有一个插槽,其中 SpeechletResponse OutputSpeech 包含广告位的值。配置为调用lambda并返回结果的AWS API Gateway。

    我没有尝试过,但是我猜想通过API Gateway返回我的客户端的结果将是 SpeechletResponse 而不是音频流。

  • 使用AVS的东西

    我'我目前正在研究这个想法,特别是 alexa-avs-sample-app javaclient 部分,但是我不知道不知道我是不是树错了树

    我创建了AVS产品,并且已经配置了 javaclient

    目前,交互是基于将麦克风中的音频流采样为音频流,然后将其发送到AVS(即好像我已经在与Echo说话一样)

    所以我可以说告诉我的技能说'hello world',它会说 hello world。
    但这并不是我想要的-我不想讲话任何事情,我想以编程方式调用API一些文本以获取语音音频流。



A


Does anyone know if there is an AWS API or similar that would allow me to send in text (or SSML), and get back the audio of Alexa 'speaking' it.
Crucially, I want the output in Alexa's 'voice'

The options I have explored so far are:

  • AWS Polly
    This was my first port of call and sounds promising, and simple to interact with; but the available voices do not include Alexa's voice (I think the GB voice for Alexa is 'Abbey')
    If I didn't need the voice to be Alexa's, I'd probably be using this idea
  • A simple Alexa skill lambda and API gateway
    My thinking is along the lines of a simple Alexa lambda with an intent that has one slot, where the SpeechletResponse has an OutputSpeech containing the value of the slot. An AWS API Gateway configured to invoke the lambda and return the result.
    I've not tried this, but I'm guessing the result through the API Gateway back to my client will be a json representation of the SpeechletResponse rather than an audio stream.
  • Something using AVS
    I'm currently hacking around with this idea, specifically the javaclient part of the alexa-avs-sample-app but I don't know if I'm barking up the wrong tree
    I've created an AVS product, and I've configured the javaclient to talk to it.
    At the moment it's interaction is based on sampling an audio stream from my mic to an audio stream, and sending that to AVS (ie. as if I'd have spoken to my Echo)
    So I could say "tell mySkill to say 'hello world'" and it will speak "hello world"
    But that's not quite what I want - I don't want to speak to anything, I want to programmatically call an API with some text to get the spoken audio stream.

A similar question has already been asked, but at the moment there are no answers, and I think I've added more detail/analysis to my particular problem.


In response to one of the comments, I'll try to describe my specific use case for wanting the Alexa voice:

When developing an Alexa skill, you construct and populate the OutputSpeech in code within your lambda function. It is not possible to hear what the spoken output will sound like until you have deployed your lambda, and either test on a real device, or use the Voice Simulator section of the Test tab of the developer portal.

The problem I am trying to solve is that of creating good sounding spoken responses for Alexa skills, without the trial and error approaches described above. Deploying and using a real device is obviously long winded. Using the Voice Simulator is better, but it is limited in that you have a very small field to operate with (not good if you have a long sentence or paragraph that you would like spoken), and adding SSML to enhance the spoken output is not a great UX and workflow.

I was looking at creating something that improved this UX and workflow, but the core requirement behind it is to hear Alexa's voice. Yes, of course I could use Polly, but if this use case is around making Alexa skills easier to write, then hearing another voice is not much use, and arguably is misleading because the way different voices pronounce different words and punctuation is different, so you might need to add SSML phonetics for some words for one voice, but not for another.

解决方案

I think you are looking for this:

On your Alexa's developer console under the "Test" tab, you'll see three tabs "Alexa Simulator","Manual JSON" and "Voice & Tone", the third one is the one which you are asking I believe, here you'll see tag and you can use ssml also:

这篇关于AWS API获得Alexa语音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆