1 | require('colors');
|
2 | const { validateTokenConfigVoice } = require('./src/configuration')
|
3 | const { cogniteRequest } = require('./src/transcribe')
|
4 |
|
5 |
|
6 | /**
|
7 | * @function
|
8 | * @param token
|
9 | * @returns {{transcribe: ((function(*=): Promise<null>)|*)}}
|
10 | */
|
11 | module.exports = ({ token }) => {
|
12 | validateTokenConfigVoice({ token })
|
13 | return {
|
14 | transcribe: cogniteRequest(token)
|
15 | }
|
16 | }
|