=== AddSpeech ===
Contributors: addspeech
Tags: speech to text, dictation, voice, accessibility, forms
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 0.3.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Puts a microphone on your forms, so visitors can speak instead of type.

== Description ==

AddSpeech adds a small microphone button to the text fields on your site. A
visitor presses it, talks, and what they said appears in the field as text. It
works on comment boxes, contact forms, support tickets, reviews - anywhere
somebody would otherwise be typing a paragraph on a phone.

This plugin is the connector, not the product. The transcription happens on
AddSpeech's servers, which is why an account is needed: see Installation below.
What the plugin itself does is one thing, and it is worth being plain about it,
because it is very nearly the whole plugin. It writes a single `<script>` tag
into your page's head, carrying the settings you chose. No stylesheet, no block,
no dashboard widget, no database tables, no tracking. Turning the plugin off
removes the tag and leaves your site exactly as it was.

The one other thing it will do, if you ask it to, is keep your key in your
database instead of in your pages, and hand out permission to record on your
behalf - see Installation. That is recommended and it is not required; a site
that leaves the box unticked never opens a connection of its own.

= What you can change =

Everything is optional. A fresh install with just your key pasted in gives you
the standard button, and that is what most sites should keep - the defaults are
maintained centrally and improve over time, and a setting you did not change is
a setting that keeps improving with them.

When you do want to change something:

* **The button** - colour, theme, size, where it sits, whether it makes a sound, what the recording counter looks like, and the label on it.
* **Where it appears** - by default every text area on the site. Include and exclude lists let you narrow that to a section, or keep the microphone off your checkout.
* **Everything else** - which fields it attaches to, its exact colours and corner radius, whether it appears on desktop only, whether it replaces the field's contents or adds to them, the keyboard shortcut, and more. These are tucked behind a fold, because most sites never need them.

The settings screen shows you the exact tag it will write, so you can see what
your choices do before you leave the page.

= Languages =

You do not have to set one. The widget reads the `lang` attribute your theme
already prints, so a Dutch site gets Dutch without being told, and a multilingual
site running WPML, Polylang or TranslatePress gets each page in its own language
automatically. There is a manual override under the advanced settings for the
rare theme that prints no language at all.

= Your theme's colour =

If your theme declares a colour palette - every block theme does - the settings
screen offers your own accent colour as the suggested value. It is only ever a
suggestion: nothing is saved to your site until you save it.

== Installation ==

