-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(text-to-speech): update extension details for publishing
- Loading branch information
Showing
22 changed files
with
121 additions
and
57 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Version 0.1.0 | ||
|
||
Initial release of the _Convert Text to Speech_ extension. |
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
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
This extension converts text from Firestore documents into speech using the Google Cloud Text-to-Speech API. | ||
|
||
Upon install you will be asked to provide a Firestore collection path and a Storage path. Any document writes to this collection will trigger a Cloud Function that does the following: | ||
|
||
* Generates an audio version of the same text | ||
* Stores it in Cloud Storage in the specified path | ||
* Writes the path to the Storage object back in the same document. | ||
|
||
## Use Cases | ||
* Accessibility: A key strength of TTS lies in fostering inclusive access to digital content for people with visual impairments or who face reading challenges. By utilizing TTS, we can work towards providing equal opportunities for everyone to obtain information, acknowledging and embracing the diverse abilities and requirements of all users. | ||
* Language learning: TTS can be a handy tool for language learners, as it can help users to practice their pronunciation and improve their listening comprehension. By providing accurate and natural-sounding speech, TTS can help language learners to develop their language skills in a more immersive and interactive way. | ||
* Navigation: In-car navigation systems often use TTS to give drivers turn-by-turn directions. TTS can help drivers keep their eyes on the road and avoid distractions by providing spoken instructions, improving safety. | ||
* Virtual assistants: Virtual assistants like Siri, Alexa, and Google Assistant rely heavily on TTS to provide users with helpful information and complete tasks. Using TTS, virtual assistants can create a more natural and conversational experience for users, enhancing their overall usability. | ||
|
||
## Additional Setup | ||
|
||
Before installing this extension, make sure that you've set up a [Cloud Firestore database](https://firebase.google.com/docs/firestore/quickstart) and [Cloud Storage bucket](https://firebase.google.com/docs/storage) in your Firebase project. | ||
|
||
## Billing | ||
|
||
To install an extension, your project must be on the Blaze (pay as you go) plan. | ||
|
||
You will be charged a small amount (typically around $0.01/month) for the Firebase resources required by this extension (even if it is not used). | ||
|
||
This extension uses other Firebase and Google Cloud Platform services, which have associated charges if you exceed the service's no-cost tier: | ||
|
||
* [Google Cloud Text-to-Speech API](https://cloud.google.com/text-to-speech#section-11) | ||
* Cloud Firestore | ||
* Cloud Storage | ||
* Cloud Functions (Node.js 14+ runtime. See [FAQs](https://firebase.google.com/support/faq#extensions-pricing)) |
6 changes: 3 additions & 3 deletions
6
firestore-text-to-speech/README.md → text-to-speech/README.md
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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...re-text-to-speech/functions/src/config.ts → text-to-speech/functions/src/config.ts
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
16 changes: 16 additions & 0 deletions
16
...ore-text-to-speech/functions/src/index.ts → text-to-speech/functions/src/index.ts
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
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright 2023 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import * as tts from '@google-cloud/text-to-speech'; | ||
|
||
export type ISynthesizeSpeechRequest = | ||
tts.protos.google.cloud.texttospeech.v1.ISynthesizeSpeechRequest; | ||
export type ISynthesizeSpeechResponse = | ||
tts.protos.google.cloud.texttospeech.v1.ISynthesizeSpeechResponse; | ||
export type AudioEncoding = | ||
| tts.protos.google.cloud.texttospeech.v1.AudioEncoding | ||
| 'AUDIO_ENCODING_UNSPECIFIED' | ||
| 'LINEAR16' | ||
| 'MP3' | ||
| 'OGG_OPUS' | ||
| 'MULAW' | ||
| 'ALAW'; | ||
export type SsmlVoiceGender = | ||
tts.protos.google.cloud.texttospeech.v1.SsmlVoiceGender; |
15 changes: 15 additions & 0 deletions
15
...tore-text-to-speech/functions/src/util.ts → text-to-speech/functions/src/util.ts
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
File renamed without changes.