Page 1 of 1
Output the result
Posted: 26 Feb 2012, 16:53
by takercena
Would anyone guide me how to redirect the output to text file for p300 speller? Like redirecting the "SPELLING IN THE RAIN(S)" to text file? Thank you.
Re: Output the result
Posted: 27 Feb 2012, 07:38
by mellinger
Hi,
I'm not sure what exactly you want to do. In order to save spelled letters, you can do the following as described on the P3Speller wiki page:
http://www.bci2000.org/wiki/index.php/U ... pellerTask
1) Activate the speller's TextWindow, and use the SAVE command to save its contents into a file.
2) Set the speller's DestinationAddress parameter to a UDP port, say localhost:20321. Then, use the AppConnector example application at src/contrib/AppConnectorApplications/SimpleExample to copy data from that port into a text file:
Code: Select all
SimpleExample -r localhost:20321 > YourTextFile.txt
In case you actually want the speller prompt to be copied into a text file, you will need to modify the P3Speller source code. The simplest way to do this will be to add the following after line 908 of P3SpellerTask.cpp:
Code: Select all
ofstream( "YourFile.txt" ) << mGoalText << endl;
The file's path name will be relative to the BCI2000 prog directory.
You will also need to add the following at the top of the file:
Regards,
Juergen