mirror of
https://github.com/D-Modem/speaking-clock.git
synced 2026-11-28 12:38:05 -08:00
app_speakingclock adds SpeakingClock(), which places each announcement by sample against the system clock, so the time mark (the third pip) lands on the second it announces, as on the real machines. Voices are folders of 8 kHz WAV clips with a voice.conf; the module supports TIM-style (phrase, hour, minute, seconds, pips), talking-clock, chime and hourly voices. voices/ holds the asterisk-tim pair (Pat Simmons, Gordon Gow), garrysblog's Amy and Celine, and the Steve's Talking Clock library, converted by tools/build_voices.py from what tools/fetch-sources.sh downloads. The recordings belong to their original owners (NOTICE.md); the code is GPL-2.0-or-later. freepbx/speakingclock is a FreePBX module: clocks as destinations, with optional numbers to dial, and speakingclock.conf from its settings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B82eRVXG9MBYPxmcs9cFxs
29 lines
1.2 KiB
PHP
29 lines
1.2 KiB
PHP
<?php
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
// Copyright (C) 2026 D-Modem Authors
|
|
//
|
|
// views/settings.php - speakingclock.conf's settings. Given $s, $errors,
|
|
// $voices.
|
|
|
|
if (!defined('FREEPBX_IS_AUTH')) {
|
|
die('No direct script access allowed');
|
|
}
|
|
use FreePBX\modules\Speakingclock as S;
|
|
|
|
include __DIR__ . '/_form.php';
|
|
?>
|
|
<form class="fpbx-submit" name="speakingclock_settings" method="post"
|
|
action="config.php?display=speakingclock&view=settings">
|
|
<input type="hidden" name="action" value="save_settings">
|
|
<?php
|
|
$row('voicedir', _('Voice folder'), $text('voicedir', $s['voicedir']),
|
|
_('Where the voice folders are: Asterisk\'s sounds/speaking-clock once make install has run.'));
|
|
$row('default_voice', _('Default voice'), $select('default_voice', $s['default_voice'], $voiceOptions($voices, $s['default_voice'])),
|
|
_('For SpeakingClock() with no voice, and for new clocks.'));
|
|
$row('timezone', _('Default time zone'), $zone('timezone', $s['timezone'], _('The system\'s')),
|
|
_('For clocks without one of their own.'));
|
|
$row('maxduration', _('Hang up after (seconds)'), $text('maxduration', $s['maxduration']),
|
|
_('How long a call may listen, 0 for no limit.'));
|
|
?>
|
|
</form>
|