
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@ask-utils/speech-script
Advanced tools
Simple skill handler routing libs.
$ npm i -S @ask-utils/speech-script
/** @jsx ssml */
import {
StandardSkillFactory
} from 'ask-sdk'
import {
ssml,
SpeechScriptJSX
} from '../dist/index'
import { LaunchRequest } from 'ask-sdk-model'
/**
* SSML component like React
**/
class LaunchRequestScript extends SpeechScriptJSX<LaunchRequest> {
speech() {
const { locale } = this.props.request
if (/^ja/.test(locale)) {
return (
<speak>こんにちは!<break time="0.5s"/>お元気ですか?</speak>
)
}
return (
<speak>
Hello! <break time="0.5s"/>How are you?
</speak>
)
}
reprompt() {
const { locale } = this.props.request
if (/^ja/.test(locale)) {
return (
<speak>
お元気ですか?<break time="0.5s"/>
<amazon-effect name="whispered">今日はいい日になるといいですね。</amazon-effect>
</speak>
)
}
return (
<speak>
How are you?<break time="0.5s"/>
<amazon-effect name="whispered">I hope you to have a good day.</amazon-effect>
</speak>
)
}
}
/**
* Use the SSML component in your RequestHandler
**/
export const handler = StandardSkillFactory.init()
.addRequestHandlers({
canHandle(handlerInput) {
return handlerInput.requestEnvelope.request.type === 'LaunchRequest'
},
handle(handlerInput) {
const Speech = new LaunchRequestScript(handlerInput)
const {
speech,
reprompt,
} = Speech.create()
return handlerInput.responseBuilder
.speak(speech)
.reprompt(reprompt)
.getResponse()
}
}).lambda()
We can pass additional properties from handler to JSX element.
/** @jsx ssml */
import {
StandardSkillFactory
} from 'ask-sdk'
import {
ssml,
SpeechScriptJSX
} from '../dist/index'
import { LaunchRequest } from 'ask-sdk-model'
/**
* SSML component like React
**/
class LaunchRequestScript extends SpeechScriptJSX<LaunchRequest, {name: string}> {
speech() {
const name = this.options ? `${this.options.name}-san` : ''
return (
<speak>
Hello {name}! <break time="0.5s"/>How are you?
</speak>
)
}
}
/**
* Use the SSML component in your RequestHandler
**/
export const handler = StandardSkillFactory.init()
.addRequestHandlers({
canHandle(handlerInput) {
return handlerInput.requestEnvelope.request.type === 'LaunchRequest'
},
handle(handlerInput) {
const Speech = new LaunchRequestScript(handlerInput, {
name: 'John'
})
return Speech.createResponse()
}
}).lambda()
FAQs
Alexa Speech script (JSX)
The npm package @ask-utils/speech-script receives a total of 5 weekly downloads. As such, @ask-utils/speech-script popularity was classified as not popular.
We found that @ask-utils/speech-script demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.