ggerganov commited on
Commit
cb89806
·
unverified ·
1 Parent(s): 6f8ab0e

Update README.md

Browse files
Files changed (1) hide show
  1. examples/whisper.nvim/README.md +11 -3
examples/whisper.nvim/README.md CHANGED
@@ -52,6 +52,10 @@ https://user-images.githubusercontent.com/1991296/198382564-784e9663-2037-4d04-9
52
  vnoremap <C-G> c<C-O>:!whisper.nvim<CR><C-O>:let @a = system("cat /tmp/whisper.nvim \| tail -n 1 \| xargs -0 \| tr -d '\\n' \| sed -e 's/^[[:space:]]*//'")<CR><C-R>a
53
  ```
54
 
 
 
 
 
55
  You are now ready to use speech-to-text in Neovim!
56
 
57
  ## TODO
@@ -67,10 +71,14 @@ There are a lot of ways to improve this idea and I don't have much experience wi
67
 
68
  This is probably a very long shot, but I think it will be very cool to have the functionality to select some code and then hit Ctrl-G and say something like:
69
 
70
- *refactor this using stl containers*
71
 
72
  or
73
 
74
- *optimize by sorting the data first*
75
 
76
- The plugin would then make an appropriate query using the selected text and some context to Copilot or GPT-3 and return the result.
 
 
 
 
 
52
  vnoremap <C-G> c<C-O>:!whisper.nvim<CR><C-O>:let @a = system("cat /tmp/whisper.nvim \| tail -n 1 \| xargs -0 \| tr -d '\\n' \| sed -e 's/^[[:space:]]*//'")<CR><C-R>a
53
  ```
54
 
55
+ Explanation: pressing `Ctrl-G` runs the [whisper.nvim](whisper.nvim) script which in turn calls the `stream` binary to transcribe your speech through the microphone. The results from the transcription are continuously dumped into `/tmp/whisper.nvim`. After you kill the program with `Ctrl-C`, the vim command grabs the last line from the `/tmp/whisper.nvim` file and puts it under the cursor.
56
+
57
+ Probably there is a much more intelligent way to achieve all this, but this is what I could hack in an hour. Any suggestions how to improve this are welcome.
58
+
59
  You are now ready to use speech-to-text in Neovim!
60
 
61
  ## TODO
 
71
 
72
  This is probably a very long shot, but I think it will be very cool to have the functionality to select some code and then hit Ctrl-G and say something like:
73
 
74
+ *"refactor this using stl containers"*
75
 
76
  or
77
 
78
+ *"optimize by sorting the data first"*
79
 
80
+ The plugin would then make an appropriate query using the selected text and code context to Copilot or GPT-3 and return the result.
81
+
82
+ ## Discussion
83
+
84
+ If you find this idea interesting, you can join the discussion here: https://github.com/ggerganov/whisper.cpp/discussions/108