kolserdav / ana

Application for composing texts in another language
GNU Affero General Public License v3.0
23 stars 1 forks source link

the microphone's always recording #81

Closed Wjxfi closed 1 year ago

Wjxfi commented 1 year ago

я думаю что это баг. Он должен записывать только когда я нажимаю на кнопку записи.

kolserdav commented 1 year ago

The application does not record audio, signals that the microphone uses a few seconds when loading the page, which is due to obtaining permission to use the microphone in the standard way. https://github.com/kolserdav/ana/blob/bb17eff8b204307a064cd8285867a43658cd199f/packages/app/components/Translate.hooks.tsx#L795-L806 Access to a microphone is required for webkitSpeechRecognition to work by pressing the microphone icon in the lower right corner of the text input field.

Wjxfi commented 1 year ago

The application does not record audio, signals that the microphone uses a few seconds when loading the page, which is due to obtaining permission to use the microphone in the standard way.

it's not a few seconds. It's the whole time I'm on the page.

Wjxfi commented 1 year ago

please somehow make the microphone record only when the record button is pressed.

Wjxfi commented 1 year ago

The app that shows this: miui system and https://www.f-droid.org/packages/com.aravi.dot/

kolserdav commented 1 year ago

Recording from a microphone in the application is not implemented at all, the MediaStream parameter is not even declared inside getUserMedia.then((stream) => {}) in the web part. And there is no code related to the microphone API in the Android part at all. The SafeDot application signals that this application has access to the microphone, and not that it is allegedly recording, but correctly assumes that if a recording can be made, then most likely it is being done, since in what it is the moment the application starts recording that SafeDot as a third-party service will not be able to identify.

Therefore, it is not possible to make a "record" point only when a key is pressed. Because after granting permission to use the microphone, this app will always have a dot for SafeDot until the permission to use the microphone is revoked from the app and the use of the microphone is disabled on first launch.