{"id":18378720,"url":"https://github.com/taimos/alexa-vui-generator","last_synced_at":"2025-04-06T22:32:23.169Z","repository":{"id":23904645,"uuid":"100140692","full_name":"taimos/alexa-vui-generator","owner":"taimos","description":"Generates JSON files describing the intents and types of an Alexa Skill","archived":false,"fork":false,"pushed_at":"2022-04-08T09:15:03.000Z","size":186,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-22T07:43:21.811Z","etag":null,"topics":["alexa-skill","alexa-skill-builder","intent"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/taimos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-12T22:25:19.000Z","updated_at":"2019-01-20T15:06:51.000Z","dependencies_parsed_at":"2022-08-07T11:00:49.140Z","dependency_job_id":null,"html_url":"https://github.com/taimos/alexa-vui-generator","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taimos%2Falexa-vui-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taimos%2Falexa-vui-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taimos%2Falexa-vui-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taimos%2Falexa-vui-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taimos","download_url":"https://codeload.github.com/taimos/alexa-vui-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247563902,"owners_count":20958971,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alexa-skill","alexa-skill-builder","intent"],"created_at":"2024-11-06T00:35:03.902Z","updated_at":"2025-04-06T22:32:22.666Z","avatar_url":"https://github.com/taimos.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Generator for Alexa Voice Interface definitions\n\n[![npm version](https://badge.fury.io/js/alexa-vui-generator.svg)](https://badge.fury.io/js/alexa-vui-generator)\n[![Build Status](https://travis-ci.com/taimos/alexa-vui-generator.svg?branch=master)](https://travis-ci.com/taimos/alexa-vui-generator)\n\n\n## Installation\n\n`npm install alexa-vui-generator`\n\n## Usage\n\n```\nconst generator = require('alexa-vui-generator');\n\ngenerator.createLanguageModel(options, locale);\n```\n\n`options` is an object which configures the generation of the language model\n\n* `processors` is an array of functions that manipulate the provided VUI model.\n* `invocation` is a string that denotes the invocation name of the skill\n* `pretty` defines if the output should be pretty printed. By default it is minified.\n* `skipOutput` can be set to `true` to skip writing the output file\n\n`locale` is the locale that is generated and denotes the file name. (models/{locale}.json). It is forwarded to the processor functions as the second argument.\n\n`outputDir` is the folder to write the VUI (defaults to './models')\n\n### Using intents.yaml\n\nYou can use the provided function `readIntentsFromYAML` as a function in `processors` that reads the intents from a file called `intents.yaml` and adds the Amazon default intents.\n\nFurthermore it expands the provided texts to allow variations in the language. See example for usage.\n\n`intents.yaml`\n```yaml\nMySuperIntent:\n  texts:\n    - (Play|Start|Open) the {channel} (channel|)\n  slots:\n    channel: ChannelName\n```\n\nThis resolves to the following intent definition:\n\n```json\n{\n  \"name\": \"MySuperIntent\",\n  \"samples\": [\n    \"play the {channel} channel\",\n    \"start the {channel} channel\",\n    \"open the {channel} channel\",\n    \"play the {channel}\",\n    \"start the {channel}\",\n    \"open the {channel}\"\n  ],\n  \"slots\": [\n    {\n      \"name\": \"channel\",\n      \"type\": \"ChannelName\",\n      \"samples\": []\n    }\n  ]\n}\n```\n\nTo support different locales you can provide an object as texts with the locales as keys instead of a string array.\n\n`intents.yaml`\n```yaml\nMySuperIntent:\n  texts:\n    'en-US':\n      - (Play|Start|Open) the {channel} (channel|)\n    'de-DE':\n      - (Spiele|Starte|Öffne) den {channel} (channel|Kanal|)\n  slots:\n    channel: ChannelName\n```\n\nTo use dialog support you can specify the slot in an expanded way:\n\n`intents.yaml`\n```yaml\nCalculateIntent:\n  texts:\n    - ja (bitte|)\n    - ausrechnen\n  slots:\n    age:\n      type: AMAZON.NUMBER\n      elicitationRequired: true\n      confirmationRequired: false\n      prompt: Wie alt bist du?\n      texts:\n        - Ich bin {age} (Jahre alt|)\n        - '{age}'\n```\n\n### Using types.yaml\n\nYou can use the provided function `readTypesFromYAML` as a function in `processors` that reads the slot types from a file called `types.yaml`.\n\n`types.yaml`\n```yaml\nChannelName:\n  rock:\n    - rock\n    - rock music\n```\n\nThis resolves to the following intent definition:\n\n```json\n{\n  \"name\": \"ChannelName\",\n  \"values\": [\n    {\n      \"id\": \"rock\",\n      \"name\": {\n        \"value\": \"rock\",\n        \"synonyms\": [\n          \"rock\",\n          \"rock music\"\n        ]\n      }\n    }\n  ]\n}\n```\n\nTo support different locales you can provide an object as values with the locales as keys instead of a string array.\n\n`types.yaml`\n```yaml\nChannelName:\n  rock:\n    'en-US':\n      - rock\n      - rock music\n    'de-DE':\n      - rock\n      - rock musik\n```\n\n### Other generator functions used as `processors`\n\n`createAudioPlayerIntents` - Creates the intents needed when using the AudioPlayer functionality.\n`createDisplayIntents` - Creates the intents needed when using the Display functionality.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaimos%2Falexa-vui-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaimos%2Falexa-vui-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaimos%2Falexa-vui-generator/lists"}