Cthulhu is no longer a fork. Now it is a screen reader written in Golang.
This commit is contained in:
1 parent
a998fe67de
commit
069fc674dc
708 files changed
+112482
-532
No files matched your search
@@ -0,0 +1,24 @@
|
||||
// Copyright (c) 2026 Storm Dragon
|
||||
// Authors: Storm Dragon, Angus Kola
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
package sound
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
)
|
||||
|
||||
var speechBeepWAV = tone_wav(440, 40*time.Millisecond, 0.35, 5*time.Millisecond)
|
||||
|
||||
// SpeechBeep replaces an utterance, independently of role-sound enablement or
|
||||
// theme availability. The speech worker owns its ordering and cancellation;
|
||||
// sound preferences still supply the output sink and volume.
|
||||
func (service *Service) SpeechBeep(ctx context.Context) error {
|
||||
service.mutex.Lock()
|
||||
player, volume := service.player, service.volume
|
||||
service.mutex.Unlock()
|
||||
beepContext, cancelBeep := context.WithTimeout(ctx, 3*time.Second)
|
||||
defer cancelBeep()
|
||||
return player.Play(beepContext, speechBeepWAV, volume, 0)
|
||||
}
|
||||
Reference in new issue
Block a user