-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add SpeechDispatcher symbol level support.
- Loading branch information
m1maker
authored and
m1maker
committed
Oct 18, 2024
1 parent
c754e46
commit 1c26701
Showing
34 changed files
with
5,119 additions
and
5,109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,47 @@ | ||
name: CMake Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up CMake | ||
uses: jwlawson/actions-setup-cmake@v2 | ||
with: | ||
cmake-version: '3.25.0' | ||
|
||
- name: Install packages | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libspeechd-dev | ||
- name: Configure CMake | ||
run: cmake . -B build -DCMAKE_OSX_ARCHITECTURES=x86_64 | ||
|
||
- name: Build with CMake | ||
run: cmake --build build --config Release | ||
|
||
|
||
|
||
- name: Archive artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.os }}-build | ||
path: build | ||
|
||
|
||
name: CMake Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up CMake | ||
uses: jwlawson/actions-setup-cmake@v2 | ||
with: | ||
cmake-version: '3.25.0' | ||
|
||
- name: Install packages | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libspeechd-dev | ||
- name: Configure CMake | ||
run: cmake . -B build -DCMAKE_OSX_ARCHITECTURES=x86_64 | ||
|
||
- name: Build with CMake | ||
run: cmake --build build --config Release | ||
|
||
|
||
|
||
- name: Archive artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.os }}-build | ||
path: build | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
# Prerequisites | ||
*.d | ||
|
||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Compiled Dynamic libraries | ||
*.so | ||
*.dylib | ||
*.dll | ||
|
||
# Fortran module files | ||
*.mod | ||
*.smod | ||
|
||
# Compiled Static libraries | ||
*.lai | ||
*.la | ||
*.a | ||
*.lib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
# Other | ||
.vs/ | ||
out/ | ||
Release/ | ||
*.pyc | ||
*.pyd | ||
# Prerequisites | ||
*.d | ||
|
||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Compiled Dynamic libraries | ||
*.so | ||
*.dylib | ||
*.dll | ||
|
||
# Fortran module files | ||
*.mod | ||
*.smod | ||
|
||
# Compiled Static libraries | ||
*.lai | ||
*.la | ||
*.a | ||
*.lib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app | ||
# Other | ||
.vs/ | ||
out/ | ||
Release/ | ||
*.pyc | ||
*.pyd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,46 @@ | ||
import time | ||
|
||
import sral | ||
|
||
def sleep_ms(milliseconds): | ||
time.sleep(milliseconds / 1000.0) # Convert milliseconds to seconds | ||
|
||
def main(): | ||
text = "" | ||
# Initialize the SRAL library | ||
instance = sral.Sral(32) | ||
|
||
instance.register_keyboard_hooks() | ||
|
||
# Speak some text | ||
if instance.get_engine_features(0) & 128: | ||
text = input("Enter the text you want to be spoken:\n") | ||
instance.speak(text, False) | ||
|
||
# Output text to a Braille display | ||
if instance.get_engine_features(0) & 256: | ||
text = input("Enter the text you want to be shown on braille display:\n") | ||
instance.braille(text) | ||
|
||
# Delay example | ||
instance.output("Delay example: Enter any text", False) | ||
instance.delay(5000) | ||
instance.output("Press enter to continue", False) | ||
input() # Wait for user to press enter | ||
|
||
instance.stop_speech() # Stops the delay thread | ||
|
||
# Speech rate | ||
if instance.get_engine_features(0) & 512: | ||
rate = instance.get_rate() | ||
max_rate = rate + 10 | ||
for rate in range(rate, max_rate): | ||
instance.set_rate(rate) | ||
instance.speak(text, False) | ||
sleep_ms(500) | ||
|
||
# Uninitialize the SRAL library | ||
instance = None | ||
if __name__ == "__main__": | ||
main() # invoke_main() | ||
|
||
import time | ||
|
||
import sral | ||
|
||
def sleep_ms(milliseconds): | ||
time.sleep(milliseconds / 1000.0) # Convert milliseconds to seconds | ||
|
||
def main(): | ||
text = "" | ||
# Initialize the SRAL library | ||
instance = sral.Sral(32) | ||
|
||
instance.register_keyboard_hooks() | ||
|
||
# Speak some text | ||
if instance.get_engine_features(0) & 128: | ||
text = input("Enter the text you want to be spoken:\n") | ||
instance.speak(text, False) | ||
|
||
# Output text to a Braille display | ||
if instance.get_engine_features(0) & 256: | ||
text = input("Enter the text you want to be shown on braille display:\n") | ||
instance.braille(text) | ||
|
||
# Delay example | ||
instance.output("Delay example: Enter any text", False) | ||
instance.delay(5000) | ||
instance.output("Press enter to continue", False) | ||
input() # Wait for user to press enter | ||
|
||
instance.stop_speech() # Stops the delay thread | ||
|
||
# Speech rate | ||
if instance.get_engine_features(0) & 512: | ||
rate = instance.get_rate() | ||
max_rate = rate + 10 | ||
for rate in range(rate, max_rate): | ||
instance.set_rate(rate) | ||
instance.speak(text, False) | ||
sleep_ms(500) | ||
|
||
# Uninitialize the SRAL library | ||
instance = None | ||
if __name__ == "__main__": | ||
main() # invoke_main() | ||
Oops, something went wrong.