Wednesday, November 29, 2023

speaking text with vim

so i was playing with the firefox plugin vimium, using it to navigate around, then realized you can also use visual mode to select blocks of text. selecting is the most annoying thing to do with the mouse. Now it became super easy and that got me thinking..

what if i got it to speak the text?

yeah so what you need to do to get this to work is 3 things

the three things

  1. install xclip
  2. install espeak
  3. make a bash script
  4. don't forget to


    	
    		chmod +x speak.sh
    	
    

the bash

	
		#!/bin/bash
		xclip -o | espeak
	

use mc to move it to my bash script directory. Create an alias for it

	
		alias speak='/home/mint/Documents/bashscripts/speak.sh'
	

No comments:

Post a Comment