Skip to content

Commit 21b85dc

Browse files
committed
Add Twilio websocket
1 parent 5c7fb85 commit 21b85dc

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/index.py

+10-9
Original file line numberDiff line numberDiff line change
@@ -39,24 +39,25 @@ class StreamData(BaseModel):
3939
def answer_call():
4040
print(1)
4141
response = VoiceResponse()
42-
start = Start()
43-
start.stream(url='wss://apis-as-phere-s-team.vercel.app/stream')
42+
#start = Start()
43+
#start.stream(url='wss://apis-as-phere-s-team.vercel.app/stream')
4444
print(2)
4545
#response.append(start)
4646
print(3)
47-
gather = Gather(input='dtmf', num_digits=4)
48-
gather.say('Please enter the 4 digit code on your screen to get started.')
49-
response.append(gather)
47+
#gather = Gather(input='dtmf', num_digits=4)
48+
#gather.say('Please enter the 4 digit code on your screen to get started.')
49+
#response.append(gather)
5050
print(31)
51-
response.say("Bienvenue, je suis en train d'écouter et de transcrire ce que vous dites.", voice='alice')
51+
#response.say("Bienvenue, je suis en train d'écouter et de transcrire ce que vous dites.", voice='alice')
52+
response.say("Hello world. Bonjour, bienvenue Benjamin.", voice='alice')
5253
print(4)
53-
response.play('https://demo.twilio.com/docs/classic.mp3')
54+
#response.play('https://demo.twilio.com/docs/classic.mp3')
5455
print(5)
5556
# Use <Record> to record the caller's message
56-
response.record()
57+
#response.record()
5758
print(6)
5859
# End the call with <Hangup>
59-
response.hangup()
60+
#response.hangup()
6061
print(7)
6162
print(response)
6263
return str(response)

0 commit comments

Comments
 (0)