Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
J
jensen
Project
Project
Details
Activity
Releases
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
Skye Yu
jensen
Commits
c9853aec
Commit
c9853aec
authored
Sep 24, 2025
by
martin hou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 增加模式的识别
parent
7f27a5e9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
jensen.d.ts
jensen.d.ts
+1
-1
jensen.js
src/utils/jensen.js
+9
-0
No files found.
jensen.d.ts
View file @
c9853aec
...
...
@@ -36,7 +36,7 @@ export type FileInfo = {
time
:
Date
;
// 录音时间
duration
:
number
;
// 持续时长,单位为毫秒
length
:
number
;
// 文件长度,单位为字节
mode
:
'room'
|
'whisper'
|
'call'
;
// 录音模式,room:现场录音,whisper:小笔记,call:通话
mode
:
'room'
|
'whisper'
|
'call'
|
null
;
// 录音模式,room:现场录音,whisper:小笔记,call:通话
signature
:
string
;
// 文件签名,0长度的文件或是录音中的文件的值为000000000000000000000000000000000
};
...
...
src/utils/jensen.js
View file @
c9853aec
...
...
@@ -763,6 +763,7 @@ Jensen.prototype.listFiles = async function () {
}
let
ftime
=
fname
.
join
(
''
);
let
duration
=
0
;
let
mode
=
'room'
;
if
(
ftime
.
match
(
/^
\d{14}
REC
\d
+
\.
wav$/gi
))
{
ftime
=
ftime
.
replace
(
/^
(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})
REC.*$/gi
,
'$1-$2-$3 $4:$5:$6'
);
ftime
=
new
Date
(
ftime
);
...
...
@@ -793,6 +794,13 @@ Jensen.prototype.listFiles = async function () {
{
duration
=
flen
/
12
;
}
// "2025Sep24-180808-Call01.hda"
mode
=
fname
.
join
(
''
).
replace
(
/^
(\w{9})
-
(\d{6})
-
(
.+
?)\d
+
\.\w
+$/gi
,
'$3'
).
toUpperCase
();
console
.
log
(
'mode:'
,
fname
.
join
(
''
),
mode
);
if
(
mode
==
'WHSP'
||
mode
==
'WIP'
)
mode
=
'whisper'
;
else
if
(
mode
==
'ROOM'
)
mode
=
'room'
;
else
if
(
mode
==
'CALL'
)
mode
=
'call'
;
else
mode
=
'room'
;
let
createDate
=
''
;
let
createTime
=
''
;
if
(
ftime
)
{
...
...
@@ -807,6 +815,7 @@ Jensen.prototype.listFiles = async function () {
duration
:
duration
,
version
:
ver
,
length
:
flen
,
mode
:
mode
,
signature
:
sign
.
join
(
''
)
});
}
...
...
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