This is a replica of the Duplex feature launched by Google in 2018 and revealed at Google I/O 2018. It has most of the features Duplex had, although now there is a workaround, since you cannot inject audio into phone calls in Shortcuts: using two devices, which are: 1. the device you are currently using and 2. another device, preferably a phone, which can make and receive calls. Disclaimer: this project is not affiliated with Google or any of their trademarks. Please let me know if there are any bugs.glitches in the comments, and what your experience was like.
Что нового
Stuttering
Что делает
Действий: 77-
Dismiss Siri
-
Show Result
-
CommentCreating profile of what the user wants to do
-
Wait
-
Speak Text
-
Dictate Text
-
Speak Text
-
Dictate Text
-
Set Variablelocation
-
Change Case
-
If
-
Replace Text
-
Replace Text
-
Replace Text
-
Search Local Businesses
-
Choose from List
-
Get Details of Locations
-
Set Variablelocation_phone
-
Speak Text
-
Dictate Text
-
If
-
Replace Text
-
Replace Text
-
Calculate
-
Speak Text
-
If
-
Replace Text
-
Replace Text
-
Calculate
-
If
-
Speak Text
-
If
-
Speak Text
-
Speak Text
-
Dictate Text
-
Set Variablename
-
List
-
Set Variableopening_list
-
Get Item from List
-
Show Result
-
Wait
-
Make Spoken Audio
-
List
-
Get Item from List
-
Replace Text
-
Speak Text
-
Dictate Text
-
If
-
Random Number
-
Wait
-
Dictate Text
-
Split Text
-
Change Case
-
List
-
If
-
Split Text
-
Change Case
-
List
-
Get Item from List
-
Get Item from List
-
Get Item from List
-
If
-
List
-
Get Item from List
-
Make Spoken Audio
-
List
-
Get Item from List
-
Replace Text
-
Speak Text
-
Wait
-
Dictate Text
-
Text
-
List
-
Get Item from List
-
Make Spoken Audio
-
Speak Text
-
Show Result
Посмотреть как код
Все действия этой команды, записанные на Cherri — языке программирования для приложения «Быстрые команды». Отлично подходит, чтобы разобраться, как она работает.
#include 'actions/text'
#include 'actions/device'
#define color lightblue
#define glyph phone
dismissSiri()
show("Disclaimer: this project is not affiliated with Google or any of their trademarks. ")
// Creating profile of what the user wants to do
wait(1)
speak("What do you want to book?")
listen()
speak("Where?")
listen("After Short Pause")
@location
uppercase(@location)
if contains "at" || contains "pm" || contains "am" {
replaceText("at", "")
replaceText("am", "")
replaceText("pm", "")
}
rawAction("is.workflow.actions.searchlocalbusinesses", {
"WFSearchQuery": "{@location}"
})
const SelectedItem = chooseFromList(LocalBusinesses, "Which one?")
getLocationDetail(SelectedItem, "Phone Number")
@location_phone
speak("At what time?")
const DictatedText = listen("After Short Pause")
if DictatedText contains "PM" {
replaceText("At", "", DictatedText)
const UpdatedText = replaceText("PM", "", DictatedText)
speak("OK, but if {DictatedText} isn't available today, can I try {} PM?")
} else {
replaceText("At", "", DictatedText)
const UpdatedText1 = replaceText("AM", "")
const CalculationResult = UpdatedText1 + 1
if CalculationResult >= 12 {
speak("OK, but if {DictatedText} isn't available today, can I try {CalculationResult} PM?")
} else {
speak("OK, but if {DictatedText} isn't available today, can I try {CalculationResult} AM?")
}
}
speak("One last thing: what's your name?")
listen("After Short Pause")
@name
list("Hi. I'd like to make {} on behalf of {@name} at {}. Oh, and by the way, is {DictatedText} available? We can always do later instead.", "Hey there. Can I make {} on behalf of {@name} at {}? Also, is {DictatedText} available? If it isn't, we can do later instead.", "Hello there. Let’s do {}. I’m calling on behalf of {@name} at {}. Can you please confirm that {DictatedText} is available? If it isn't, we can use later as a replacement. ", "Hi there. I’m calling to make {} for {@name} at {}. Can I confirm with you that that {DictatedText} is available? If it isn’t, we can do later instead. ")
@opening_list
getListItem(@opening_list, 0)
show("Disclaimer: this setup requires two devices, which are: 1. the device you are currently using and 2. another device, preferably a phone, which can make and receive calls. Call {@location_phone} on the Phone app's number pad then click \"Done\" once they pick it up.")
wait(0)
makeSpokenAudio()
const List = list("…um…", "…um,", ", uh…", ", uh, ", ", erm…", ", erm, ")
getListItem(List, 0)
replaceText(", ")
speak()
const DictatedText1 = listen()
if DictatedText1 == "" {
const RandomNumber = randomNumber(1, 3)
wait(RandomNumber)
const DictatedText2 = listen()
const SplitText = splitText(DictatedText2, " ")
uppercase(SplitText)
list("pm", "available", "am")
} else {
const SplitText1 = splitText(DictatedText1, " ")
const UpdatedText2 = uppercase(SplitText1)
const List1 = list("available", "pm", "am")
getListItem(List1, 0)
getListItem(List1, 2)
getListItem(List1, 0)
if UpdatedText2 contains {
const List2 = list("That's wonderful! I'm, using experimental technology, so, can you please state, at what time in a clean format such as \"4 PM\" or \"11 AM\"? Thanks.", "Great. I was, made with experimental technology, so please tell me: what time do you, have available. Say it in a clean format like \"3 PM\" or \"10 AM\"? Thank you.", "Good! I was made with technology in its early stages, so tell me what time you have in a format like “2 PM” or “9 AM”.", "Good. I’m currently using technology still being experimented with, so, please tell me what time you’d like me to book in a clean format, like “1 PM” or “8 AM”.")
getListItem(List2, 0)
makeSpokenAudio()
const List3 = list("…um…", "…um,", ", uh…", ", uh, ", ", erm…", ", erm, ")
getFirstItem(List3)
replaceText(", ")
speak()
wait(0)
listen()
const List4 = list("Good! {@name} will pay on-site. I’ll inform them and they’ll be there!", "Awesome. {@name} will pay right there, and I’ll inform them right now.", "Great! {@name} will pay there, and they’ll be informed by me now.")
getListItem(List4, 0)
makeSpokenAudio()
speak()
show("I've already talked to them—hang up if they haven't done it already. In short: I've booked {} on your behalf and said you'd pay on-site. Goodbye!\n\nTips:\n1. Go there at {}, as that is what's available;\n2. Informed them you'll pay on-site.")
}
}
Оценки и отзывы
Написать отзывПока нет отзывов. Поделись мнением первым!