Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
middleLayer_for_debug
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
middleLayer_for_debug
Commits
314177e8
Commit
314177e8
authored
Feb 21, 2022
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 录音转文本
parent
67c99195
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
air.js
assets/middleLayer_for_debug/script/air.js
+8
-8
No files found.
assets/middleLayer_for_debug/script/air.js
View file @
314177e8
...
...
@@ -101,16 +101,16 @@ export function initAir(_this) {
window
.
courseware
.
hasCalledStartRecord
=
true
;
window
.
courseware
.
callOcMethod
(
"
startRecord
"
,
{
"
params
"
:
testText
});
},
stopRecord
(
_isgradepapers
,
_callback
)
{
stopRecord
(
isSpeechToText
,
_callback
)
{
window
.
courseware
.
hasCalledStartRecord
=
false
;
_this
.
log
(
`===成功调用stopRecord===
_isgradepapers ==
${
_isgradepapers
}
`
);
_this
.
log
(
`===成功调用stopRecord===
isSpeechToText ==
${
isSpeechToText
}
`
);
let
callback
=
_callback
;
let
isgradepapers
;
if
(
_isgradepapers
&&
typeof
_isgradepapers
===
"
function
"
)
{
callback
=
_isgradepapers
;
isgradepapers
=
1
;
let
_isSpeechToText
;
if
(
isSpeechToText
&&
typeof
isSpeechToText
===
"
function
"
)
{
callback
=
isSpeechToText
;
_isSpeechToText
=
1
;
}
else
{
isgradepapers
=
_isgradepapers
;
_isSpeechToText
=
isSpeechToText
;
}
if
(
!
callback
)
{
// 不传回调函数就表示取消评测
...
...
@@ -122,7 +122,7 @@ export function initAir(_this) {
callback
&&
callback
(
JSON
.
stringify
(
res
));
window
.
air
.
recordCallBack
=
null
;
};
window
.
courseware
.
callOcMethod
(
"
stopRecord
"
,
{
isBreak
:
0
,
is
GradePapers
:
isgradepapers
});
window
.
courseware
.
callOcMethod
(
"
stopRecord
"
,
{
isBreak
:
0
,
is
SpeechToText
:
_isSpeechToText
});
},
startTest
(
testText
,
option
)
{
window
.
courseware
.
hasCalledStartTest
=
true
;
...
...
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