usefulsensors / openai-whisper

Robust Speech Recognition via Large-Scale Weak Supervision
MIT License
62 stars 24 forks source link

Allow to copy text to clipboard on android app #14

Open CounterFlow64 opened 1 year ago

CounterFlow64 commented 1 year ago

I'm not sure if this is a bug or not, but being able to copy the text output to clipboard would make the app... actually usable for my use case. Is this actually not possible, or am I missing something?

nyadla-sys commented 1 year ago

I am unsure of how to add this feature to the Android app as I am not an Android app developer. If someone has an idea, we can include the change in the Android app

jeb2112 commented 1 year ago

It is straightforward, I had implemented it (in about the simplest possible way, ie no error checking) with an earlier codebase example from pytorch running wav2vec2 model:

    import android.content.ClipboardManager;
    ....
    private void copyToClipboard(String text) {
        ClipboardManager clipboard;
        clipboard = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
        ClipData clip = ClipData.newPlainText("simple_text",text);
        clipboard.setPrimaryClip(clip);

    }

will be trying out this same function with this current openai/whisper example soon.

nyadla-sys commented 1 year ago

Great and thanks

Usama9999 commented 1 year ago

Can someone please help me to run this android application. I would be very thankfull