我无法弄清楚如何将NSString转换为int.我正在尝试将ASCII转换为文本,但要做到这一点,我需要将字符串转换为int.
我觉得这很奇怪,这不是在线或堆栈溢出.我确定我不是那个需要这个的在线人.
在此先感谢您的帮助.
PS如果这有帮助,这里是我用来转换为ASCII的代码:
+ (NSString *) decodeText:(NSString *)text {
NSArray * asciiCode = [text componentsSeparatedByString:@"|"];
int i = 0;
NSMutableString *decoded;
while (i < ([asciiCode count]-1) ) {
NSString *toCode = [asciiCode objectAtIndex:i];
int codeInt = toCode;
NSString *decode = [NSString stringWithFormat:@"%c", codeInt];
[decoded appendString:decode];
}
return decoded;
}
Run Code Online (Sandbox Code Playgroud) 我想在我的网站上整合亚马逊技能套件而不需要亚马逊回声装置.我想使用笔记本电脑/ PC麦克风而不是回音装置在我的网站上实现语音命令.
我已经使用过这个教程,但是我没有找到任何关于如何在我身边实现它的内容.
我也尝试在github上提供这些样本.但我认为这些还需要Amazon echo设备:https: //github.com/amzn/alexa-skills-kit-js
我使用Windows与下面给出的开发环境
我的开发环境
是否可以在没有回音设备的情况下使用Amazon Alexa Skill Kit?
speech-recognition alexa-skills-kit amazon-echo alexa-voice-service