I refactored the entire code, all in Python, and click here to see more details. Voice Chat Robot second Edition
————————————————————————————————————————
————————————————————————————————————————
Note: From the following code I have given up maintenance, can learn from the idea of the Austrian, with Baidu Voice can realize speech recognition
Use method: Terminal Enter/.. /.. /man_machine_interaction/bin/directory, running source first.sh
Implementation process:
Through speech recognition technology to convert speech to text, Turing the life into dialogue data feedback back to the local, speech synthesis technology will be the dialogue data synthesis speech and playback, to achieve
Real-time human-computer voice interaction
Program Development Steps (tree MUI Pie platform):
1: Modify the Samples folder under the three folders in the 32bit_make.sh file, replace x86 with Raspberrypi (if you use first.sh file This operation can be province)
2: Modify the Samples folder under the three folders in the makefile file, the x86 and x64 replaced Raspberrypi
3: Create frist.sh
4: New write_text.txt,read_text.txt,man.wav and tuling.wav four files, stored program running process of the intermediate variables generated
5: New sound_to_text.py,text_to_sound.py,turing.py and interface.py four python files, write code to achieve the corresponding function
6: Modify the tts_sample.c file, modify the generated audio name, add read Read_text.txt file code, in the C source program 139 lines add their own AppID
7: Modify the iat_sample.c file, add write Write_text.txt code, add your own AppID in the C source program 238 lines
8: Create iat.sh,tts.sh file
9: Writing Python files
File function Description:
first.sh-> Compile the source code under the Samples folder and generate the executable file to be stored in the Bin folder
-> * * * * * * Enter the bin directory with the Execute source first.sh to start the entire program * * * *-> after execution, three executables will be generated under the Bin folder
-> code content and meaning as detailed in the original document
-> run the Python file, start the program
Write_text.txt-> speech Recognition as text content will be stored in this document, this document must be in the Iat_sample.c file to add the corresponding code to the feedback text
-> write this TXT file for Turing to read
Read_text.txt-> Store Turing feedback data for speech synthesis program read, this file is written by turing.py file, store Turing feedback text content, for
-> tts_sample.c Read Man.wav-> Voice audio will be stored in this file
Turing.wav-> synthesized speech will be stored in this file for playback, this file is generated by the tts_sample.c file, modify this C file to modify the default name
sound_to_text.py-> provides voice to text function
text_to_sound.py-> provides text-to-speech function
turing.py-> provides man-machine conversation function (Turing)
interface.py-> main program and software interface (do not intend to use Tkiter to write the interface, interested in can write their own)
Tts.sh-> is used to start in any directory Tts_sample
Iat.sh-> is used to start in any directory Iat_sample
Again.wav-> I did not hear clearly, I have the ability you are talking to me over the audio
SDK Documentation Description-> SDK File function Description, modify C source program can be modified according to this document
Note:
1: The sound card in each run of the program will malfunction, run the program before reseating the plug can be
2: Speech recognition and speech synthesis is the Hkust's fast-flying interface, the dialogue part is the interface of the Turing-generator human
3: What do not understand can qq:1879369860 contact me
4:readme.txt files in the bin directory, first look at the
5:linux Platform SDK source code (support raspberry pie). zip for voice support Raspberry sent the Source SDK file, now the message fly canceled the support of the Raspberry faction, it must use the old version
6:man_machine_interaction.zip for my own raspberry voice chat robot
7: Download Address http://download.csdn.net/detail/lingdongtianxia/9837317