Skip to content

Function definitions that replace fprintf with speech synthesis and fgets with speech recognition.

Notifications You must be signed in to change notification settings

efferifick/speechin-speechout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Speech-in Speech-Out

Proof of concept repo that allows one to replace the standard fgets and fprintf functions with implementations that allow the user to input via speech recognition and the program to output via voice synthesis.

Dependencies

  • espeak
  • deepspeech
  • portaudio
  • curses

Example:

#include <stdio.h>
int
main(int argc, char** argv)
{
  fprintf(stdout, "please say your name\n");
  char name[100];
  fgets(name, 100, stdin);
  fprintf(stdout, "hello %s\n", name);
  return 0;
}
gcc main3.c -lportaudio -lcurses -L./ -ldeepspeech -lespeak-ng speech-in-speech-out.o
LD_LIBRARY_PATH=$PWD ./a.out

Possible extensions

Not sure if it makes sense to make a GCC plugin to perform this translation automatically since it seems the linker is perfectly capable of doing it itself.

  • Remove magic constants

About

Function definitions that replace fprintf with speech synthesis and fgets with speech recognition.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages