@@ -16,64 +16,78 @@ export default class {
16
16
let speechOpts : SpeechOptions = { platform : "amazon-alexa" } ;
17
17
speechOpts . includeSpeakTag = false ;
18
18
19
-
20
- var output : string = 'Alexa: \n' ;
21
-
22
- var speechOut : string = '' ;
19
+ var output : string = 'Speech Mardown text: \n' ;
23
20
24
- try
21
+ if ( smdText . length == 0 )
25
22
{
26
- speechOut = speech . toSSML ( smdText , speechOpts ) ;
23
+ output = 'No text selected' ;
27
24
}
28
- catch ( ex )
25
+ else
29
26
{
30
- speechOut = ex ;
31
- }
32
27
33
- output += speechOut ;
28
+ output += smdText ;
29
+ output += '\n------------------------\n' ;
30
+
31
+ var speechOut : string = '' ;
32
+
33
+ try
34
+ {
35
+ speechOut = speech . toSSML ( smdText , speechOpts ) ;
36
+ }
37
+ catch ( ex )
38
+ {
39
+ speechOut = ex ;
40
+ }
41
+
42
+ output += '\n\nAlexa: \n' ;
43
+ output += speechOut ;
44
+ output += '\n' ;
45
+
46
+
47
+ speechOpts . platform = "google-assistant" ;
48
+ try
49
+ {
50
+ speechOut = speech . toSSML ( smdText , speechOpts ) ;
51
+ }
52
+ catch ( ex )
53
+ {
54
+ speechOut = ex ;
55
+ }
56
+
57
+ output += '\n\nGoogle Assistant: \n' ;
58
+ output += speechOut ;
59
+ output += '\n' ;
60
+
61
+
62
+ speechOpts . platform = "samsung-bixby" ;
63
+ try
64
+ {
65
+ speechOut = speech . toSSML ( smdText , speechOpts ) ;
66
+ }
67
+ catch ( ex )
68
+ {
69
+ speechOut = ex ;
70
+ }
71
+
72
+ output += '\nSamsung Bixby: \n' ;
73
+ output += speechOut ;
74
+ output += '\n' ;
75
+
76
+
77
+ try
78
+ {
79
+ speechOut = speech . toSSML ( smdText ) ;
80
+ }
81
+ catch ( ex )
82
+ {
83
+ speechOut = ex ;
84
+ }
85
+
86
+ output += '\nPlain Text: \n' ;
87
+ output += speechOut ;
88
+ output += '\n' ;
34
89
35
- speechOpts . platform = "google-assistant" ;
36
- try
37
- {
38
- speechOut = speech . toSSML ( smdText , speechOpts ) ;
39
- }
40
- catch ( ex )
41
- {
42
- speechOut = ex ;
43
- }
44
-
45
- output += '\n\nGoogle Assistant: \n' ;
46
- output += speechOut ;
47
- output += '\n' ;
48
-
49
-
50
- speechOpts . platform = "samsung-bixby" ;
51
- try
52
- {
53
- speechOut = speech . toSSML ( smdText , speechOpts ) ;
54
90
}
55
- catch ( ex )
56
- {
57
- speechOut = ex ;
58
- }
59
-
60
- output += '\nSamsung Bixby: \n' ;
61
- output += speechOut ;
62
- output += '\n' ;
63
-
64
-
65
- try
66
- {
67
- speechOut = speech . toSSML ( smdText ) ;
68
- }
69
- catch ( ex )
70
- {
71
- speechOut = ex ;
72
- }
73
-
74
- output += '\nPlain Text: \n' ;
75
- output += speechOut ;
76
- output += '\n' ;
77
91
outChannel . clear ( ) ;
78
92
outChannel . append ( output ) ;
79
93
outChannel . show ( true ) ;
0 commit comments