Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SmartBox
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
苗权威
SmartBox
Commits
4675c212
Commit
4675c212
authored
Nov 06, 2020
by
苗权威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11.06
parent
6c854b02
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
387 additions
and
304 deletions
+387
-304
workspace.xml
.idea/workspace.xml
+163
-256
OkHttp3Utils.java
...ain/java/ai/qiwu/com/tts_service/common/OkHttp3Utils.java
+75
-5
TTSConstants.java
...ain/java/ai/qiwu/com/tts_service/common/TTSConstants.java
+7
-8
UploadOneSenData.java
...ai/qiwu/com/tts_service/pojo/upload/UploadOneSenData.java
+1
-0
LieHuSchedule.java
...n/java/ai/qiwu/com/tts_service/service/LieHuSchedule.java
+3
-2
TTService.java
.../main/java/ai/qiwu/com/tts_service/service/TTService.java
+46
-9
TTServiceEdition2.java
...va/ai/qiwu/com/tts_service/service/TTServiceEdition2.java
+73
-11
ThirdPartyService.java
...qiwu/com/tts_service/service/baidu/ThirdPartyService.java
+19
-13
No files found.
.idea/workspace.xml
View file @
4675c212
...
...
@@ -6,9 +6,9 @@
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"63e156df-08bf-4b44-b5d3-f7e9200a2cef"
name=
"Default Changelist"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/co
ntroller/TTSController.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/controller/TTSController
.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/
repository/SpeakerInfoRepository.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/repository/SpeakerInfoRepository
.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/
service/Initialize.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/Initialize
.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/co
mmon/OkHttp3Utils.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/OkHttp3Utils
.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/
common/TTSConstants.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/TTSConstants
.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/
pojo/upload/UploadOneSenData.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/pojo/upload/UploadOneSenData
.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/LieHuSchedule.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/LieHuSchedule.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/TTService.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/TTService.java"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/TTServiceEdition2.java"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/TTServiceEdition2.java"
afterDir=
"false"
/>
...
...
@@ -52,54 +52,41 @@
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/controller/TTSController.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
198
"
>
<caret
line=
"
67"
column=
"55"
selection-start-line=
"67"
selection-start-column=
"55"
selection-end-line=
"67"
selection-end-column=
"55
"
/>
<state
relative-caret-position=
"
316
"
>
<caret
line=
"
289"
column=
"87"
selection-start-line=
"289"
selection-start-column=
"87"
selection-end-line=
"289"
selection-end-column=
"87
"
/>
<folding>
<element
signature=
"e#3097#3136#0"
/>
<element
signature=
"e#21356#21357#0"
expanded=
"true"
/>
<element
signature=
"e#21433#21434#0"
expanded=
"true"
/>
<element
signature=
"e#21526#21527#0"
expanded=
"true"
/>
<element
signature=
"e#21581#21582#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"
fals
e"
>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/
TTServic
e.java"
>
<file
pinned=
"false"
current-in-tab=
"
tru
e"
>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/
Initializ
e.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
6013
"
>
<caret
line=
"1
926"
column=
"18"
selection-start-line=
"1926"
selection-start-column=
"18"
selection-end-line=
"1926"
selection-end-column=
"18
"
/>
<state
relative-caret-position=
"
-6411
"
>
<caret
line=
"1
84"
column=
"69"
selection-start-line=
"184"
selection-start-column=
"50"
selection-end-line=
"184"
selection-end-column=
"69
"
/>
<folding>
<element
signature=
"e#86248#86257#0"
/>
<element
signature=
"imports"
expanded=
"true"
/>
<element
signature=
"e#16606#16607#0"
expanded=
"true"
/>
<element
signature=
"e#16648#16649#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/pojo/upload/UploadOneSenData.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"307"
>
<caret
line=
"28"
column=
"11"
selection-start-line=
"28"
selection-start-column=
"11"
selection-end-line=
"28"
selection-end-column=
"11"
/>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/repository/SpeakerInfoRepository.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"550"
>
<caret
line=
"31"
column=
"19"
selection-start-line=
"31"
selection-start-column=
"9"
selection-end-line=
"31"
selection-end-column=
"19"
/>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"true"
>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/Initialize.java"
>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/TTService.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"4
55
"
>
<caret
line=
"
552"
column=
"65"
lean-forward=
"true"
selection-start-line=
"552"
selection-start-column=
"65"
selection-end-line=
"552"
selection-end-column=
"65
"
/>
<state
relative-caret-position=
"4
67
"
>
<caret
line=
"
2081"
column=
"62"
lean-forward=
"true"
selection-start-line=
"2081"
selection-start-column=
"62"
selection-end-line=
"2081"
selection-end-column=
"62
"
/>
<folding>
<element
signature=
"imports"
expanded=
"true"
/>
<element
signature=
"e#87863#87872#0"
/>
<element
signature=
"e#108588#108622#0"
/>
</folding>
</state>
</provider>
...
...
@@ -108,17 +95,17 @@
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/LieHuSchedule.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
275
"
>
<caret
line=
"
48"
column=
"39"
selection-start-line=
"48"
selection-start-column=
"39"
selection-end-line=
"48"
selection-end-column=
"39
"
/>
<state
relative-caret-position=
"
453
"
>
<caret
line=
"
59"
column=
"16"
lean-forward=
"true"
selection-start-line=
"59"
selection-start-column=
"16"
selection-end-line=
"59"
selection-end-column=
"16
"
/>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/co
ntroller/DeployController
.java"
>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/co
mmon/TTSConstants
.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"5
13
"
>
<caret
line=
"
659"
column=
"29"
selection-start-line=
"659"
selection-start-column=
"29"
selection-end-line=
"659"
selection-end-column=
"29
"
/>
<state
relative-caret-position=
"5
99
"
>
<caret
line=
"
51"
column=
"5"
selection-start-line=
"51"
selection-start-column=
"5"
selection-end-line=
"51"
selection-end-column=
"5
"
/>
</state>
</provider>
</entry>
...
...
@@ -126,32 +113,28 @@
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/TTServiceEdition2.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
206
7"
>
<caret
line=
"
894"
column=
"9"
selection-start-line=
"894"
selection-start-column=
"9"
selection-end-line=
"894"
selection-end-column=
"9
"
/>
<state
relative-caret-position=
"
44
7"
>
<caret
line=
"
582"
column=
"45"
selection-start-line=
"582"
selection-start-column=
"45"
selection-end-line=
"582"
selection-end-column=
"45
"
/>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/
service/baidu/ThirdPartyService
.java"
>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/
common/OkHttp3Utils
.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"337"
>
<caret
line=
"240"
column=
"41"
selection-start-line=
"240"
selection-start-column=
"41"
selection-end-line=
"240"
selection-end-column=
"41"
/>
<folding>
<element
signature=
"imports"
expanded=
"true"
/>
</folding>
<state
relative-caret-position=
"466"
>
<caret
line=
"106"
column=
"70"
selection-start-line=
"106"
selection-start-column=
"70"
selection-end-line=
"106"
selection-end-column=
"70"
/>
</state>
</provider>
</entry>
</file>
<file
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"
jar://$PROJECT_DIR$/../../../../java/jdk1.8.0_211/src.zip!/java/util/concurrent/Semaphor
e.java"
>
<entry
file=
"
file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/baidu/ThirdPartyServic
e.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
301
"
>
<caret
line=
"
406"
column=
"19"
selection-start-line=
"406"
selection-start-column=
"19"
selection-end-line=
"406"
selection-end-column=
"19
"
/>
<state
relative-caret-position=
"
189
"
>
<caret
line=
"
972"
column=
"102"
selection-start-line=
"972"
selection-start-column=
"102"
selection-end-line=
"972"
selection-end-column=
"102
"
/>
<folding>
<element
signature=
"e#13169#13170#0"
expanded=
"true"
/>
<element
signature=
"e#13228#13229#0"
expanded=
"true"
/>
<element
signature=
"imports"
expanded=
"true"
/>
</folding>
</state>
</provider>
...
...
@@ -169,14 +152,6 @@
</component>
<component
name=
"FindInProjectRecents"
>
<findStrings>
<find>
name
</find>
<find>
sliceRequestThird
</find>
<find>
PERSON_INFO_ONLINE
</find>
<find>
cutedPaths
</find>
<find>
substring
</find>
<find>
tecentAITTS
</find>
<find>
44
</find>
<find>
text
</find>
<find>
keySet
</find>
<find>
slices
</find>
<find>
slice.length
</find>
...
...
@@ -186,8 +161,6 @@
<find>
nls
</find>
<find>
token
</find>
<find>
AUDIO_DIR
</find>
<find>
successUpLoadFileIds
</find>
<find>
record_callback_url
</find>
<find>
sox
</find>
<find>
api/upload
</find>
<find>
/api/upload/record/one_sen
</find>
...
...
@@ -198,7 +171,17 @@
<find>
THIRD_PARTY_WITH_ITS_PER
</find>
<find>
speakerInfoRepository
</find>
<find>
tryAcquire
</find>
<find>
tid
</find>
<find>
delCacheCallbackUrl
</find>
<find>
requestTemplate
</find>
<find>
codeWithData
</find>
<find>
headers
</find>
<find>
request
</find>
<find>
data
</find>
<find>
record_callback_url
</find>
<find>
usDir
</find>
<find>
successUpLoadFileIds
</find>
<find>
noeTextSameId
</find>
</findStrings>
<replaceStrings>
<replace>
!CollectionUtils.isEmpty
</replace>
...
...
@@ -217,7 +200,6 @@
<component
name=
"IdeDocumentHistory"
>
<option
name=
"CHANGED_PATHS"
>
<list>
<option
value=
"$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/service/LoadBySMS.java"
/>
<option
value=
"$PROJECT_DIR$/xiaoduhome/src/main/java/ai/qiwu/com/xiaoduhome/controller/Oauth2Controller.java"
/>
<option
value=
"$PROJECT_DIR$/xiaoduhome/src/main/resources/static/dpl2/collectHistory.json"
/>
<option
value=
"$PROJECT_DIR$/xiaoduhome/src/main/resources/static/dpl2/productDetail.json"
/>
...
...
@@ -250,24 +232,25 @@
<option
value=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/pojo/third/XunFeiRequestDataCommon.java"
/>
<option
value=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/pojo/third/XunFeiRequestDataDatum.java"
/>
<option
value=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/pojo/third/XunFeiAudioRequest.java"
/>
<option
value=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/OkHttp3Utils.java"
/>
<option
value=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/pojo/third/XunFeiResponseData.java"
/>
<option
value=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/pojo/third/XunFeiData.java"
/>
<option
value=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/pojo/third/XunFeiRequestDataBusiness.java"
/>
<option
value=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/TTSUtils.java"
/>
<option
value=
"$PROJECT_DIR$/tts_service/pom.xml"
/>
<option
value=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/TTSConstants.java"
/>
<option
value=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/CallPython.java"
/>
<option
value=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/pojo/upload/AudioConfigInfo.java"
/>
<option
value=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/pojo/third/ChangeRecordVolume.java"
/>
<option
value=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/pcm/Pcm2Wav.java"
/>
<option
value=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/repository/SpeakerInfoRepository.java"
/>
<option
value=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/controller/TTSController.java"
/>
<option
value=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/Initialize.java"
/>
<option
value=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/pojo/upload/UploadOneSenData.java"
/>
<option
value=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/TTServiceEdition2.java"
/>
<option
value=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/baidu/ThirdPartyService.java"
/>
<option
value=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/OkHttp3Utils.java"
/>
<option
value=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/TTSConstants.java"
/>
<option
value=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/LieHuSchedule.java"
/>
<option
value=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/
controller/TTSController
.java"
/>
<option
value=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/
service/baidu/ThirdPartyService
.java"
/>
<option
value=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/TTService.java"
/>
<option
value=
"$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/Initialize.java"
/>
</list>
</option>
</component>
...
...
@@ -299,10 +282,10 @@
<option
name=
"skipTests"
value=
"true"
/>
</component>
<component
name=
"ProjectFrameBounds"
>
<option
name=
"x"
value=
"3
25
"
/>
<option
name=
"y"
value=
"5
2
"
/>
<option
name=
"width"
value=
"1
216
"
/>
<option
name=
"height"
value=
"100
4
"
/>
<option
name=
"x"
value=
"3
03
"
/>
<option
name=
"y"
value=
"5
9
"
/>
<option
name=
"width"
value=
"1
478
"
/>
<option
name=
"height"
value=
"100
2
"
/>
</component>
<component
name=
"ProjectLevelVcsManager"
settingsEditedManually=
"true"
>
<ConfirmationsSetting
value=
"1"
id=
"Add"
/>
...
...
@@ -311,85 +294,7 @@
<navigator
proportions=
""
version=
"1"
>
<foldersAlwaysOnTop
value=
"true"
/>
</navigator>
<panes>
<pane
id=
"PackagesPane"
/>
<pane
id=
"ProjectPane"
>
<subPane>
<expand>
<path>
<item
name=
"smartbox"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"smartbox"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
<path>
<item
name=
"smartbox"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"smartbox"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"tts_service"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
<path>
<item
name=
"smartbox"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"smartbox"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"tts_service"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"src"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
<path>
<item
name=
"smartbox"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"smartbox"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"tts_service"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"src"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"main"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
<path>
<item
name=
"smartbox"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"smartbox"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"tts_service"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"src"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"main"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"java"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
<path>
<item
name=
"smartbox"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"smartbox"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"tts_service"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"src"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"main"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"java"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"tts_service"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
<path>
<item
name=
"smartbox"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"smartbox"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"tts_service"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"src"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"main"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"java"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"tts_service"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"pojo"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
<path>
<item
name=
"smartbox"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"smartbox"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"tts_service"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"src"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"main"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"java"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"tts_service"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"pojo"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"third"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
<path>
<item
name=
"smartbox"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"smartbox"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"tts_service"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"src"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"main"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"resources"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
</expand>
<select
/>
</subPane>
</pane>
<pane
id=
"Scope"
/>
</panes>
<panes
/>
</component>
<component
name=
"PropertiesComponent"
>
<property
name=
"DefaultHtmlFileTemplate"
value=
"HTML File"
/>
...
...
@@ -399,7 +304,7 @@
<property
name=
"RequestMappingsPanelWidth1"
value=
"75"
/>
<property
name=
"WebServerToolWindowFactoryState"
value=
"false"
/>
<property
name=
"aspect.path.notification.shown"
value=
"true"
/>
<property
name=
"com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp"
value=
"1604
579634565
"
/>
<property
name=
"com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp"
value=
"1604
674064122
"
/>
<property
name=
"last_opened_file_path"
value=
"$PROJECT_DIR$/tts_service/src/main/resources/lib/Msc.jar!/"
/>
<property
name=
"nodejs_package_manager_path"
value=
"npm"
/>
<property
name=
"project.structure.last.edited"
value=
"Modules"
/>
...
...
@@ -435,7 +340,7 @@
</list>
</option>
</component>
<component
name=
"RunManager"
selected=
"Application.T
TServiceEdition2
"
>
<component
name=
"RunManager"
selected=
"Application.T
hirdPartyService
"
>
<configuration
name=
"Pcm2Wav"
type=
"Application"
factoryName=
"Application"
temporary=
"true"
nameIsGenerated=
"true"
>
<option
name=
"MAIN_CLASS_NAME"
value=
"ai.qiwu.com.tts_service.common.pcm.Pcm2Wav"
/>
<module
name=
"tts_service"
/>
...
...
@@ -558,9 +463,9 @@
</list>
<recent_temporary>
<list>
<item
itemvalue=
"Application.ThirdPartyService"
/>
<item
itemvalue=
"Application.TTServiceEdition2"
/>
<item
itemvalue=
"Application.Pcm2Wav"
/>
<item
itemvalue=
"Application.ThirdPartyService"
/>
<item
itemvalue=
"Application.TTService"
/>
<item
itemvalue=
"Application.TTSController"
/>
</list>
...
...
@@ -794,29 +699,31 @@
<workItem
from=
"1604281641386"
duration=
"26528000"
/>
<workItem
from=
"1604368728384"
duration=
"33853000"
/>
<workItem
from=
"1604453789494"
duration=
"19827000"
/>
<workItem
from=
"1604547597945"
duration=
"21758000"
/>
<workItem
from=
"1604547597945"
duration=
"24359000"
/>
<workItem
from=
"1604627277513"
duration=
"16188000"
/>
<workItem
from=
"1604664898837"
duration=
"7584000"
/>
</task>
<servers
/>
</component>
<component
name=
"TimeTrackingManager"
>
<option
name=
"totallyTimeSpent"
value=
"1
099245
000"
/>
<option
name=
"totallyTimeSpent"
value=
"1
125618
000"
/>
</component>
<component
name=
"ToolWindowManager"
>
<frame
x=
"3
25"
y=
"52"
width=
"1216"
height=
"1004
"
extended-state=
"0"
/>
<frame
x=
"3
03"
y=
"59"
width=
"1478"
height=
"1002
"
extended-state=
"0"
/>
<editor
active=
"true"
/>
<layout>
<window_info
id=
"Designer"
order=
"0"
/>
<window_info
id=
"Web"
order=
"1"
sideWeight=
"0.50236404"
side_tool=
"true"
weight=
"0.2847633"
/>
<window_info
id=
"UI Designer"
order=
"2"
/>
<window_info
id=
"Favorites"
order=
"3"
sideWeight=
"0.501182"
side_tool=
"true"
weight=
"0.17381656"
/>
<window_info
id=
"Structure"
order=
"4"
sideWeight=
"0.49763593"
weight=
"0.22
246818
"
/>
<window_info
id=
"Structure"
order=
"4"
sideWeight=
"0.49763593"
weight=
"0.22
097902
"
/>
<window_info
id=
"Image Layers"
order=
"5"
/>
<window_info
id=
"Capture Tool"
order=
"6"
/>
<window_info
content_ui=
"combo"
id=
"Project"
order=
"7"
sideWeight=
"0.49881798"
weight=
"0.22966242"
/>
<window_info
id=
"Alibaba Cloud Explorer"
order=
"8"
weight=
"0.32988167"
/>
<window_info
anchor=
"bottom"
id=
"Message"
order=
"0"
/>
<window_info
anchor=
"bottom"
id=
"Find"
order=
"1"
weight=
"0.
3404941
"
/>
<window_info
anchor=
"bottom"
id=
"Run"
order=
"2"
weight=
"0.
43360752
"
/>
<window_info
anchor=
"bottom"
id=
"Find"
order=
"1"
weight=
"0.
2909305
"
/>
<window_info
anchor=
"bottom"
id=
"Run"
order=
"2"
weight=
"0.
39104828
"
/>
<window_info
anchor=
"bottom"
id=
"Debug"
order=
"3"
weight=
"0.4"
/>
<window_info
anchor=
"bottom"
id=
"Cvs"
order=
"4"
weight=
"0.25"
/>
<window_info
anchor=
"bottom"
id=
"Inspection"
order=
"5"
weight=
"0.4"
/>
...
...
@@ -824,7 +731,7 @@
<window_info
anchor=
"bottom"
id=
"Version Control"
order=
"7"
/>
<window_info
anchor=
"bottom"
id=
"Run Dashboard"
order=
"8"
weight=
"0.32876712"
/>
<window_info
anchor=
"bottom"
id=
"Spring"
order=
"9"
/>
<window_info
anchor=
"bottom"
id=
"Messages"
order=
"10"
weight=
"0.48
335123
"
/>
<window_info
anchor=
"bottom"
id=
"Messages"
order=
"10"
weight=
"0.48
29211
"
/>
<window_info
anchor=
"bottom"
id=
"Terminal"
order=
"11"
weight=
"0.5957697"
/>
<window_info
anchor=
"bottom"
id=
"Event Log"
order=
"12"
side_tool=
"true"
/>
<window_info
anchor=
"bottom"
id=
"Java Enterprise"
order=
"13"
weight=
"0.32941177"
/>
...
...
@@ -836,7 +743,7 @@
<window_info
anchor=
"right"
content_ui=
"combo"
id=
"Hierarchy"
order=
"2"
weight=
"0.25"
/>
<window_info
anchor=
"right"
id=
"Palette"
order=
"3"
/>
<window_info
anchor=
"right"
id=
"Database"
order=
"4"
weight=
"0.329142"
/>
<window_info
anchor=
"right"
id=
"Maven"
order=
"5"
weight=
"0.
6061644
"
/>
<window_info
anchor=
"right"
id=
"Maven"
order=
"5"
weight=
"0.
35734266
"
/>
<window_info
anchor=
"right"
id=
"Bean Validation"
order=
"6"
weight=
"0.329142"
/>
<window_info
anchor=
"right"
id=
"Palette	"
order=
"7"
/>
<window_info
anchor=
"right"
id=
"Maven Projects"
order=
"8"
weight=
"0.32991362"
/>
...
...
@@ -893,57 +800,6 @@
<option
name=
"version"
value=
"1"
/>
</component>
<component
name=
"editorHistoryManager"
>
<entry
file=
"jar://$PROJECT_DIR$/../../../../maven/myRepository/com/squareup/okhttp3/okhttp/4.0.0/okhttp-4.0.0.jar!/okhttp3/OkHttpClient.class"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"274"
>
<caret
line=
"108"
column=
"20"
selection-start-line=
"108"
selection-start-column=
"20"
selection-end-line=
"108"
selection-end-column=
"20"
/>
</state>
</provider>
</entry>
<entry
file=
"jar://$PROJECT_DIR$/../../../../maven/myRepository/com/squareup/okhttp3/okhttp/4.0.0/okhttp-4.0.0-sources.jar!/okhttp3/OkHttpClient.kt"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"274"
>
<caret
line=
"237"
column=
"27"
selection-start-line=
"237"
selection-start-column=
"15"
selection-end-line=
"237"
selection-end-column=
"27"
/>
</state>
</provider>
</entry>
<entry
file=
"jar://$PROJECT_DIR$/../../../../maven/myRepository/com/squareup/okhttp3/okhttp/4.0.0/okhttp-4.0.0-sources.jar!/okhttp3/WebSocketListener.kt"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"450"
>
<caret
line=
"45"
column=
"11"
selection-start-line=
"45"
selection-start-column=
"11"
selection-end-line=
"45"
selection-end-column=
"11"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/pojo/third/XunFeiData.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"396"
>
<caret
line=
"18"
column=
"32"
selection-start-line=
"18"
selection-start-column=
"32"
selection-end-line=
"18"
selection-end-column=
"32"
/>
<folding>
<element
signature=
"imports"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/pojo/third/XunFeiResponseData.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"418"
>
<caret
line=
"19"
column=
"17"
selection-start-line=
"19"
selection-start-column=
"17"
selection-end-line=
"19"
selection-end-column=
"17"
/>
<folding>
<element
signature=
"imports"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/pojo/third/XunFeiRequestDataBusiness.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"308"
>
<caret
line=
"14"
column=
"41"
selection-start-line=
"14"
selection-start-column=
"41"
selection-end-line=
"14"
selection-end-column=
"41"
/>
<folding>
<element
signature=
"imports"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/pojo/third/XunFeiAudioRequest.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"308"
>
...
...
@@ -1108,13 +964,6 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/OkHttp3Utils.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"-565"
>
<caret
line=
"42"
column=
"31"
lean-forward=
"true"
selection-start-line=
"42"
selection-start-column=
"31"
selection-end-line=
"42"
selection-end-column=
"31"
/>
</state>
</provider>
</entry>
<entry
file=
"jar://$PROJECT_DIR$/../../../../maven/myRepository/com/alibaba/nls/nls-sdk-common/2.1.9/nls-sdk-common-2.1.9-sources.jar!/com/alibaba/nls/client/AccessToken.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"464"
>
...
...
@@ -1165,20 +1014,6 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/TTSConstants.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"469"
>
<caret
line=
"62"
column=
"22"
selection-start-line=
"62"
selection-start-column=
"15"
selection-end-line=
"62"
selection-end-column=
"22"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/TTSUtils.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"2158"
>
<caret
line=
"670"
column=
"41"
selection-start-line=
"670"
selection-start-column=
"41"
selection-end-line=
"670"
selection-end-column=
"41"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/pojo/upload/AudioConfigInfo.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"286"
>
...
...
@@ -1238,6 +1073,13 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/pojo/upload/UploadOneSenData.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"264"
>
<caret
line=
"16"
column=
"13"
selection-start-line=
"16"
selection-start-column=
"13"
selection-end-line=
"16"
selection-end-column=
"13"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/repository/SpeakerInfoRepository.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"550"
>
...
...
@@ -1245,6 +1087,38 @@
</state>
</provider>
</entry>
<entry
file=
"jar://$PROJECT_DIR$/../../../../maven/myRepository/io/netty/netty-codec-http/4.1.49.Final/netty-codec-http-4.1.49.Final.jar!/io/netty/handler/codec/http/HttpResponseStatus.class"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"256"
>
<caret
line=
"64"
column=
"43"
selection-start-line=
"64"
selection-start-column=
"43"
selection-end-line=
"64"
selection-end-column=
"43"
/>
</state>
</provider>
</entry>
<entry
file=
"jar://$PROJECT_DIR$/../../../../maven/myRepository/com/squareup/okio/okio/2.2.2/okio-2.2.2.jar!/okio/Okio.class"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"270"
>
<caret
line=
"15"
column=
"49"
selection-start-line=
"15"
selection-start-column=
"49"
selection-end-line=
"15"
selection-end-column=
"49"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/pojo/ResponseCodeWithData.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"440"
>
<caret
line=
"22"
column=
"11"
selection-start-line=
"22"
selection-start-column=
"11"
selection-end-line=
"22"
selection-end-column=
"11"
/>
<folding>
<element
signature=
"e#423#424#0"
expanded=
"true"
/>
<element
signature=
"e#455#456#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/ApachHttpUtils.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"-3362"
>
<caret
line=
"531"
column=
"28"
selection-start-line=
"531"
selection-start-column=
"28"
selection-end-line=
"531"
selection-end-column=
"28"
/>
</state>
</provider>
</entry>
<entry
file=
"jar://$PROJECT_DIR$/../../../../java/jdk1.8.0_211/src.zip!/java/util/concurrent/Semaphore.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"301"
>
...
...
@@ -1256,47 +1130,43 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/
service/TTServiceEdition2
.java"
>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/
common/TTSUtils
.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"2
067
"
>
<caret
line=
"
894"
column=
"9"
selection-start-line=
"894"
selection-start-column=
"9"
selection-end-line=
"894"
selection-end-column=
"9
"
/>
<state
relative-caret-position=
"2
706
"
>
<caret
line=
"
159"
column=
"5"
selection-start-line=
"159"
selection-start-column=
"5"
selection-end-line=
"159"
selection-end-column=
"5
"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/
service/baidu/ThirdPartyService
.java"
>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/
pojo/TTSRequest
.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"337"
>
<caret
line=
"240"
column=
"41"
selection-start-line=
"240"
selection-start-column=
"41"
selection-end-line=
"240"
selection-end-column=
"41"
/>
<folding>
<element
signature=
"imports"
expanded=
"true"
/>
</folding>
<state
relative-caret-position=
"220"
>
<caret
line=
"11"
column=
"9"
lean-forward=
"true"
selection-start-line=
"11"
selection-start-column=
"9"
selection-end-line=
"11"
selection-end-column=
"9"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/
pojo/upload/UploadOneSenData
.java"
>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/
common/TTSConstants
.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
307
"
>
<caret
line=
"
28"
column=
"11"
selection-start-line=
"28"
selection-start-column=
"11"
selection-end-line=
"28"
selection-end-column=
"11
"
/>
<state
relative-caret-position=
"
599
"
>
<caret
line=
"
51"
column=
"5"
selection-start-line=
"51"
selection-start-column=
"5"
selection-end-line=
"51"
selection-end-column=
"5
"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/
service/TTServic
e.java"
>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/
pojo/upload/UploadCallbackRespons
e.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"6013"
>
<caret
line=
"1926"
column=
"18"
selection-start-line=
"1926"
selection-start-column=
"18"
selection-end-line=
"1926"
selection-end-column=
"18"
/>
<folding>
<element
signature=
"e#86248#86257#0"
/>
</folding>
<state
relative-caret-position=
"264"
>
<caret
line=
"14"
column=
"20"
selection-start-line=
"14"
selection-start-column=
"20"
selection-end-line=
"14"
selection-end-column=
"20"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/controller/TTSController.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
198
"
>
<caret
line=
"
67"
column=
"55"
selection-start-line=
"67"
selection-start-column=
"55"
selection-end-line=
"67"
selection-end-column=
"55
"
/>
<state
relative-caret-position=
"
316
"
>
<caret
line=
"
289"
column=
"87"
selection-start-line=
"289"
selection-start-column=
"87"
selection-end-line=
"289"
selection-end-column=
"87
"
/>
<folding>
<element
signature=
"e#3097#3136#0"
/>
<element
signature=
"e#21356#21357#0"
expanded=
"true"
/>
<element
signature=
"e#21433#21434#0"
expanded=
"true"
/>
<element
signature=
"e#21526#21527#0"
expanded=
"true"
/>
<element
signature=
"e#21581#21582#0"
expanded=
"true"
/>
</folding>
</state>
...
...
@@ -1304,17 +1174,54 @@
</entry>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/LieHuSchedule.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"275"
>
<caret
line=
"48"
column=
"39"
selection-start-line=
"48"
selection-start-column=
"39"
selection-end-line=
"48"
selection-end-column=
"39"
/>
<state
relative-caret-position=
"453"
>
<caret
line=
"59"
column=
"16"
lean-forward=
"true"
selection-start-line=
"59"
selection-start-column=
"16"
selection-end-line=
"59"
selection-end-column=
"16"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/baidu/ThirdPartyService.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"189"
>
<caret
line=
"972"
column=
"102"
selection-start-line=
"972"
selection-start-column=
"102"
selection-end-line=
"972"
selection-end-column=
"102"
/>
<folding>
<element
signature=
"imports"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/common/OkHttp3Utils.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"466"
>
<caret
line=
"106"
column=
"70"
selection-start-line=
"106"
selection-start-column=
"70"
selection-end-line=
"106"
selection-end-column=
"70"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/TTServiceEdition2.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"447"
>
<caret
line=
"582"
column=
"45"
selection-start-line=
"582"
selection-start-column=
"45"
selection-end-line=
"582"
selection-end-column=
"45"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/TTService.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"467"
>
<caret
line=
"2081"
column=
"62"
lean-forward=
"true"
selection-start-line=
"2081"
selection-start-column=
"62"
selection-end-line=
"2081"
selection-end-column=
"62"
/>
<folding>
<element
signature=
"e#87863#87872#0"
/>
<element
signature=
"e#108588#108622#0"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/tts_service/src/main/java/ai/qiwu/com/tts_service/service/Initialize.java"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
455
"
>
<caret
line=
"
552"
column=
"65"
lean-forward=
"true"
selection-start-line=
"552"
selection-start-column=
"65"
selection-end-line=
"552"
selection-end-column=
"65
"
/>
<state
relative-caret-position=
"
-6411
"
>
<caret
line=
"
184"
column=
"69"
selection-start-line=
"184"
selection-start-column=
"50"
selection-end-line=
"184"
selection-end-column=
"69
"
/>
<folding>
<element
signature=
"imports"
expanded=
"true"
/>
<element
signature=
"e#16606#16607#0"
expanded=
"true"
/>
<element
signature=
"e#16648#16649#0"
expanded=
"true"
/>
</folding>
</state>
</provider>
...
...
tts_service/src/main/java/ai/qiwu/com/tts_service/common/OkHttp3Utils.java
View file @
4675c212
...
...
@@ -9,9 +9,13 @@ import org.apache.commons.lang3.exception.ExceptionUtils;
import
org.jetbrains.annotations.NotNull
;
import
org.springframework.util.CollectionUtils
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.File
;
import
java.io.IOException
;
import
java.net.SocketTimeoutException
;
import
java.nio.file.Files
;
import
java.nio.file.Paths
;
import
java.nio.file.StandardOpenOption
;
import
java.util.HashMap
;
import
java.util.Iterator
;
import
java.util.Map
;
...
...
@@ -35,14 +39,80 @@ public class OkHttp3Utils {
.
build
();
/**
* 客户端,超时时间设为1
0
s
* 客户端,超时时间设为1
5
s
*/
public
static
final
OkHttpClient
ShortTimeoutClient
=
new
OkHttpClient
.
Builder
()
.
connectTimeout
(
1
0
,
TimeUnit
.
SECONDS
)
.
readTimeout
(
1
0
,
TimeUnit
.
SECONDS
)
.
writeTimeout
(
1
0
,
TimeUnit
.
SECONDS
)
.
connectTimeout
(
1
5
,
TimeUnit
.
SECONDS
)
.
readTimeout
(
1
5
,
TimeUnit
.
SECONDS
)
.
writeTimeout
(
1
5
,
TimeUnit
.
SECONDS
)
.
build
();
public
static
int
postTTSEdition2
(
String
url
,
Map
<
String
,
String
>
headers
,
String
requestJsonStr
,
String
path
,
boolean
longTime
)
{
OkHttpClient
timeoutClient
;
if
(
longTime
)
{
timeoutClient
=
client
;
}
else
{
timeoutClient
=
ShortTimeoutClient
;
}
try
{
Request
.
Builder
builder
=
new
Request
.
Builder
();
Request
request
=
builder
.
url
(
url
).
build
();
Headers
.
Builder
headBuilder
=
request
.
headers
().
newBuilder
();
Iterator
<
Map
.
Entry
<
String
,
String
>>
headIterator
=
headers
.
entrySet
().
iterator
();
headIterator
.
forEachRemaining
(
e
->
headBuilder
.
add
(
e
.
getKey
(),
e
.
getValue
()));
builder
.
headers
(
headBuilder
.
build
()).
post
(
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
requestJsonStr
));
Response
response
=
timeoutClient
.
newCall
(
builder
.
build
()).
execute
();
try
(
ResponseBody
body
=
response
.
body
()){
int
code
=
response
.
code
();
if
(
code
==
HttpServletResponse
.
SC_OK
)
{
try
(
BufferedSink
sink
=
Okio
.
buffer
(
Okio
.
sink
(
new
File
(
path
)))){
sink
.
writeAll
(
Objects
.
requireNonNull
(
body
).
source
());
}
}
return
code
;
}
catch
(
SocketTimeoutException
e
)
{
log
.
error
(
"捕获到SocketTimeoutException:{}"
,
e
.
toString
());
client
.
dispatcher
().
cancelAll
();
client
.
connectionPool
().
evictAll
();
}
}
catch
(
Exception
e
)
{
log
.
error
(
"postTTSEdition2 error:{}, path:{}"
,
e
,
path
);
}
return
0
;
}
public
static
String
getTTSeDITION2
(
String
url
,
Map
<
String
,
String
>
params
,
Map
<
String
,
String
>
header
)
throws
IOException
{
Request
.
Builder
builder
=
new
Request
.
Builder
();
Request
request
=
builder
.
url
(
url
).
build
();
HttpUrl
.
Builder
urlBuild
=
request
.
url
().
newBuilder
();
Headers
.
Builder
headerBuilder
=
request
.
headers
().
newBuilder
();
Iterator
<
Map
.
Entry
<
String
,
String
>>
headIterator
=
header
.
entrySet
().
iterator
();
headIterator
.
forEachRemaining
(
e
->
headerBuilder
.
add
(
e
.
getKey
(),
e
.
getValue
()));
Iterator
<
Map
.
Entry
<
String
,
String
>>
paramsIterator
=
params
.
entrySet
().
iterator
();
paramsIterator
.
forEachRemaining
(
e
->
urlBuild
.
addQueryParameter
(
e
.
getKey
(),
e
.
getValue
()));
builder
.
url
(
urlBuild
.
build
()).
headers
(
headerBuilder
.
build
());
Response
response
=
client
.
newCall
(
builder
.
build
()).
execute
();
try
(
ResponseBody
body
=
response
.
body
()){
return
body
.
string
();
}
catch
(
SocketTimeoutException
e
)
{
log
.
error
(
"getTTSeDITION2 捕获到SocketTimeoutException:{}"
,
e
);
client
.
dispatcher
().
cancelAll
();
client
.
connectionPool
().
evictAll
();
}
return
null
;
}
// ================================================
/**
* Get请求
* @param url 请求地址
...
...
@@ -252,7 +322,7 @@ public class OkHttp3Utils {
headIterator
.
forEachRemaining
(
e
->
headBuilder
.
add
(
e
.
getKey
(),
e
.
getValue
()));
builder
.
headers
(
headBuilder
.
build
()).
post
(
RequestBody
.
create
(
MediaType
.
parse
(
"application/json; charset=utf-8"
),
requestJsonStr
));
ResponseCodeWithData
codeWithData
=
null
;
ResponseCodeWithData
codeWithData
;
Response
response
=
timeoutClient
.
newCall
(
builder
.
build
()).
execute
();
try
(
ResponseBody
body
=
response
.
body
()){
//log.info("doPostTimeout请求返回:{}", response.code());
...
...
tts_service/src/main/java/ai/qiwu/com/tts_service/common/TTSConstants.java
View file @
4675c212
...
...
@@ -23,11 +23,8 @@ public interface TTSConstants {
String
TTS_REMOTE_LOCALHOST
=
"localhost"
;
interface
BAI_DU
{
// String APP_ID = "16998411";
String
APP_ID
=
"16424686"
;
// String API_KEY = "bHlKRYe9d5o7Ad2z2D5aGiVw";
String
API_KEY
=
"YzZhZlb9lDnj8W4Z9GpsFQFo"
;
// String SECRET_KEY = "f5bGP0PapVqSdl8gAOKGawHGlsSnHulB";
String
SECRET_KEY
=
"Era6sREv5lgnOTpbcChmpruLZGY6C6Q9"
;
}
...
...
@@ -42,8 +39,10 @@ public interface TTSConstants {
}
interface
TENCENT_AUDIO_ID
{
String
APP_ID
=
"2159149523"
;
String
App_Key_WITH_PREFIX
=
"&app_key=lqpqxEo6p2xQSILQ"
;
// String APP_ID = "2159149523";
// String App_Key_WITH_PREFIX = "&app_key=lqpqxEo6p2xQSILQ";
String
APP_ID
=
"2159448906"
;
String
App_Key_WITH_PREFIX
=
"&app_key=7Ab1JbKljViyyXhf"
;
}
interface
TENCENT_PROFESSION_TTS_ID
{
...
...
@@ -60,9 +59,9 @@ public interface TTSConstants {
}
interface
ALI_TTS
{
String
APP_KEY
=
"
icp3h7cg9bmZ9jeL
"
;
String
ACCESS_KEY_ID
=
"LTAI4G
1dvpMi65PwN3WKCjVj
"
;
String
ACCESS_KEY_SECRET
=
"
R0J13fEPe1CYyC6pQTOLeiO1nO3pqN
"
;
String
APP_KEY
=
"
8nUeDWYW24K1KJos
"
;
String
ACCESS_KEY_ID
=
"LTAI4G
Gsz5h2UPxsL558pdnG
"
;
String
ACCESS_KEY_SECRET
=
"
jSon2xkuuFquygYzP8Mwj6jMmP46PP
"
;
}
interface
Audio
{
...
...
tts_service/src/main/java/ai/qiwu/com/tts_service/pojo/upload/UploadOneSenData.java
View file @
4675c212
...
...
@@ -22,6 +22,7 @@ public class UploadOneSenData {
private
Integer
sampleRate
=
44100
;
private
String
bitRate
=
"64K"
;
private
MultipartFile
file
;
private
Boolean
customText
;
public
UploadOneSenData
()
{
}
...
...
tts_service/src/main/java/ai/qiwu/com/tts_service/service/LieHuSchedule.java
View file @
4675c212
...
...
@@ -31,7 +31,7 @@ public class LieHuSchedule {
// private static final HashMap<String, String> LIE_HU_TOKEN_HEADER;
private
static
String
LIE_HU_TOKEN
;
public
static
volatile
NlsClient
nlsClient
=
new
NlsClient
(
"
99eccbe5318741b594c4860d0a98f2c1
"
);
public
static
volatile
NlsClient
nlsClient
=
new
NlsClient
(
"
dd5b063d26014dde807dee21368d1478
"
);
private
static
volatile
AccessToken
accessToken
;
static
{
...
...
@@ -45,7 +45,8 @@ public class LieHuSchedule {
// LIE_HU_TOKEN_HEADER.put("Content-Type", "application/json");
}
// @Scheduled(fixedDelay = 3600000)
// @Scheduled(fixedDelay = 3600000, initialDelay = 3600000)
@Scheduled
(
fixedDelay
=
3600000
)
public
void
scheduleALiTTSToken
()
{
if
(
accessToken
==
null
)
{
accessToken
=
new
AccessToken
(
TTSConstants
.
ALI_TTS
.
ACCESS_KEY_ID
,
TTSConstants
.
ALI_TTS
.
ACCESS_KEY_SECRET
);
...
...
tts_service/src/main/java/ai/qiwu/com/tts_service/service/TTService.java
View file @
4675c212
...
...
@@ -15,6 +15,7 @@ import org.apache.commons.csv.CSVRecord;
import
org.apache.commons.lang3.RandomStringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.exception.ExceptionUtils
;
import
org.apache.commons.lang3.math.NumberUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.StringRedisTemplate
;
import
org.springframework.stereotype.Service
;
...
...
@@ -30,6 +31,7 @@ import java.nio.charset.StandardCharsets;
import
java.nio.file.Files
;
import
java.nio.file.Path
;
import
java.nio.file.Paths
;
import
java.nio.file.StandardCopyOption
;
import
java.util.*
;
import
java.util.concurrent.*
;
import
java.util.concurrent.atomic.AtomicInteger
;
...
...
@@ -1507,9 +1509,21 @@ public class TTService {
String
dir
=
StringUtils
.
join
(
new
String
[]{
Initialize
.
getAudioDir
(),
recordVolume
.
getBotName
(),
Initialize
.
getUploadedDir
(),
recordVolume
.
getNpcName
()},
File
.
separator
);
try
{
Files
.
list
(
Paths
.
get
(
dir
)).
filter
(
path
->
StringUtils
.
endsWith
(
path
.
getFileName
().
toString
(),
".mp3"
))
Path
dirPt
=
Paths
.
get
(
dir
);
if
(
Files
.
exists
(
dirPt
))
{
Files
.
list
(
dirPt
).
filter
(
path
->
StringUtils
.
endsWith
(
path
.
getFileName
().
toString
(),
".mp3"
))
.
map
(
path
->
path
.
toAbsolutePath
().
toString
())
.
forEach
(
path
->
CallPython
.
soxiGetAudioConfig
(
command
+
path
+
" "
+
path
));
.
forEach
(
path
->
{
String
tempPath
=
path
.
substring
(
0
,
path
.
lastIndexOf
(
"."
))+
"_vol.mp3"
;
try
{
CallPython
.
soxiGetAudioConfig
(
command
+
path
+
" "
+
tempPath
);
Files
.
move
(
Paths
.
get
(
tempPath
),
Paths
.
get
(
path
),
StandardCopyOption
.
REPLACE_EXISTING
);
}
catch
(
Exception
e
)
{
log
.
error
(
"changeRecoedVolume move:{}, path:{}"
,
e
,
path
);
new
File
(
tempPath
).
delete
();
}
});
}
}
catch
(
Exception
e
)
{
log
.
error
(
"changeRecoedVolume error:{}, recordVolume:{}"
,
e
,
recordVolume
);
return
ServerResponse
.
createByErrorEnum
(
ResponseCode
.
ERROR
);
...
...
@@ -1520,7 +1534,15 @@ public class TTService {
if
(!
Files
.
exists
(
Paths
.
get
(
path
)))
{
return
ServerResponse
.
createByErrorMessage
(
"没有找到文本的人工语音文件,请确定您已上传过该文件"
);
}
CallPython
.
soxiGetAudioConfig
(
command
+
path
+
" "
+
path
);
String
tempPath
=
path
.
substring
(
0
,
path
.
lastIndexOf
(
"."
))+
"_vol.mp3"
;
try
{
CallPython
.
soxiGetAudioConfig
(
command
+
path
+
" "
+
tempPath
);
Files
.
move
(
Paths
.
get
(
tempPath
),
Paths
.
get
(
path
),
StandardCopyOption
.
REPLACE_EXISTING
);
}
catch
(
Exception
e
)
{
log
.
error
(
"changeRecoedVolume move:{}, path:{}"
,
e
,
path
);
new
File
(
tempPath
).
delete
();
return
ServerResponse
.
createByErrorEnum
(
ResponseCode
.
ERROR
);
}
}
return
ServerResponse
.
createBySuccess
();
}
...
...
@@ -1622,7 +1644,8 @@ public class TTService {
String
folder
=
StringUtils
.
join
(
new
String
[]{
Initialize
.
getAudioDir
(),
data
.
getBotName
(),
Initialize
.
getUploadedDir
(),
data
.
getNpcName
()},
File
.
separator
);
// absolute filepath
final
String
filename
=
StringUtils
.
join
(
new
String
[]{
folder
,
TTSUtils
.
buildMP3Filename
(
data
.
getText
())},
File
.
separator
);
String
mp3Name
;
final
String
filename
=
StringUtils
.
join
(
new
String
[]{
folder
,
(
mp3Name
=
TTSUtils
.
buildMP3Filename
(
data
.
getText
()))},
File
.
separator
);
// log.info("filepath:{}",filename);
// 删除之前已存在的文件
if
(
TTSUtils
.
doesFileExist
(
filename
)
)
{
...
...
@@ -1675,7 +1698,13 @@ public class TTService {
headers
.
put
(
"Content-Type"
,
"application/json; charset=utf-8"
);
// String jsonData = JSON.toJSONString(new int[]{data.getTid()});
// log.warn("getRecord_callback_url json data:{}, url:{}",jsonData, Initialize.getRecord_callback_url());
msg
=
OkHttp3Utils
.
doPostJsonStr
(
Initialize
.
getRecord_callback_url
(),
JSON
.
toJSONString
(
new
int
[]{
data
.
getTid
()}),
headers
);
String
id
;
if
(
data
.
getTid
()
<
0
)
{
id
=
String
.
valueOf
(
data
.
getTid
());
}
else
{
id
=
data
.
getTid
()
+
"_"
+
mp3Name
;
}
msg
=
OkHttp3Utils
.
doPostJsonStr
(
Initialize
.
getRecord_callback_url
(),
JSON
.
toJSONString
(
new
String
[]{
id
}),
headers
);
}
catch
(
Exception
e
)
{
msg
=
"post record_callback_url error"
;
log
.
error
(
"post record_callback_url error:{}"
,
ExceptionUtils
.
getStackTrace
(
e
));
...
...
@@ -2151,6 +2180,7 @@ public class TTService {
// }
// });
try
{
successUpLoadFileIds
=
successUpLoadFileIds
.
stream
().
filter
(
StringUtils:
:
isNotBlank
).
collect
(
Collectors
.
toSet
());
log
.
info
(
"打包上传成功id个数:{}"
,
successUpLoadFileIds
.
size
());
String
requestCall
=
JSON
.
toJSONString
(
successUpLoadFileIds
);
//log.info("requestCall:{}",requestCall);
...
...
@@ -2160,7 +2190,7 @@ public class TTService {
String
str
=
OkHttp3Utils
.
doPostJsonStr
(
Initialize
.
getRecord_callback_url
(),
requestCall
,
headers
);
if
(
str
!=
null
)
{
UploadCallbackResponse
callbackResponse
=
JSON
.
parseObject
(
str
,
UploadCallbackResponse
.
class
);
if
(
callbackResponse
==
null
||
callbackResponse
.
getCode
()
!=
1
)
{
if
(
callbackResponse
==
null
||
!
NumberUtils
.
INTEGER_ONE
.
equals
(
callbackResponse
.
getCode
())
)
{
log
.
warn
(
"打包上传回调返回信息:{}"
,
str
);
TTServiceUtil
.
buildUploadResponse
(
response
,
new
TTSResponse
(
500
,
"打包上传回调出现错误"
),
500
);
return
zipFolder
;
...
...
@@ -2217,8 +2247,9 @@ public class TTService {
return
;
}
// audio_dir/botname/record/npcname/xxx.mp3
String
mp3Name
;
final
String
filePath
=
StringUtils
.
join
(
Arrays
.
asList
(
Initialize
.
getAudioDir
(),
data
.
getBotName
(),
Initialize
.
getUploadedDir
(),
data
.
getNpcName
(),
TTSUtils
.
buildMP3Filename
(
data
.
getText
(
))),
File
.
separator
);
Initialize
.
getUploadedDir
(),
data
.
getNpcName
(),
(
mp3Name
=
TTSUtils
.
buildMP3Filename
(
data
.
getText
()
))),
File
.
separator
);
boolean
result
;
// 删除文件
if
(
TTSUtils
.
doesFileExist
(
filePath
))
{
...
...
@@ -2230,14 +2261,20 @@ public class TTService {
}
// 删除成功回调接口/text/offline/delUpload/callback
if
(
result
)
{
final
int
tid
=
data
.
getTid
();
POOL
.
submit
(()
->
{
new
File
(
new
StringBuilder
(
filePath
).
append
(
".b64"
).
toString
()).
delete
();
try
{
HashMap
<
String
,
String
>
headers
=
new
HashMap
<>();
headers
.
put
(
"Authorization"
,
head
);
headers
.
put
(
"Content-Type"
,
"application/json; charset=utf-8"
);
OkHttp3Utils
.
doPostJsonStr
(
Initialize
.
getDelRecordCallbackUrl
(),
JSON
.
toJSONString
(
new
int
[]{
tid
}),
headers
);
String
tid
;
if
(
Boolean
.
TRUE
.
equals
(
data
.
getCustomText
()))
{
tid
=
String
.
valueOf
(-
data
.
getTid
());
}
else
{
tid
=
data
.
getTid
()+
"_"
+
mp3Name
;
}
OkHttp3Utils
.
doPostJsonStr
(
Initialize
.
getDelRecordCallbackUrl
(),
JSON
.
toJSONString
(
new
String
[]{
tid
}),
headers
);
}
catch
(
Exception
e
)
{
log
.
error
(
"delOneSen删除地址回调出错:{}"
,
e
.
toString
());
}
...
...
tts_service/src/main/java/ai/qiwu/com/tts_service/service/TTServiceEdition2.java
View file @
4675c212
...
...
@@ -4,6 +4,7 @@ import ai.qiwu.com.tts_service.common.*;
import
ai.qiwu.com.tts_service.pojo.*
;
import
ai.qiwu.com.tts_service.service.baidu.ThirdPartyService
;
import
com.alibaba.fastjson.JSON
;
import
io.netty.handler.codec.http.HttpResponseStatus
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.RandomStringUtils
;
...
...
@@ -13,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.data.redis.core.StringRedisTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
sun.rmi.runtime.Log
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.*
;
...
...
@@ -466,7 +468,8 @@ public class TTServiceEdition2 {
}
else
if
(!
fileExist
)
{
if
(
Initialize
.
OFFLINE_SERVER
.
equals
(
url
))
{
data
.
setFormat
(
"mp3"
);
int
status
=
ApachHttpUtils
.
audioPost
(
url
,
JSON
.
toJSONString
(
data
),
filePath
);
// int status = ApachHttpUtils.audioPost(url, JSON.toJSONString(data), filePath);
int
status
=
OkHttp3Utils
.
postTTSEdition2
(
url
,
Collections
.
emptyMap
(),
JSON
.
toJSONString
(
data
),
filePath
,
false
);
if
(
status
!=
HttpServletResponse
.
SC_OK
)
{
log
.
info
(
"直接下载人物{}的mp3文件失败,TEXT:{}"
,
filePath
,
data
.
getText
());
...
...
@@ -486,15 +489,26 @@ public class TTServiceEdition2 {
private
ResponseCodeWithData
requestTemplate
(
String
url
,
GeneralMP3Data
data
,
String
filePath
,
boolean
getOnline
)
{
ResponseCodeWithData
res
;
// data.setMode("test");
int
status
=
ApachHttpUtils
.
audioPost
(
url
,
JSON
.
toJSONString
(
data
),
filePath
);
if
(
status
==
0
)
res
=
new
ResponseCodeWithData
(
HttpServletResponse
.
SC_INTERNAL_SERVER_ERROR
,
"请求出错"
);
else
if
(
status
==
HttpServletResponse
.
SC_NOT_FOUND
&&
Initialize
.
OFFLINE_SERVER
.
equals
(
url
))
{
if
(!
getOnline
)
return
new
ResponseCodeWithData
(
HttpServletResponse
.
SC_NOT_FOUND
,
"没有找到该文件"
);
List
<
String
>
list
=
Initialize
.
getTheOfflineJumpPersonInfo
(
data
.
getPerson
(),
data
.
getTone
());
GeneralMP3Data
jumpedData
=
new
GeneralMP3Data
(
data
.
getServer
(),
data
.
getText
(),
list
.
get
(
0
),
list
.
get
(
1
),
data
.
getBotname
(),
data
.
getCache
(),
data
.
getVolume
(),
data
.
getSpeed
(),
data
.
getPitch
());
log
.
warn
(
"线下人物请求404,跳转到其对应的线上人物:人物:{}->{},情绪:{}->{}"
,
data
.
getPerson
(),
jumpedData
.
getPerson
(),
data
.
getTone
(),
jumpedData
.
getTone
());
status
=
ApachHttpUtils
.
audioPost
(
Initialize
.
AUDIO_GENERATE_SERVER
,
JSON
.
toJSONString
(
jumpedData
),
filePath
);
String
dataJsonStr
;
int
status
=
OkHttp3Utils
.
postTTSEdition2
(
url
,
Collections
.
emptyMap
(),
(
dataJsonStr
=
JSON
.
toJSONString
(
data
)),
filePath
,
false
);
// int status = ApachHttpUtils.audioPost(url, JSON.toJSONString(data), filePath);
if
(
status
==
HttpServletResponse
.
SC_NOT_FOUND
&&
Initialize
.
OFFLINE_SERVER
.
equals
(
url
))
{
res
=
dealOfflineJump
(
data
,
getOnline
,
filePath
);
}
else
if
(
status
!=
HttpServletResponse
.
SC_OK
){
int
retryCount
=
0
;
do
{
retryCount
++;
try
{
Thread
.
sleep
(
500
*
retryCount
);
}
catch
(
Exception
e
)
{}
status
=
OkHttp3Utils
.
postTTSEdition2
(
url
,
Collections
.
emptyMap
(),
dataJsonStr
,
filePath
,
true
);
if
(
status
==
HttpServletResponse
.
SC_OK
)
{
return
new
ResponseCodeWithData
(
status
);
}
else
if
(
status
==
HttpServletResponse
.
SC_NOT_FOUND
&&
Initialize
.
OFFLINE_SERVER
.
equals
(
url
))
{
return
dealOfflineJump
(
data
,
getOnline
,
filePath
);
}
}
while
(
retryCount
<
4
);
log
.
error
(
"requestTemplate尝试3次后仍失败:status:{}, text:{}, filePath:{}"
,
status
,
data
.
getText
(),
filePath
);
res
=
new
ResponseCodeWithData
(
status
);
}
else
{
res
=
new
ResponseCodeWithData
(
status
);
...
...
@@ -507,6 +521,41 @@ public class TTServiceEdition2 {
return
res
;
}
private
ResponseCodeWithData
dealOfflineJump
(
GeneralMP3Data
data
,
boolean
getOnline
,
String
filePath
)
{
if
(!
getOnline
)
return
new
ResponseCodeWithData
(
HttpServletResponse
.
SC_NOT_FOUND
,
"没有找到该文件"
);
List
<
String
>
list
=
Initialize
.
getTheOfflineJumpPersonInfo
(
data
.
getPerson
(),
data
.
getTone
());
GeneralMP3Data
jumpedData
=
new
GeneralMP3Data
(
data
.
getServer
(),
data
.
getText
(),
list
.
get
(
0
),
list
.
get
(
1
),
data
.
getBotname
(),
data
.
getCache
(),
data
.
getVolume
(),
data
.
getSpeed
(),
data
.
getPitch
());
log
.
warn
(
"线下人物请求404,跳转到其对应的线上人物:人物:{}->{},情绪:{}->{}"
,
data
.
getPerson
(),
jumpedData
.
getPerson
(),
data
.
getTone
(),
jumpedData
.
getTone
());
// int status = ApachHttpUtils.audioPost(Initialize.AUDIO_GENERATE_SERVER, JSON.toJSONString(jumpedData), filePath);
int
status
=
OkHttp3Utils
.
postTTSEdition2
(
Initialize
.
AUDIO_GENERATE_SERVER
,
Collections
.
emptyMap
(),
JSON
.
toJSONString
(
jumpedData
),
filePath
,
false
);
return
new
ResponseCodeWithData
(
status
);
}
// private ResponseCodeWithData requestTemplate(String url, GeneralMP3Data data, String filePath, boolean getOnline) {
// ResponseCodeWithData res;
//// data.setMode("test");
// int status = ApachHttpUtils.audioPost(url, JSON.toJSONString(data), filePath);
// if (status == 0) res = new ResponseCodeWithData(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "请求出错");
// else if (status == HttpServletResponse.SC_NOT_FOUND && Initialize.OFFLINE_SERVER.equals(url)) {
// if (!getOnline) return new ResponseCodeWithData(HttpServletResponse.SC_NOT_FOUND, "没有找到该文件");
// List<String> list = Initialize.getTheOfflineJumpPersonInfo(data.getPerson(), data.getTone());
// GeneralMP3Data jumpedData = new GeneralMP3Data(data.getServer(), data.getText(), list.get(0), list.get(1),
// data.getBotname(), data.getCache(), data.getVolume(), data.getSpeed(), data.getPitch());
// log.warn("线下人物请求404,跳转到其对应的线上人物:人物:{}->{},情绪:{}->{}",data.getPerson(),jumpedData.getPerson(),data.getTone(), jumpedData.getTone());
// status = ApachHttpUtils.audioPost(Initialize.AUDIO_GENERATE_SERVER, JSON.toJSONString(jumpedData), filePath);
// res = new ResponseCodeWithData(status);
// } else {
// res = new ResponseCodeWithData(status);
// }
//
//// if ((res == null || res.getCode() != 200) && !"mp3".equals(data.getFormat())) {
//// log.warn("requestTemplate:列户小雅兜底调用");
//// res = dealThirdParty(data.getText(), "Liehu1", filePath);
//// }
// return res;
// }
private
ResponseCodeWithData
changeSound
(
String
wavFilename
,
double
volume
,
double
speed
,
double
pitch
,
String
mp3FilePath
)
{
ResponseCodeWithData
res
=
null
;
...
...
@@ -901,7 +950,20 @@ public class TTServiceEdition2 {
if
(
result
)
{
return
new
ResponseCodeWithData
(
HttpServletResponse
.
SC_OK
,
"创建第三方wav文件成功"
);
}
log
.
error
(
"调用第三方生成wav文件失败"
);
int
thirdFailRetryCount
=
0
;
do
{
thirdFailRetryCount
++;
try
{
Thread
.
sleep
(
500
*
thirdFailRetryCount
);
}
catch
(
Exception
e
){}
result
=
ThirdPartyService
.
thirdPartyCall
(
text
,
Initialize
.
theThirdPartysPer
(
person
),
filepath
,
person
);
if
(
result
)
{
return
new
ResponseCodeWithData
(
HttpServletResponse
.
SC_OK
,
"创建第三方wav文件成功"
);
}
}
while
(
thirdFailRetryCount
<
4
);
log
.
error
(
"尝试3次后调用第三方生成wav文件失败:text:{}, person:{}"
,
text
,
person
);
return
new
ResponseCodeWithData
(
HttpServletResponse
.
SC_INTERNAL_SERVER_ERROR
,
"调用第三方生成wav文件失败"
);
}
...
...
tts_service/src/main/java/ai/qiwu/com/tts_service/service/baidu/ThirdPartyService.java
View file @
4675c212
...
...
@@ -77,7 +77,7 @@ public class ThirdPartyService {
clientProfile
.
setHttpProfile
(
httpProfile
);
TTS_CLIENT
=
new
TtsClient
(
CREDENTIAL
,
"ap-guangzhou"
,
clientProfile
);
TENCENT_AI_TTS_LOCK
=
new
Semaphore
(
2
);
TENCENT_AI_TTS_LOCK
=
new
Semaphore
(
10
);
ALI_YUN_TTS_LOCK
=
new
Semaphore
(
2
);
}
...
...
@@ -268,7 +268,7 @@ public class ThirdPartyService {
try
{
listener
=
new
SpeechSynthesizerListener
()
{
FileOutputStream
fout
=
new
FileOutputStream
(
new
File
(
filePath
));
private
boolean
firstRecvBinary
=
true
;
//
private boolean firstRecvBinary = true;
//语音合成结束
@Override
public
void
onComplete
(
SpeechSynthesizerResponse
response
)
{
...
...
@@ -282,11 +282,11 @@ public class ThirdPartyService {
@Override
public
void
onMessage
(
ByteBuffer
message
)
{
try
{
if
(
firstRecvBinary
)
{
//计算首包语音流的延迟,收到第一包语音流时,即可以进行语音播放,以提升响应速度(特别是实时交互场景下)。
firstRecvBinary
=
false
;
log
.
info
(
"tts first latency"
);
}
//
if(firstRecvBinary) {
//
//计算首包语音流的延迟,收到第一包语音流时,即可以进行语音播放,以提升响应速度(特别是实时交互场景下)。
//
firstRecvBinary = false;
//
log.info("tts first latency");
//
}
byte
[]
bytesArray
=
new
byte
[
message
.
remaining
()];
message
.
get
(
bytesArray
,
0
,
bytesArray
.
length
);
fout
.
write
(
bytesArray
);
...
...
@@ -581,7 +581,8 @@ public class ThirdPartyService {
}).
collect
(
Collectors
.
joining
(
"&"
));
sign
+=
TTSConstants
.
TENCENT_AUDIO_ID
.
App_Key_WITH_PREFIX
;
params
.
put
(
"sign"
,
StringUtils
.
upperCase
(
DigestUtils
.
md5DigestAsHex
(
sign
.
getBytes
(
StandardCharsets
.
UTF_8
))));
String
result
=
ApachHttpUtils
.
get
(
"https://api.ai.qq.com/fcgi-bin/aai/aai_tts"
,
null
,
params
);
// String result = ApachHttpUtils.get("https://api.ai.qq.com/fcgi-bin/aai/aai_tts", null, params);
String
result
=
OkHttp3Utils
.
getTTSeDITION2
(
"https://api.ai.qq.com/fcgi-bin/aai/aai_tts"
,
params
,
Collections
.
emptyMap
());
if
(
StringUtils
.
isBlank
(
result
))
{
log
.
error
(
"请求腾讯AI tts出错,结果为空:"
+
text
);
}
else
{
...
...
@@ -599,7 +600,7 @@ public class ThirdPartyService {
}
}
return
false
;
}
catch
(
Interrupted
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
ExceptionUtils
.
getStackTrace
(
e
));
}
finally
{
if
(
acquireSuccess
)
{
...
...
@@ -609,7 +610,7 @@ public class ThirdPartyService {
return
false
;
}
private
static
boolean
tecentYouTTS
(
String
per
,
String
text
,
String
filepath
)
{
private
static
boolean
tecentYouTTS
(
String
per
,
String
text
,
String
filepath
)
throws
IOException
{
TreeMap
<
String
,
String
>
params
=
new
TreeMap
<>();
params
.
put
(
"app_id"
,
TTSConstants
.
TENCENT_AUDIO_ID
.
APP_ID
);
long
secondStamp
;
...
...
@@ -628,7 +629,8 @@ public class ThirdPartyService {
}).
collect
(
Collectors
.
joining
(
"&"
));
sign
+=
TTSConstants
.
TENCENT_AUDIO_ID
.
App_Key_WITH_PREFIX
;
params
.
put
(
"sign"
,
StringUtils
.
upperCase
(
DigestUtils
.
md5DigestAsHex
(
sign
.
getBytes
(
StandardCharsets
.
UTF_8
))));
String
result
=
ApachHttpUtils
.
get
(
"https://api.ai.qq.com/fcgi-bin/aai/aai_tta"
,
null
,
params
);
// String result = ApachHttpUtils.get("https://api.ai.qq.com/fcgi-bin/aai/aai_tta", null, params);
String
result
=
OkHttp3Utils
.
getTTSeDITION2
(
"https://api.ai.qq.com/fcgi-bin/aai/aai_tta"
,
params
,
Collections
.
emptyMap
());
if
(
StringUtils
.
isBlank
(
result
))
{
log
.
error
(
"请求腾讯优图出错,结果为空:"
+
text
);
}
else
{
...
...
@@ -1029,7 +1031,11 @@ public class ThirdPartyService {
// System.out.println(tecentYouTTS("2", "今天是个好天气", "/home/yf01/下载/audioCut/tecentYou01.wav"));
// System.out.println(tecentTTS("5", "今天天气", "/home/yf01/下载/audioCut/tecentPro01.wav"));
// xunFeiTTS("xiaoyan", "今天是个好天气。佳人微醺,现在的她充满活力,要夸夸她吗", "/home/yf01/下载/audioCut/tecentXunFei06.wav");
String
txt
=
"记者从天津滨海新区相关部门获悉,天津南环铁路桥坍塌事故现场救援搜救任务已经于11月1日18时完成。截至目前,事故已造成8人遇难,其中5人现场遇难,3人经医院全力"
;
System
.
out
.
println
(
sliceText
(
txt
,
45
));
// String txt = "记者从天津滨海新区相关部门获悉,天津南环铁路桥坍塌事故现场救援搜救任务已经于11月1日18时完成。截至目前,事故已造成8人遇难,其中5人现场遇难,3人经医院全力";
// System.out.println(sliceText(txt, 45));
System
.
out
.
println
(
TTSUtils
.
buildMP3Filename
(
"今天是"
));
System
.
out
.
println
(
TTSUtils
.
buildMP3Filename
(
"晴天"
));
System
.
out
.
println
(
TTSUtils
.
buildMP3Filename
(
"今天是\uD83C\uDD70晴天\uD83C\uDD71"
));
System
.
out
.
println
(
TTSUtils
.
buildMP3Filename
(
"今天是\uD83C\uDD70晴天\uD83C\uDD71还是\uD83C\uDD70阴天\uD83C\uDD71"
));
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment