[WordPress] 外掛分享: WP Alexa Flash Briefing

首頁外掛目錄 › WP Alexa Flash Briefing
WordPress 外掛 WP Alexa Flash Briefing 的封面圖片
40+
安裝啟用
★★★★★
5/5 分(3 則評價)
2562 天前
最後更新
問題解決
WordPress 4.7+ PHP 5.6+ v1.6.0 上架:2018-12-01

內容簡介

WordPress 的 Alexa Flash Briefing 外掛程式

這是一款 WordPress 外掛程式,會建立一個名為“briefing”的新文章類型,讓您可以建立與 Alexa Flash Briefing 兼容的文章,就像在 WordPress 中建立任何其他文章一樣。它使用這些文章來經由 API 建立 Alexa 技能的供稿。

您可以像建立一般文章一樣建立您的簡報內容。以下是它的工作方式,以決定文字轉音訊或音訊檔案:

如果文章內容有任何的連結/ URL,外掛程式會取出第一個連結作為音訊串流,但不會驗證或捕捉錯誤!
如果文章內容沒有連結,它會假定您想要文字轉音訊 (但這個也必須在您的 Amazon 開發端進行設定)。

為了安全起見,建議您只添加 HTTPS 的音訊檔案的 URL。但是如果您同時也想要讓其他人到您的網站聆聽,您也可以在文章內添加其他的文字。WordPress 會內嵌/ oembed 您上傳的 MP3 文件,所以使用者可以在網頁上聽取。

Alexa 使用方式

使用以下網址作為您的 Alexa 技能 URL:

https://your-domain.com/wp-json/alexa-fb/v1/briefings/

這樣就會發布所有類別 (1) 的最新簡報。如果要更改限制範圍 (請注意,Amazon 的限制是 5),請使用:

/wp-json/alexa-fb/v1/briefings/?limit=5

如果您想要建立多個供稿,可以使用分類。只需將分類參數添加到終點:

/wp-json/alexa-fb/v1/briefings/?category=myflashbriefcat

這讓您可以在同一個安裝中使用多個供稿!

供稿 API 程式會將每個類別每個限制的結果快取在期限內,預設為 1 小時。如果要更改快取時間或每個供稿關閉快取,請使用快取參數。0 代表關閉該供稿的快取,1 代表 1 小時 (預設),3 代表 3 小時,0.5 代表 30 分鐘等。

只需將快取參數加到終點:

/wp-json/alexa-fb/v1/briefings/?cache=0

所有參數都可以共同使用。

注意事項

您必須使用安全的域名以及安全的連結方式來存取您的音訊檔案 (音訊檔案和供稿 URL 必須使用 HTTPS)。
如果您要使用文字轉音訊,您的簡報內容不能包含任何 HTML 標籤。
您可以像建立一般文章一樣草擬和排定簡報。
如果您想要在社交媒體上分享簡報而不干擾 Alexa 的功能,您可以使用摘要和特色圖片選項。

(此外掛程式與 Amazon 無關。)

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.6.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「WP Alexa Flash Briefing」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Alexa Flash Briefing Plugin for WordPress
This is a WordPress plugin that creates a new post type of “briefing” that lets you create Alexa Flash Briefing compatible posts just like you would anything else in WordPress. It uses these posts to create a feed for Alexa skills through the API.
Create your briefings like regular posts. Here’s how it works to determine a text to speech or audio file:

If you have ANY links/URLs in the post content, the plugin takes the FIRST link and uses it as the audio stream. It does not validate or catch errors!
If there’s no link in the post content, it will assume you want text to speech (but this must also be selected on your Amazon dev end too).

It is safest to just put a HTTPS url to your audio file, but you may add other text in the post if you are also sending people to your site to listen. WordPress will oembed the MP3 file you post, so users will be able to listen on the web.
Alexa Usage
Use this URL for your Alexa skill:
https://your-domain.com/wp-json/alexa-fb/v1/briefings/

That will post the latest briefing from all categories (1). To change the limit (be advised Amazon’s limit is 5), use:
/wp-json/alexa-fb/v1/briefings/?limit=5

If you want to create multiple feeds, use categories. Just add the category param to the end point:
/wp-json/alexa-fb/v1/briefings/?category=myflashbriefcat

This lets you use the same install for many feeds!
The feed API will cache in transients the result per category per limit for a default of 1 hour. To change the cache time or turn off caching per feed, use the cache param. 0 turns off caching for that feed, 1 for 1 hour (default), 3 for 3 hours, 0.5 for 30 mins, etc.
Just add the cache param to the end point:
/wp-json/alexa-fb/v1/briefings/?cache=0

All params can be used together.
Notes

You MUST use a secure domain and secure links to your audio files (https for the audio files and the feed URL).
Your briefing content shouldn’t contain any HTML tags if you want to use TTS (text to speech).
You can also draft and schedule briefings like regular posts.
You can use the excerpt and featured image options if you will be sharing your briefing on social media without interfering with Alexa functionality.

(This plugin is not associated with Amazon in any way.)

延伸相關外掛

文章
Filter
Mastodon