Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
#1
by
puzan789
- opened
app.py
CHANGED
@@ -29,6 +29,13 @@ from pydantic import BaseModel
|
|
29 |
current_dir = pathlib.Path(__file__).parent
|
30 |
|
31 |
load_dotenv()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
|
34 |
def encode_audio(data: np.ndarray) -> str:
|
|
|
29 |
current_dir = pathlib.Path(__file__).parent
|
30 |
|
31 |
load_dotenv()
|
32 |
+
from gradio_webrtc import get_twilio_turn_credentials
|
33 |
+
twilio_sid = os.environ.get("TWILIO_ACCOUNT_SID")
|
34 |
+
twilio_token = os.environ.get("TWILIO_AUTH_TOKEN")
|
35 |
+
|
36 |
+
# Will automatically read the TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN
|
37 |
+
# env variables but you can also pass in the tokens as parameters
|
38 |
+
rtc_configuration = get_twilio_turn_credentials(twilio_sid=twilio_sid,twilio_token=twilio_token)
|
39 |
|
40 |
|
41 |
def encode_audio(data: np.ndarray) -> str:
|