Toggle navigation
Toggle navigation
This project
Loading...
Sign in
최지민
/
LINEBOT
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
김수민
2019-11-24 13:42:51 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
fe8ceb955244b7a02d11fb3c0d2c092bf1f5fe51
fe8ceb95
1 parent
b7d9d889
-
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
5 deletions
.idea/workspace.xml
app.js
.idea/workspace.xml
View file @
fe8ceb9
...
...
@@ -59,6 +59,8 @@
<workItem
from=
"1574342689824"
duration=
"11000"
/>
<workItem
from=
"1574396813813"
duration=
"10012000"
/>
<workItem
from=
"1574494473410"
duration=
"2577000"
/>
<workItem
from=
"1574565997693"
duration=
"30000"
/>
<workItem
from=
"1574569996051"
duration=
"559000"
/>
</task>
<servers
/>
</component>
...
...
app.js
View file @
fe8ceb9
...
...
@@ -147,11 +147,22 @@ function handleEvent(event) {
var
objBody
=
JSON
.
parse
(
response
.
body
);
result
.
text
=
objBody
.
message
.
result
.
translatedText
;
//번역된 문자 audio로 저장
let
audio_options
=
{
'Text'
:
result
.
text
,
'OutputFormat'
:
'mp3'
,
'VoiceId'
:
'Amy'
};
if
(
options
.
form
.
target
==
'ko'
){
let
audio_options
=
{
'Text'
:
result
.
text
,
'OutputFormat'
:
'mp3'
,
'VoiceId'
:
'Amy'
,
"LanguageCode"
:
'ko-KR'
};
}
else
if
(
options
.
form
.
target
==
'en'
){
let
audio_options
=
{
'Text'
:
result
.
text
,
'OutputFormat'
:
'mp3'
,
'VoiceId'
:
'Amy'
,
"LanguageCode"
:
'en-US'
};
}
Polly
.
synthesizeSpeech
(
audio_options
,
(
err
,
data
)
=>
{
console
.
log
(
"check"
);
if
(
err
)
{
...
...
Please
register
or
login
to post a comment