From dfa17ce1ab8460ff9c03fdfd4781e56133c518fd Mon Sep 17 00:00:00 2001 From: Crisciany Silva Date: Tue, 27 Feb 2024 12:26:10 -0400 Subject: [PATCH] add description code example Signed-off-by: Crisciany Silva --- README.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a6e6763..984426b 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,26 @@ # PHP wrapper for eSpeak NG -### About eSpeak NG +## About eSpeak NG eSpeak is a free and open-source, cross-platform, compact, software speech synthesizer. -### About eSpeak NG in this project +## About eSpeak NG in this project Thinking about accessibility for visually impaired users when they need to fill out the contact form. We decided to implement the eSpeak NG library, which has the functionality to speak captcha characters. -### Library Documentation +## Example + +```php +header('Content-Type: audio/wav'); +header('Content-Disposition: inline;filename=captcha.wave'); + +echo (new Espeak()) + ->setOption('stdout') + ->setOption('s', '110') + ->setOption('v', (new Espeak())->getVoiceCode($_SERVER['HTTP_ACCEPT_LANGUAGE'])) + ->execute('Hello World'); +``` + +## Library Documentation https://github.com/espeak-ng/espeak-ng \ No newline at end of file