Wednesday, December 6, 2017

Text to Speech in ABAP

1. Define the text, ole and voice object


DATA : ole   TYPE ole2_object,
       voice TYPE ole2_object,
       text   TYPE string.

2. Create the object

CREATE OBJECT voice 'SAPI.SpVoice'.


3. Define the text to be voiced

text = 'Hello World'.

4. Call the method

CALL METHOD OF voice 'Speak' = ole
  EXPORTING #1 = text. 


No comments:

Post a Comment