You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-08-24 20:19:10 +02:00
Compare commits
1 Commits
server-v3.
...
test_vosk_
Author | SHA1 | Date | |
---|---|---|---|
|
09e1feab05 |
@@ -1 +1 @@
|
||||
1b7180e6-e500-4818-adc8-a41fe97a84ce
|
||||
539611e3-2c1c-41ed-ab17-a6bac40b8478
|
@@ -762,7 +762,8 @@ class NoteScreenComponent extends BaseScreenComponent {
|
||||
private async getVosk() {
|
||||
if (this.vosk_) return this.vosk_;
|
||||
this.vosk_ = new Vosk();
|
||||
await this.vosk_.loadModel('model-fr-fr');
|
||||
const result = await this.vosk_.loadModel(`${Setting.value('resourceDir')}/vosk_models/vosk-model-small-fr-0.22`);//'model-fr-fr');
|
||||
logger.info('Vosk: Loaded model:', result);
|
||||
return this.vosk_;
|
||||
}
|
||||
|
||||
|
@@ -308,6 +308,8 @@ PODS:
|
||||
- glog
|
||||
- react-native-alarm-notification (2.11.0):
|
||||
- React
|
||||
- react-native-blob-util (0.17.3):
|
||||
- React-Core
|
||||
- react-native-camera (4.2.1):
|
||||
- React-Core
|
||||
- react-native-camera/RCT (= 4.2.1)
|
||||
@@ -438,7 +440,15 @@ PODS:
|
||||
- React-Core
|
||||
- RNVectorIcons (9.2.0):
|
||||
- React-Core
|
||||
- RNZipArchive (6.0.9):
|
||||
- React-Core
|
||||
- RNZipArchive/Core (= 6.0.9)
|
||||
- SSZipArchive (~> 2.2)
|
||||
- RNZipArchive/Core (6.0.9):
|
||||
- React-Core
|
||||
- SSZipArchive (~> 2.2)
|
||||
- SocketRocket (0.6.0)
|
||||
- SSZipArchive (2.4.3)
|
||||
- Yoga (1.14.0)
|
||||
- YogaKit (1.18.1):
|
||||
- Yoga (~> 1.14)
|
||||
@@ -493,6 +503,7 @@ DEPENDENCIES:
|
||||
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
|
||||
- React-logger (from `../node_modules/react-native/ReactCommon/logger`)
|
||||
- "react-native-alarm-notification (from `../node_modules/@joplin/react-native-alarm-notification`)"
|
||||
- react-native-blob-util (from `../node_modules/react-native-blob-util`)
|
||||
- react-native-camera (from `../node_modules/react-native-camera`)
|
||||
- react-native-document-picker (from `../node_modules/react-native-document-picker`)
|
||||
- react-native-fingerprint-scanner (from `../node_modules/react-native-fingerprint-scanner`)
|
||||
@@ -532,6 +543,7 @@ DEPENDENCIES:
|
||||
- RNSecureRandom (from `../node_modules/react-native-securerandom`)
|
||||
- RNShare (from `../node_modules/react-native-share`)
|
||||
- RNVectorIcons (from `../node_modules/react-native-vector-icons`)
|
||||
- RNZipArchive (from `../node_modules/react-native-zip-archive`)
|
||||
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
|
||||
|
||||
SPEC REPOS:
|
||||
@@ -550,6 +562,7 @@ SPEC REPOS:
|
||||
- libevent
|
||||
- OpenSSL-Universal
|
||||
- SocketRocket
|
||||
- SSZipArchive
|
||||
- YogaKit
|
||||
|
||||
EXTERNAL SOURCES:
|
||||
@@ -601,6 +614,8 @@ EXTERNAL SOURCES:
|
||||
:path: "../node_modules/react-native/ReactCommon/logger"
|
||||
react-native-alarm-notification:
|
||||
:path: "../node_modules/@joplin/react-native-alarm-notification"
|
||||
react-native-blob-util:
|
||||
:path: "../node_modules/react-native-blob-util"
|
||||
react-native-camera:
|
||||
:path: "../node_modules/react-native-camera"
|
||||
react-native-document-picker:
|
||||
@@ -679,6 +694,8 @@ EXTERNAL SOURCES:
|
||||
:path: "../node_modules/react-native-share"
|
||||
RNVectorIcons:
|
||||
:path: "../node_modules/react-native-vector-icons"
|
||||
RNZipArchive:
|
||||
:path: "../node_modules/react-native-zip-archive"
|
||||
Yoga:
|
||||
:path: "../node_modules/react-native/ReactCommon/yoga"
|
||||
|
||||
@@ -720,6 +737,7 @@ SPEC CHECKSUMS:
|
||||
React-jsinspector: 60769e5a0a6d4b32294a2456077f59d0266f9a8b
|
||||
React-logger: 1623c216abaa88974afce404dc8f479406bbc3a0
|
||||
react-native-alarm-notification: 26527410a6162d07a9dc57f4bbc62e94ff48e65d
|
||||
react-native-blob-util: 99f4d79189252f597fe0d810c57a3733b1b1dea6
|
||||
react-native-camera: 3eae183c1d111103963f3dd913b65d01aef8110f
|
||||
react-native-document-picker: 495c444c0c773c6e83a5d91165890ecb1c0a399a
|
||||
react-native-fingerprint-scanner: ac6656f18c8e45a7459302b84da41a44ad96dbbe
|
||||
@@ -759,7 +777,9 @@ SPEC CHECKSUMS:
|
||||
RNSecureRandom: 07efbdf2cd99efe13497433668e54acd7df49fef
|
||||
RNShare: eaee3dd5a06dad397c7d3b14762007035c5de405
|
||||
RNVectorIcons: fcc2f6cb32f5735b586e66d14103a74ce6ad61f8
|
||||
RNZipArchive: 68a0c6db4b1c103f846f1559622050df254a3ade
|
||||
SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608
|
||||
SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef
|
||||
Yoga: 99caf8d5ab45e9d637ee6e0174ec16fbbb01bcfc
|
||||
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
|
||||
|
||||
|
@@ -42,6 +42,7 @@
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.70.6",
|
||||
"react-native-action-button": "2.8.5",
|
||||
"react-native-blob-util": "0.17.3",
|
||||
"react-native-camera": "4.2.1",
|
||||
"react-native-dialogbox": "0.6.10",
|
||||
"react-native-document-picker": "8.2.0",
|
||||
@@ -68,6 +69,7 @@
|
||||
"react-native-version-info": "1.1.1",
|
||||
"react-native-vosk": "0.1.12",
|
||||
"react-native-webview": "11.26.1",
|
||||
"react-native-zip-archive": "6.0.9",
|
||||
"react-redux": "7.2.9",
|
||||
"redux": "4.2.1",
|
||||
"rn-fetch-blob": "0.12.0",
|
||||
|
@@ -116,6 +116,7 @@ import ProfileEditor from './components/ProfileSwitcher/ProfileEditor';
|
||||
import sensorInfo from './components/biometrics/sensorInfo';
|
||||
import { getCurrentProfile } from '@joplin/lib/services/profileConfig';
|
||||
import { getDatabaseName, getProfilesRootDir, getResourceDir, setDispatch } from './services/profiles';
|
||||
// import { unzip } from 'react-native-zip-archive'
|
||||
|
||||
const logger = Logger.create('root');
|
||||
|
||||
@@ -701,6 +702,21 @@ async function initialize(dispatch: Function) {
|
||||
// ----------------------------------------------------------------------------
|
||||
if (Setting.value('env') === 'dev') await runIntegrationTests();
|
||||
|
||||
|
||||
|
||||
// await shim.fsDriver().remove(`${Setting.value('resourceDir')}/vosk_models`);
|
||||
// await shim.fsDriver().mkdir(`${Setting.value('resourceDir')}/vosk_models`);
|
||||
// await shim.fetchBlob('https://alphacephei.com/vosk/models/vosk-model-small-fr-0.22.zip', { path: `${Setting.value('resourceDir')}/vosk_models/vosk-model-small-fr-0.22.zip` });
|
||||
|
||||
// await unzip(`${Setting.value('resourceDir')}/vosk_models/vosk-model-small-fr-0.22.zip`, `${Setting.value('resourceDir')}/vosk_models`);
|
||||
// console.info('FFFFFFFFFFFFFFFFFFFFFFFFF', await shim.fsDriver().readDirStats(`${Setting.value('resourceDir')}/vosk_models/vosk-model-small-fr-0.22`));
|
||||
|
||||
// await shim.fsDriver().writeFile(`${Setting.value('resourceDir')}/vosk_models/vosk-model-small-fr-0.22/uuid`, '6cefb4d8-32d7-4292-97f2-44993f815dcd', 'uf8');
|
||||
await shim.fsDriver().writeFile(`${Setting.value('resourceDir')}/vosk_models/vosk-model-small-fr-0.22/uuid`, '539611e3-2c1c-41ed-ab17-a6bac40b8478', 'uf8');
|
||||
console.info('FFFFFFFFFFFFFFFFFFFFFFFFF', await shim.fsDriver().readDirStats(`${Setting.value('resourceDir')}/vosk_models/vosk-model-small-fr-0.22`));
|
||||
|
||||
console.info('UUUUUUUUUUUUUUUUUUUUUUUUU', await shim.fsDriver().readFile('/data/user/0/net.cozic.joplin/files/vosk_models/vosk-model-small-fr-0.22/uuid', 'utf8'));
|
||||
|
||||
reg.logger().info('Application initialized');
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import FsDriverBase, { ReadDirStatsOptions } from '@joplin/lib/fs-driver-base';
|
||||
const RNFetchBlob = require('rn-fetch-blob').default;
|
||||
const RNFetchBlob = require('react-native-blob-util').default;
|
||||
const RNFS = require('react-native-fs');
|
||||
const DocumentPicker = require('react-native-document-picker').default;
|
||||
import { openDocument } from '@joplin/react-native-saf-x';
|
||||
|
@@ -1,7 +1,7 @@
|
||||
const shim = require('@joplin/lib/shim').default;
|
||||
const { GeolocationReact } = require('./geolocation-react.js');
|
||||
const PoorManIntervals = require('@joplin/lib/PoorManIntervals').default;
|
||||
const RNFetchBlob = require('rn-fetch-blob').default;
|
||||
const RNFetchBlob = require('react-native-blob-util').default;
|
||||
const { generateSecureRandom } = require('react-native-securerandom');
|
||||
const FsDriverRN = require('./fs-driver-rn').default;
|
||||
const { Buffer } = require('buffer');
|
||||
|
25
yarn.lock
25
yarn.lock
@@ -4959,6 +4959,7 @@ __metadata:
|
||||
react: 18.2.0
|
||||
react-native: 0.70.6
|
||||
react-native-action-button: 2.8.5
|
||||
react-native-blob-util: 0.17.3
|
||||
react-native-camera: 4.2.1
|
||||
react-native-dialogbox: 0.6.10
|
||||
react-native-document-picker: 8.2.0
|
||||
@@ -4985,6 +4986,7 @@ __metadata:
|
||||
react-native-version-info: 1.1.1
|
||||
react-native-vosk: 0.1.12
|
||||
react-native-webview: 11.26.1
|
||||
react-native-zip-archive: 6.0.9
|
||||
react-redux: 7.2.9
|
||||
redux: 4.2.1
|
||||
rn-fetch-blob: 0.12.0
|
||||
@@ -27278,6 +27280,19 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"react-native-blob-util@npm:0.17.3":
|
||||
version: 0.17.3
|
||||
resolution: "react-native-blob-util@npm:0.17.3"
|
||||
dependencies:
|
||||
base-64: 0.1.0
|
||||
glob: ^7.2.3
|
||||
peerDependencies:
|
||||
react: "*"
|
||||
react-native: "*"
|
||||
checksum: 32121a10f6015b97c1a2fd4aa089c68855098b8cfc706c8fa36efb1f8aa601d8275b64ebb3d81877f93d818301891d8cdca2218f09a88b02cf9a374461ed02e2
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"react-native-camera@npm:4.2.1":
|
||||
version: 4.2.1
|
||||
resolution: "react-native-camera@npm:4.2.1"
|
||||
@@ -27584,6 +27599,16 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"react-native-zip-archive@npm:6.0.9":
|
||||
version: 6.0.9
|
||||
resolution: "react-native-zip-archive@npm:6.0.9"
|
||||
peerDependencies:
|
||||
react: ">=16.8.6"
|
||||
react-native: ">=0.60.0"
|
||||
checksum: 96c83864a596fcd8a82f55a01fa5e97822c9e80c7cf55de6b011a27cc436fbf58371207cb61c63b19dbd22b852ee62b95935358b4b9a73686695133dffdcfe27
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"react-native@npm:0.70.6":
|
||||
version: 0.70.6
|
||||
resolution: "react-native@npm:0.70.6"
|
||||
|
Reference in New Issue
Block a user