1. You need an AddSpeech account. Sign up at [addspeech.com](https://addspeech.com/register).
2. In your AddSpeech admin, add this site's domain name. You will get a key for it, starting with `as_pub_`.
3. Install and activate this plugin.
4. Go to **Settings → AddSpeech**, paste the key, and save.

That is the whole setup. The microphone appears on your forms straight away.

There is one key per domain and it does both jobs. It identifies which site a
recording belongs to, and it is tied to the domain you registered it against, so
it is of no use to anybody on any other site.

= Recommended: keep the key on this server =

Pasted and saved, the key is written into your page source, the same way an
analytics key is. The domain check that guards it there stops a browser, and it
does not stop a script: the header a browser sends to say which site it is on is
only a line of text, and a script writes whatever line it likes. So somebody who
copies the key out of your page source can spend your month's recordings from
their own computer.

WordPress is the easiest place there is to close that, because the plugin is
what writes the tag. Tick **Keep the key on this server**, under the key itself,
and the key stops appearing in your pages. From then on your visitors' browsers
ask *your* site for permission to record, your site asks us with the key, and
there is nothing in your page source worth copying.

Worth knowing before you tick it: your site now makes one small request of its
own each time somebody presses the microphone, so a host that blocks outbound
HTTP will stop the microphone working. If that happens, untick it and you are
back where you were.

The recording itself does not change either way. Audio goes from the visitor's
browser straight to AddSpeech and never through your hosting, so nothing gets
slower and no voice data passes through your server.

== Frequently Asked Questions ==

= Do I need an account? =

Yes. The plugin sends nothing anywhere on its own, but the transcription runs on
AddSpeech's servers, and the key is what says whose allowance a recording comes
out of. There is a free tier.

= Does it work with my form plugin? =

Almost certainly. The widget attaches to standard `<textarea>` fields, which is
what Contact Form 7, WPForms, Gravity Forms, Ninja Forms and the WordPress
comment box all produce. If a form uses something unusual, the advanced settings
let you give it a CSS selector of your own.

= Will it slow my site down? =

The script is about fifteen kilobytes, loads from a CDN, and is marked `defer`,
so it is fetched alongside your page and run after it has finished drawing. It
never blocks rendering.

= What about visitors who never press it? =

Nothing happens. No microphone is opened, no permission is requested and no
audio is recorded until somebody presses the button. The browser's own
permission prompt is the first thing they see.

= Can I keep it off certain pages? =

Yes - the "Where it appears" section takes one path per line, and `*` works as a
wildcard. `/checkout/` keeps it off one page, `/support/*` off a whole section.
Leaving both boxes empty means every page, which is what most sites want.

= Somebody could copy my key out of my page source. Does that matter? =

They could, and it is worth a minute of your time to stop it. A key in the page
is readable there, because the browser is what uses it, and the domain check
guarding it stops a browser rather than a script. The fix is one tick box:
**Keep the key on this server**, described under Installation. Your pages then
carry no key at all.

= Does that send my visitors' recordings through my server? =

No, and that is deliberate. Only the permission request goes through your
site - a couple of hundred bytes of JSON, no audio in it. The recording goes
from the visitor's browser straight to AddSpeech, exactly as it does with the
key in the page. Nothing about your upload limit, your PHP workers or your
hosting's data retention comes into it.

= Where do I report a problem? =

The support forum here, or [addspeech.com/contact](https://addspeech.com/contact).

== Privacy ==

This plugin stores one row of settings in your database and nothing else. It
does not collect, log or transmit anything about your visitors.

With the key in your pages it makes no network requests of its own at all - not
on install, not on your admin screens, not on your front end. With the key kept
on this server, it makes exactly one kind: when a visitor presses the
microphone, your site asks AddSpeech for permission to record on its behalf.
That request carries your key and the length limit, and nothing about the
visitor - not their address, not a cookie, not a page they were on. The audio
still never touches your server.

The only thing kept from it is a counter, so a single visitor cannot press the
button five hundred times in a minute. It lives in a transient, it is keyed on a
one-way hash of the address rather than the address itself, and it expires after
two minutes. Your options table never becomes a log of who visited.

The script tag it writes loads the AddSpeech widget from `cdn.addspeech.com`.
When a visitor presses the microphone and speaks, that recording is sent to
AddSpeech for transcription and is not retained afterwards. The full detail,
including what is stored and for how long, is at
[addspeech.com/privacy](https://addspeech.com/privacy).

If your site serves visitors in the EU, that processing is something your own
privacy policy should mention, the same as any other third-party service you
embed.

== Screenshots ==

1. The settings screen: your key, the button's appearance, and the tag it writes.
2. The microphone on a comment form.
3. Recording in progress.

== Changelog ==

= 0.3.0 =
* There is now one key instead of two. The separate private key is gone, and the key you already pasted in is the one that does both jobs.
* **Keep the key on this server** is a tick box under it. Tick it and your pages stop carrying the key at all, which is what the private key used to be for.
* If you were using a private key, tick that box and you are where you were. You can delete the private key in your AddSpeech account; nothing reads it any more.

= 0.2.0 =
* Every setting with a fixed list of answers is now a row of buttons instead of a dropdown, so you can see the choices and compare them without opening anything.
* Your existing settings are untouched by this.

= 0.1.0 =
* First release.

== Upgrade Notice ==

= 0.3.0 =
One key instead of two. If you used a private key, tick "Keep the key on this server" after upgrading to get the same protection.

= 0.2.0 =
The appearance settings are easier to use. Nothing you have already chosen changes.

= 0.1.0 =
First release.
