TStringGrid lazarus / 31-LCL ---------------------------------------------------------------------- kogs · 2014-02-25 15:33 Aphasia - http://en.wikipedia.org/wiki/Aphasia Speech -> TStringGrid? kogs ---------------------------------------------------------------------- Bart · 2014-02-25 16:02 The question being? Th attachment is unreadable b.t.w. Bart ---------------------------------------------------------------------- kogs · 2014-02-26 14:44 |  \/ ---------------------------------------------------------------------- Rails · 2014-02-26 15:54 Your attachment is too small. The text can't be read. ---------------------------------------------------------------------- kogs · 2014-02-26 17:10 espeak (speak) - yes cbxAss: TComboBox - yes setEdit: TSpinEdit - yes sgdQuantityList: TStringGrid - no kogs ---------------------------------------------------------------------- Bart · 2014-02-26 17:26 You mean that speech-to-text does not work in a TStringGrid, but it does in a TEdit and a TCombobox? Please learn how to ask questions. It's a guessing game for us now. If you do not speak English, then use google translate and post the translated and the text in the original language in your post. Bart ---------------------------------------------------------------------- engkin · 2014-02-26 18:56 The text in the grid shows question marks instead of proper characters preventing text-to-speech software from working properly. The software is needed for a person with speech (and in general language) problem. ---------------------------------------------------------------------- Fred vS · 2014-02-26 19:13 @ Kogs : If you have problem with the assistve-speaker of Mac (or Linux or Windows), you may use the sak assistive kit for Lazarus-fpc : https://github.com/fredvs/sak There are examples, you do not have to install anything, just compile and run the examples. In examples there is a TStringGrid too. [EDIT] It seams that you are using Mac OSX. I just added the compiled Mac version of espeak (but do not have tested it, i do not have a Mac...), Just point to that binary instead of Linux/Windows. ---------------------------------------------------------------------- engkin · 2014-02-26 19:52 The é (e acute?) in Purée got two question marks? I think you need to convert the text to UTF8 before passing it to the StringGrid. Maybe you can try to use UTF8Encode: Code: [Select]  StringGrid1.Cells[iCol, iRow] := UTF8Encode(SomeText); Edit: I see from the picture that your data came from an XML file (asd.xml). What are you using to get this XML file? ---------------------------------------------------------------------- kogs · 2014-02-27 12:57 Quote from: Fred vS on February 26, 2014, 08:13:13 pmIf you have problem with the assistve-speaker of Mac (or Linux or Windows), you may use the sak assistive kit for Lazarus-fpc : https://github.com/fredvs/sak ok --------------------------------- Quote from: engkin on February 26, 2014, 08:52:17 pmThe é (e acute?) in Purée got two question marks? ok -------------------------- {--------------------------------------------------------------------- ----------   procedure MenuItemEditSpeechStartClick ---------------------------------------------------------------------- ---------} procedure TfrmMain.MenuItemEditSpeechStartClick(Sender: TObject); var   stringA: String; begin   Process1.Active := False;   MenuItemEditSpeechStop.Enabled := True;   case kogsMain of     aCbxAss: begin                if cbxAss.Items.Text = '' then                begin                  stringA := cbxAss.Text;                end                else                begin                  stringA := cbxAss.Items.Text;                end;              end;     aSetEdit: stringA := setEdit.Text;     aSgdQuantityList: stringA := sgdQuantityList.Columns.ToString;   end; //  Process1.Executable := kSpeak; //  Process1.Parameters.Add('''' + stringA + '''');   Process1.CommandLine := kSpeak + ' ''' + stringA + '''';   Process1.Execute;   Process1.Active := True; end;                                            -.Columns.ToString - no -.Columns.? - yes ----------------------------- England -> Aphasia!  http://en.wikipedia.org/wiki/Aphasia kogs ---------------------------------------------------------------------- engkin · 2014-02-27 13:25 You can get the text in one cell: Code: [Select]  stringA := StringGrid1.Cells[iCol, iRow]; If you need the text in a row: Code: [Select]function RowText(StringGrid: TStringGrid; iRow: integer): string; var   iCol: integer; begin   Result := '';   for iCol := StringGrid.FixedCols to StringGrid.Columns.Count-1;     Result := Result + StringGrid.Cells[iCol, iRow] + ' '; end; If you need the text in a column: Code: [Select]function ColText(StringGrid: TStringGrid; iCol: integer): string; var   iRow: integer; begin   Result := '';   for iRow := StringGrid.FixedRows to StringGrid.Rows.Count-1;     Result := Result + StringGrid.Cells[iCol, iRow] + ' '; end; ---------------------------------------------------------------------- Fred vS · 2014-02-27 14:11 Quote    If you have problem with the assistve-speaker of Mac (or Linux or Windows), you may use the sak assistive kit for Lazarus-fpc :     https://github.com/fredvs/sak ok Updated version of sak working for Mac osx => https://github.com/fredvs/sak. Just compile the examples and run-it. ---------------------------------------------------------------------- kogs · 2014-02-27 16:11 aSgdQuantityList: begin                         with sgdQuantityList do                           with Selection do                             for i := Top + 0 to Bottom do                               for j := Left + 0 to Right do                                 stringA := stringA + Cells[j, i];                     end;                        ok ----------- Quote from: Fred vS on February 27, 2014, 03:11:02 pmQuoteUpdated version of sak working for Mac osx => https://github.com/fredvs/sak. Just compile the examples and run-it. ok kogs ---------------------------------------------------------------------- kogs · 2014-02-27 16:20 Quote from: engkin on February 26, 2014, 08:52:17 pmThe é (e acute?) in Purée got two question marks? I think you need to convert the text to UTF8 before passing it to the StringGrid. Maybe you can try to use UTF8Encode: Code: [Select]  StringGrid1.Cells[iCol, iRow] := UTF8Encode(SomeText); Edit: I see from the picture that your data came from an XML file (asd.xml). What are you using to get this XML file? no kogs ---------------------------------------------------------------------- engkin · 2014-02-27 16:30 Quote from: kogs on February 27, 2014, 05:11:43 pm    aSgdQuantityList: begin                         with sgdQuantityList do                           with Selection do                             for i := Top + 0 to Bottom do                               for j := Left + 0 to Right do                                 stringA := stringA + Cells[j, i];                     end;                        You might want to add spaces: Code: [Select]                stringA := stringA + Cells[j, i] + ' ';