File size: 5,723 Bytes
f52eacd
 
321bef2
e60d83c
 
f52eacd
 
f970592
f52eacd
20942f6
 
f970592
 
20942f6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a36f720
20942f6
a36f720
f970592
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
---
title: Float
emoji: 🧘
colorFrom: indigo
colorTo: purple
sdk: docker
pinned: false
license: mit
---
<div align="center" style="display: block;margin-left: auto;margin-right: auto;width: 50%;">
<h1 >
  <img width="800" src="banner.png" alt="float-app icon">
</h1>
<div style="display: flex; justify-content: center; align-items: center;">
  <h4 style="margin: 0; display: flex;">
    <a href="https://www.apache.org/licenses/LICENSE-2.0.html">
      <img src="https://img.shields.io/badge/license-Apache2.0-blue" alt="float is under the Apache 2.0 liscense" />
    </a>
    <a href="https://github.com/circlemind-ai/fast-graphrag/blob/main/CONTRIBUTING.md">
      <img src="https://img.shields.io/badge/Expo-51+-green" alt="Expo Version" />
    </a>
    <a href="https://cloud.google.com/text-to-speech/docs/basics">
      <img src="https://img.shields.io/badge/Google%20TTS%20>=2.6-yellow" alt="Google Text-To-Speech" />
    </a>
    <a href="https://platform.openai.com/docs/guides/text-to-speech">
      <img src="https://img.shields.io/badge/OpenAI-voilet" alt="OpenAI Text-To-Speech" />
    </a>
    <a href="https://www.youtube.com/watch?v=8hmrio2A5Og">
    <img src="https://img.shields.io/youtube/views/8hmrio2A5Og">
    </a>
    <img src="https://img.shields.io/badge/python->=3.12.1-blue">
  </h4>
</div>

  <p><b>From feelings to Flow - Customized Meditations <br> <a href="https://float-app.fun/"> FLOAT » </a> </b> </p>
</div>

# Float

Float is a cross-platform meditation app built with React Native and Expo. It uses Google Generative AI, Eleven Labs text-to-Speech (migrating to Google TTS), and a library of sound files to create personalized meditation experiences based on user-submitted incidents that have affected them emotionally, which we refer to as "floats". Floats are categorized by emotion and intensity, and include a timer and a color scheme to indicate the duration, summary, and reasoning behind each meditation. The app can generate meditations from up to three floats at a time.

## Features :zap:

- **Personalized Meditations**: Generates customized meditation sessions based on user-submitted floats.
- **Multi-Platform Support**: Built with React Native and Expo, supporting iOS, Android and Web platforms.
- **Create Floats with Audio and Text**: User can create floats with audio or text allowing Gemini to capture tonality and speech patterns to asses mood and intensity of emotion as well as text
- **Google Generative AI Integration**: Utilizes Google Generative AI for generating floats and meditation content.
- **ElevenLabs Text-to-Speech**: Converts generated text into spoken meditations using ElevenLabs' text-to-speech technology.
- **Color-Coded Timer**: Provides a visual timer with a color scheme to indicate the elapsed time of the meditation session.
- **Emotion and Intensity Categorization**: Categorizes floats by emotion and intensity to tailor meditation experiences.
- **Backend Powered by AWS Lambda**: Manages API calls to Google Generative AI and ElevenLabs through AWS Lambda functions.

# Installation :eyes:

To set up and run Float locally, follow these steps:

### Prerequisites

- Node.js (version 14 or higher)
- Expo CLI (install with `npm install -g expo-cli`)
- A Google Cloud account with API access for Generative AI
- An ElevenLabs account with API access for Text-to-Speech
- OpenAI Account and API key
- AWS account with Lambda functions set up

### Clone the Repository

```bash
git clone https://github.com/yourusername/float.git
cd float
```

### Install Dependencies
```bash
yarn
```

## Configure Environment Variables
Create a .env file in the root directory and add the following variables:

Frontend
```bash
EXPO_PUBLIC_AWS_ID=<aws_id>
EXPO_PUBLIC_AWS_SECRET=<aws_secret>
EXPO_PUBLIC_AWS_REGION=<aws_region>
```

Backend
```bash
FFMPEG_BINARY=/opt/bin/ffmpeg
G_KEY=<google_api_key>
SIMILARITY_BOOST=0.7
STABILITY=0.3
STYLE=0.3
VOICE_ID=jKX50Q2OBT1CsDwwcTkZ
XI_KEY=<eleven_labs_key>
OPENAI_API_KEY=<openai_key>
```

# Run the App :smile:

### Frontend

Start the development server:

```bash
npm start -c
```
This will open the metro builder. You can run the app on iOS, Android, or web

### Backend

Create a Lambda Layer for the FFMPEG subprocess.  Thanks to [SARVESH VIRKUD](https://virkud-sarvesh.medium.com/building-ffmpeg-layer-for-a-lambda-function-a206f36d3edc)

The Lambda packages need to be downloaded and built on a Linux machine with python 3.12 for google.protbuf and crypto binary packages to work correctly 

## Usage

- **Add Floats:** Enter incidents with audio or text that have affected you.
- **Review:** Review the summary and reasoning behind the float-generation. 
- **Timing:** Use the color-coded timer to monitor if enough temporal space has been created.
- **Generate Meditation:** Select up to three floats to create a personalized meditation.
- **Start Meditation:** Begin the meditation session. 

## API Integration :fire:

- **Google Generative AI:** Used for generating the content of the meditations.
- **AWS Lambda:** Manages API calls and processes data from Google and ElevenLabs APIs.

**Choice of Voice API:** Converts generated text into audio for the meditation sessions.
- **ElevenLabs** 
- **Google TTS**
- **OpenAI Text-to-Speech**


## License
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.

## Acknowledgements

**Google Icons:** Material Icons provided by Google Material Icons

**Logo Font:** Font provided by notyourtypefoundry testType(1.1)

## Contact
For questions or feedback, please contact:

- Email: [email protected]
- GitHub: https://github.com/hatmanstack
- Twitter: @hatmanstack

Enjoy your meditative journey with Float!