This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- src/routes/List.svelte --> | |
| <script> | |
| import { navigateTo } from '$lib/store.js'; | |
| import { createPersistedArray } from '$lib/stores/persisted-store.svelte.js'; | |
| import { icons } from '$lib/images/icons.js'; | |
| import { MicrophoneOutline } from "flowbite-svelte-icons"; | |
| // Используем persisted array для заметок | |
| let records = createPersistedArray('voice-notes', []); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export class SherpaASRClient { | |
| constructor() { | |
| this.ws = null; | |
| this.audioContext = null; | |
| this.workletNode = null; | |
| this.mediaStream = null; | |
| this.isRecording = false; | |
| this.isConnected = false; | |
| this.isShuttingDown = false; | |
| this.sampleRate = 16000; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- src/routes/Asr.svelte --> | |
| <script> | |
| import { onMount, onDestroy } from 'svelte'; | |
| import { navigateTo, currentNoteId } from '$lib/store.js'; | |
| import { createPersistedArray } from '$lib/stores/persisted-store.svelte.js'; | |
| import { SherpaASRClient } from '$lib/asr-client.js'; | |
| import { MicrophoneOutline, CheckOutline } from "flowbite-svelte-icons"; | |
| // import { createTranscriptProcessor } from '$lib/transcript-processor.js'; | |
| // import { createCommandProcessor } from '$lib/command-processor.js'; |