Skip to main content

Time series analysis and AI-powered forecasting with voice interactions

Project description

⏳ TimeCraft

Welcome to TimeCraft! This project was created to simplify time series analysis, database integration, and task automation.

MIT License Last Commit Repo Size


🚀 Key Features

  • 📈 Time Series Analysis Robust scripts for modeling, forecasting, and evaluating temporal data.

  • 🛢️ Database Integration Tools to efficiently connect to and query various database systems.

  • ⚙️ Automation & Notifications Modules to automate data workflows and send notifications or alerts.


📁 Project Structure

timecraft/
├── /src/                # Core logic and modules
├── /docs/               # Documentation files (README, INSTALL, CONTRIBUTING)
├── /tutorials/          # Step-by-step guides and advanced use cases
├── /data/               # Sample datasets and generated results
├── /assets/             # Visual content for outreach and publications
├── /venv/               # Virtual environment and dependency management
└── requirements.txt     # Python dependencies

🧭 Getting Started

  1. Clone the repository:

    git clone https://github.com/rafa-mori/timecraft.git
    cd timecraft
    
  2. Create and activate a virtual environment (optional but recommended):

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install the dependencies:

    pip install -r requirements.txt
    
  4. Explore the tutorials: Navigate to the /tutorials folder for usage examples and best practices.


📚 Tutorials & Examples

Topic Description
Time Series Forecasting Learn how to model and predict future data points.
Database Connection Connect to and retrieve data from supported databases.
Automation Pipeline Build and schedule tasks using TimeCraft’s automation tools.

🗣️ MCP Voice & Chatbot Server (Nova Feature)

O TimeCraft agora conta com um servidor MCP (Multi-Command Processor) com chatbot embutido, pronto para comandos por voz e texto, análise de dados, insights e integração opcional com LLMs/plugins externos!

Principais Endpoints (FastAPI)

  • /health — Health check do servidor
  • /mcp/command — Envie comandos de texto para o MCP (chatbot)
  • /mcp/plugins — Liste, ative/desative e configure plugins/LLMs (ex: OpenAI)

Exemplos de uso

# Health check
curl http://localhost:8000/health

# Enviar comando para o chatbot
curl -X POST http://localhost:8000/mcp/command -H "Content-Type: application/json" -d '{"message": "me mostre o histórico"}'

# Listar plugins/LLMs
curl http://localhost:8000/mcp/plugins

# Ativar plugin OpenAI
curl -X POST http://localhost:8000/mcp/plugins/openai/enable

# Configurar chave de API do OpenAI
curl -X POST http://localhost:8000/mcp/plugins/openai/config -H "Content-Type: application/json" -d '{"api_key": "SUA_CHAVE_AQUI"}'

Como rodar o servidor

uvicorn src.timecraft_ai.mcp_server:app --reload

Recursos do MCP

  • Processamento de comandos por voz (Vosk + Porcupine)
  • Síntese de voz (pyttsx3)
  • Chatbot integrado com análise de dados, previsão e insights
  • Modular: plugins/LLMs ativados só se configurados
  • Baixo custo computacional e monetário por padrão

Veja o código-fonte em src/timecraft_ai/ para detalhes e exemplos de integração.


🗣️ Como usar o MCP por voz

O TimeCraft permite interação totalmente hands free via comandos de voz, com ativação por hotword e resposta falada!

Pré-requisitos

  • Microfone conectado ao computador
  • Dependências instaladas: vosk, pyaudio, pyttsx3, pvporcupine
  • (Opcional) Configurar o modelo Vosk para o idioma desejado (exemplo: models/vosk-model-small-pt)

Como rodar o processador de áudio

python -m timecraft_ai.audio_processor

Ou diretamente pelo arquivo:

python src/timecraft_ai/audio_processor.py

Funcionamento

  • O sistema aguarda a palavra-chave (hotword), por padrão: mcp
  • Após detectar a hotword, grava e transcreve seu comando
  • O comando é processado pelo MCP e a resposta é falada de volta

Exemplo de fluxo

  1. Diga: "MCP" (aguarde a confirmação)
  2. Fale: "Me mostre o histórico"
  3. O MCP responde em voz: "Esses são os dados históricos: ..."

Você pode customizar a hotword, voz e outros parâmetros editando o arquivo audio_processor.py.


🤝 Contributing

Contributions of all kinds are welcome! Please read our CONTRIBUTING.md for detailed guidelines on how to help improve TimeCraft.


🛣️ Planned Features (Roadmap)

  • ✅ Plug-and-play models for ARIMA, Prophet, and LSTM
  • 🚧 Support for cloud-based data sources (e.g., BigQuery, Snowflake)
  • 🔔 Email and webhook notification system
  • 📊 Dashboard interface for visual result presentation (optional module)

📄 License

This project is licensed under the MIT License.

📧 Contact

If you have any questions or feedback, please feel free to reach out:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

timecraft_ai-1.1.2.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

timecraft_ai-1.1.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file timecraft_ai-1.1.2.tar.gz.

File metadata

  • Download URL: timecraft_ai-1.1.2.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for timecraft_ai-1.1.2.tar.gz
Algorithm Hash digest
SHA256 4211306d9be7f004019dc03e6d6b515892d834a30339997a2c30e1dd09a452a6
MD5 423665e42f3fb5e0acb42e2e26da5309
BLAKE2b-256 80444154d2b9e2f46561b99d81ce4d877e38c2ede49005b0ab40d2c16efa5507

See more details on using hashes here.

File details

Details for the file timecraft_ai-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: timecraft_ai-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for timecraft_ai-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6e4f55769e1a7861d79e69f3d4ddc1b8b7605978edba11295a3f1f5ff999f34e
MD5 ff40fc644553f6f186404825b1911606
BLAKE2b-256 bbd8c76bdf41fe8b337e35548e862f50c044c77f625c5c9d5175432d0e3e8c6c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page