承接 tacman/amazon-alexa-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tacman/amazon-alexa-bundle

Composer 安装命令:

composer require tacman/amazon-alexa-bundle

包简介

Symfony Bundle for amazon alexa skills, forked from maxbeckers/amazon-alexa-bundle

README 文档

README

This bundle is a simlpe helper to create an Amazon Echo (Alexa) endpoint to your symfony project. You only need to add the Bundle to your project and create some handlers for the alexa requests, configured in amazon alexa backend.

Install via composer

Require the bundle via composer:

composer require maxbeckers/amazon-alexa-bundle

Enable Routing

Then add the Bundle endpoint for alexa to config/routes.yaml.

# config/routes.yaml
maxbeckers_amazon_alexa:
    path:     /alexa/ # the url, the alexa endpoint should be available 
    defaults: { _controller: MaxBeckers\AmazonAlexaBundle\Controller\AmazonAlexa::amazonRequest }

Create handlers

To add Handlers for alexa, create them as a service and tag them with maxbeckers_amazon_alexa.request_handler. How to create a handler see maxbeckers/amazon-alexa-php.

services:
    example.my_handler:
        class: Example\MyIntentHandler
        arguments:
            - '@maxbeckers_amazon_alexa.response_helper' # ResponseHelper
        tags:
            - 'maxbeckers_amazon_alexa.request_handler'

Generate ssml

For ssml use the maxbeckers_amazon_alexa.ssml_generator service to create valid ssml.

$ssmlGenerator = $this->get('maxbeckers_amazon_alexa.ssml_generator');

// add a message
$ssmlGenerator->say('Hallo World');
$ssml = $ssmlGenerator->getSsml();
// $ssml === '<speak>Hallo World</speak>'

Development

composer config repositories.tacman_alexa '{"type": "path", "url": "/home/tac/g/tacman/amazon-alexa-bundle"}' composer req tacman/amazon-alexa-bundle:*@dev

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-03-31