Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linstt-controller
Project overview
Project overview
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LINAGORA
L
LGS
Labs
linstt-controller
Commits
0e2091bf
Commit
0e2091bf
authored
Dec 15, 2017
by
Yoann HOUPERT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow more content-type for wav
parent
8cf0a9e8
Pipeline
#8168
passed with stage
in 26 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
2 deletions
+22
-2
.gitignore
.gitignore
+3
-0
app.js
app.js
+11
-1
doc/REST_API/REST_transcript.md
doc/REST_API/REST_transcript.md
+8
-1
No files found.
.gitignore
View file @
0e2091bf
...
...
@@ -54,6 +54,9 @@ typings/
# Yarn Integrity file
.yarn-integrity
#HTTPS server certificat
ssl/*.pem
tmp/
nohup.out
models/
app.js
View file @
0e2091bf
...
...
@@ -19,7 +19,6 @@
*/
const
https
=
require
(
'
https
'
);
const
fs
=
require
(
'
fs
'
);
const
app
=
require
(
'
express
'
)();
const
bodyParser
=
require
(
'
body-parser
'
);
...
...
@@ -28,7 +27,18 @@ const routes = require('./lib/webserver/routes');
console
.
log
(
'
starting routes linstt-controller...
'
);
app
.
use
(
bodyParser
.
raw
({
type
:
'
audio/wav
'
,
limit
:
'
200mb
'
}));
app
.
use
(
bodyParser
.
raw
({
type
:
'
audio/wave
'
,
limit
:
'
200mb
'
}));
app
.
use
(
bodyParser
.
raw
({
type
:
'
audio/x-wav
'
,
limit
:
'
200mb
'
}));
app
.
use
(
bodyParser
.
raw
({
type
:
'
audio/x-pn-wa
'
,
limit
:
'
200mb
'
}));
app
.
use
(
bodyParser
.
raw
({
type
:
'
audio/vnd.wave
'
,
limit
:
'
200mb
'
}));
app
.
use
((
req
,
res
,
next
)
=>
{
res
.
header
(
'
Access-Control-Allow-Origin
'
,
'
*
'
);
res
.
header
(
'
Access-Control-Allow-Headers
'
,
'
Origin, X-Requested-With, Content-Type, Accept
'
);
next
();
});
app
.
use
(
'
/
'
,
routes
.
routesFactory
(
config
.
orchestrator
));
app
.
listen
(
config
.
api
,
()
=>
{
...
...
doc/REST_API/REST_transcript.md
View file @
0e2091bf
...
...
@@ -4,7 +4,13 @@ Create a transcript text from an audio file
**Request Headers:**
-
Accept: application/json
Content-Type :
-
audio/wav
-
audio/wave
-
audio/x-wav
-
audio/x-pn-wa
-
audio/vnd.wave
**Request Body**
...
...
@@ -49,3 +55,4 @@ This endpoint expects the request body to be a wav file
{
status : X , err : 'here the error'
}
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