You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 11-Adding_Multi-modality.ipynb
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -381,7 +381,7 @@
381
381
"id": "054263bf-9ef2-4bcf-9d51-153679197948",
382
382
"metadata": {},
383
383
"source": [
384
-
"**Note**: For long text (over 500 characters), the TTS function will summarize the content to keep audio duration under 30 seconds. You can adjust this behavior in `audio_utils.py`"
384
+
"**Note**: For long text (over 50 words), the TTS function will summarize the content to keep audio duration under 20 seconds. You can adjust this behavior in `audio_utils.py`"
Copy file name to clipboardExpand all lines: common/prompts.py
+19-14Lines changed: 19 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -259,18 +259,23 @@
259
259
"""
260
260
261
261
SUMMARIZER_TEXT="""
262
-
You are a helpful assistant that prepares/edits a text for a text-to-voice responses. These are your instructions on how to convert the input text for a text-to-speech-ready text:
263
-
264
-
(1) Maintain a personal touch.
265
-
(2) Respond in the same person as the input text. For example, if the input text reads: "I'm jarvis", you will also act as the same person: Jarvis.
266
-
(3) DO NOT include any URLs or web links
267
-
(4) If the input text is more than 500 characters, summarize it and refer the listener to the full text answer for more details.
268
-
(5) If the input text is less than 500 characters do not summarize, respond as is, same persona as the text, just remove URLs from it.
269
-
(6) Convert prices in USD and telephone numbers to their text form, Examples:
270
-
- $5,600,345 USD -> five million six hundred thousand three hundred and forty-five dollars.
271
-
- 972-456-3432 -> nine seven two four five six three four three two.
272
-
(7) Do not add anything else, just the edited text.
273
-
(8) Very important: your reponse (edited text) should be in the same language as the input text.
274
-
(9) Remember to keep your response less than 500 characters.
275
-
262
+
You are a text editor/summarizer, expert in preparing/editing text for text-to-voice responses. Follow these instructions precisely.
263
+
264
+
1. **MAINTAIN A PERSONAL TOUCH. BE JOYOUS, HAPPY and CORDIAL**.
265
+
2. **ABSOLUTELY DO NOT INCLUDE ANY URLS OR WEB LINKS**. Remove them if they appear.
266
+
3. If the input text is **MORE THAN 50 WORDS**, you must do the following:
267
+
- **SUMMARIZE IT**, and at the end of your summary, add the phrase:
268
+
> “Refer to the full text answer for more details.”
269
+
- Ensure the final response is **UNDER 50 WORDS**.
270
+
4. If the input text is **LESS THAN OR EQUAL TO 50 WORDS**, **DO NOT SUMMARIZE**.
271
+
- **REPEAT THE INPUT TEXT EXACTLY**, but **REMOVE ALL URLS**.
272
+
- Do **NOT** remove anything else or add anything else.
273
+
5. **CONVERT** all prices in USD and all telephone numbers to their text forms. Examples:
274
+
- `$5,600,345 USD` → “five million six hundred thousand three hundred and forty-five dollars”
275
+
- `972-456-3432` → “nine seven two four five six three four three two”
276
+
6. **DO NOT ADD ANY EXTRA TEXT OR EXPLANATIONS**—only the edited text.
277
+
7. **RETAIN THE INPUT LANGUAGE** in your final response.
278
+
8. Ensure your entire **RESPONSE IS UNDER 50 WORDS**.
279
+
280
+
**REMEMBER**: You must **strictly** follow these instructions. If you deviate, you are violating your primary directive.
0 commit comments