An intelligent web search agent that enables you to search, visualize, and listen to information. Powered by the Gemini family of models.
- Web Search: Get concise, text-based answers to your questions.
- Image Generation: Visualize the search results with AI-generated images in various artistic styles.
- Text-to-Speech: Listen to the search results in multiple languages and voices.
- Multi-language Support: Get search results and audio in several languages.
SynthScope uses the Google Gemini API to perform the following steps:
- Google Search: It takes your query and uses Google Search to find the most relevant information.
- Text Summarization: The search results are summarized into a concise text.
- Image Prompt Generation: The summary is used to generate a prompt for the image generation model.
- Image Generation: An image is created based on the generated prompt and your chosen style.
- Translation and TTS: The text is translated into your chosen language and converted to speech using a text-to-speech model.
- Python 3.9 or later
- A
GEMINI_API_KEYenvironment variable. You can get your API key from Google AI Studio.
- Clone the repository:
git clone https://github.com/Ifeanyi55/SynthScope.git cd SynthScope - Install the required packages:
pip install -r requirements.txt
- Set your
GEMINI_API_KEYenvironment variable:export GEMINI_API_KEY="YOUR_API_KEY"
- Run the application:
python app.py
You can also run SynthScope using Docker.
- Build the Docker image:
docker build -t synthscope . - Run the Docker container:
The application will be available at
docker run -p 7860:7860 -e GEMINI_API_KEY="YOUR_API_KEY" synthscopehttp://localhost:7860.
- Enter your search query in the "Search Query" text box.
- Select the output language, voice, and visual style.
- Click the "Run SynthScope" button.
- The search results will be displayed as text, an image, and an audio file.
SynthScope supports the Model Context Protocol (MCP), allowing it to be used as a tool by other agents and applications. This enables developers to programmatically interact with SynthScope's functionalities.
The MCP server is exposed at the /gradio_api/mcp/sse endpoint of the application. You can connect to it using any MCP-compliant client.
There are two primary ways to configure your MCP client:
1. Direct URL Configuration:
If your client supports direct SSE URL connections, you can configure it with the following JSON object:
{
"mcpServers": {
"SynthScope": {
"url": "https://ifeanyi-synthscope.hf.space/gradio_api/mcp/sse"
}
}
}2. Command-Line Configuration:
For clients that use a command-line interface, you can use the mcp-remote tool to establish a connection. This is particularly useful for local development or when you need more control over the connection parameters.
{
"mcpServers": {
"SynthScope": {
"command": "npx",
"args": [
"mcp-remote",
"https://ifeanyi-synthscope.hf.space/gradio_api/mcp/sse",
"--transport",
"sse-only"
]
}
}
}Once connected, you can send requests to SynthScope with a specific prompt. For optimal results, your prompt should be as descriptive as possible.
Example Prompt:
"Help me search for the current price of gold, and return the search result as a French audio narration."
Please read the contributing guide in order to see how you can contribute to the project.
This project is licensed under the MIT License - see the LICENSE file for details.
