diff --git a/README.md b/README.md index b9e6f1d..c9e6b4d 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ In this demo, we showcase how to use DeerFlow to: - [❓ FAQ](#faq) - [📜 License](#license) - [💖 Acknowledgments](#acknowledgments) +- [⭐ Star History](#star-history) ## Quick Start @@ -465,3 +466,7 @@ A heartfelt thank you goes out to the core authors of `DeerFlow`, whose vision, - **[Henry Li](https://github.com/magiccube/)** Your unwavering commitment and expertise have been the driving force behind DeerFlow's success. We are honored to have you at the helm of this journey. + +## ⭐ Star History + +[![Star History Chart](https://api.star-history.com/svg?repos=bytedance/deer-flow&type=Date)](https://star-history.com/#bytedance/deer-flow&Date) diff --git a/src/podcast/graph/tts_node.py b/src/podcast/graph/tts_node.py index 11aeab0..18e49d4 100644 --- a/src/podcast/graph/tts_node.py +++ b/src/podcast/graph/tts_node.py @@ -16,9 +16,9 @@ def tts_node(state: PodcastState): tts_client = _create_tts_client() for line in state["script"].lines: tts_client.voice_type = ( - "BV033_streaming" if line.speaker == "male" else "BV034_streaming" + "BV002_streaming" if line.speaker == "male" else "BV001_streaming" ) - result = tts_client.text_to_speech(line.text, speed_ratio=1.05) + result = tts_client.text_to_speech(line.paragraph, speed_ratio=1.05) if result["success"]: audio_data = result["audio_data"] audio_chunk = base64.b64decode(audio_data) diff --git a/src/podcast/types.py b/src/podcast/types.py index 4e04627..ec1599d 100644 --- a/src/podcast/types.py +++ b/src/podcast/types.py @@ -8,7 +8,7 @@ from pydantic import BaseModel, Field class ScriptLine(BaseModel): speaker: Literal["male", "female"] = Field(default="male") - text: str = Field(default="") + paragraph: str = Field(default="") class Script(BaseModel): diff --git a/src/prompts/podcast_script_writer.md b/src/prompts/podcast_script_writer.md index d2d35c8..08762d7 100644 --- a/src/prompts/podcast_script_writer.md +++ b/src/prompts/podcast_script_writer.md @@ -11,12 +11,12 @@ You are a professional podcast editor for a show called "Hello Deer." Transform # Output Format -The output should be formatted as a valid, parseable JSON object of `Script` without "```json": +The output should be formatted as a valid, parseable JSON object of `Script` without "```json". The `Script` interface is defined as follows: ```ts interface ScriptLine { speaker: 'male' | 'female'; - text: string; // only plain text, never Markdown + paragraph: string; // only plain text, never Markdown } interface Script { @@ -25,51 +25,6 @@ interface Script { } ``` -# Examples - - -{ - "locale": "en", - "lines": [ - { - "speaker": "male", - "text": "Hey everyone, welcome to the podcast Hello Deer!" - }, - { - "speaker": "female", - "text": "Hi there! Today, we’re diving into something super interesting." - }, - { - "speaker": "male", - "text": "Yeah, we’re talking about [topic]. You know, I’ve been thinking about this a lot lately." - }, - { - "speaker": "female", - "text": "Oh, me too! It’s such a fascinating subject. So, let’s start with [specific detail or question]." - }, - { - "speaker": "male", - "text": "Sure! Did you know that [fact or insight]? It’s kind of mind-blowing, right?" - }, - { - "speaker": "female", - "text": "Totally! And it makes me wonder, what about [related question or thought]?" - }, - { - "speaker": "male", - "text": "Great point! Actually, [additional detail or answer]." - }, - { - "speaker": "female", - "text": "Wow, that’s so cool. I didn’t know that! Okay, so what about [next topic or transition]?" - }, - ... - ] -} - - -> Real examples should be **MUCH MUCH LONGER** and more detailed, with placeholders replaced by actual content. - # Notes - It should always start with "Hello Deer" podcast greetings and followed by topic introduction.